Code conversion method and device
A technology of code conversion and source code, which is applied in the field of code conversion methods and devices, can solve problems such as increased platform coupling and load, lack of versatility, and inability to run business codes, and achieve the effect of reducing development
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 2
[0080] In this embodiment, a code conversion device is also provided, which is used to implement the above embodiments and preferred implementation modes, and what has been explained will not be repeated here. As used below, the term "module" may be a combination of software and / or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
[0081] Figure 4 is a structural block diagram of a code conversion device according to an embodiment of the present invention, such as Figure 4 As shown, the device includes: an acquisition module 40 for obtaining a source code file; a conversion module 42 connected to the above acquisition module 40 for compiling the source code file into an abstract syntax tree AST according to the grammatical structure information of the source code file, ...
Embodiment 3
[0091] In this embodiment, a code conversion system is also provided, which is used to implement the above embodiments and preferred implementation manners, and what has been explained will not be repeated here. As used below, the term "module" may be a combination of software and / or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
[0092] According to another embodiment of the present invention, a code conversion system is provided, Image 6 is a structural block diagram of a code conversion system provided by an embodiment of the present invention, such as Image 6 As shown, the system includes: a source platform 60 and a plurality of target platforms 62, wherein the source platform 60 includes: an acquisition module for acquiring source code files; a first conversion m...
Embodiment 4
[0094] An embodiment of the present invention also provides a storage medium, in which a computer program is stored, wherein the computer program is set to execute the steps in any one of the above method embodiments when running.
[0095] Optionally, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for performing the following steps:
[0096] S1, obtaining the source code file;
[0097] S2. Compile the source code file into an Abstract Syntax Tree AST according to the grammatical structure information of the source code file, wherein the grammatical structure information at least includes: the grammar of the source code file, and the format of the source code file , the label of the source code file;
[0098] S3. Send the AST to a target platform, where the target platform is used to convert the AST into an object code of the target platform.
[0099] Optionally, in this embodiment, the above-mentioned storage medium may a...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com