Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Automatic code conversion method and device, code converter and medium

An automatic conversion and code technology, applied in the direction of program code conversion, code compilation, etc., can solve the problems of low accuracy and inability to be widely used

Pending Publication Date: 2019-11-19
WUBA
View PDF15 Cites 20 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, the accuracy rate of this program code conversion scheme in the prior art is low, and program developers are required to perform lexical analysis and syntax analysis for the program language to be converted and the target program language
Therefore, this solution can only be used to convert simple codes at present, and cannot be widely used

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Automatic code conversion method and device, code converter and medium
  • Automatic code conversion method and device, code converter and medium
  • Automatic code conversion method and device, code converter and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0018] Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. It should be noted here that the numbers, serial numbers and reference signs in the application are only for the convenience of description, and do not constitute any restrictions on the steps, sequence, etc. of the present invention, unless the instructions clearly indicate the steps There is a specific sequence of execution.

[0019] As mentioned above, the accuracy rate of the program code conversion scheme in the prior art is low, and pro...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an automatic code conversion method, an automatic code conversion device, a code converter and a medium. The code conversion method comprises the following steps: constructingan abstract syntax tree corresponding to a semantic module of a source code from the source code by using a compiler; for a corresponding abstract syntax tree of one semantic module, obtaining syntaxexpression of the abstract syntax tree; and based on the obtained syntax expression of the corresponding abstract syntax tree of one semantic module, generating a corresponding target code semantic module from the abstract syntax tree according to a predetermined conversion rule between the syntax expression of the abstract syntax tree and the target code. According to the method, the abstract syntax tree is constructed for the source code by using the compiler. The target code is generated based on the constructed abstract syntax tree, so that automatic conversion of the program code is realized.

Description

technical field [0001] The invention relates to program code conversion technology, in particular to a code automatic conversion method and device, a code converter and a medium. Background technique [0002] In the industry, the demand for automatic program code conversion has always been great, but there is no widely used automatic program code conversion solution. [0003] Usually, the solution to realize program code conversion is: first treat the program code as ordinary text, conduct regular analysis, and identify language symbols such as "[]", ";", "{}" in it to determine that the text content is a statement It still has semantics such as function calls; then, through specific rules, the corresponding target language program code is generated. [0004] However, the accuracy rate of this program code conversion solution in the prior art is low, and program developers are required to perform lexical analysis and syntax analysis on both the program language to be conver...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41
CPCG06F8/42
Inventor 邓竹立吕庆春彭飞
Owner WUBA
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products