Dynamic programming language reconstruction method and device

A dynamic programming and programming language technology, applied in the field of computer programs, can solve problems such as lack of parameters, type errors, hidden dangers of code stability, etc., and achieve the effect of improving code quality, maintaining compatibility, and reducing maintenance costs

Pending Publication Date: 2021-06-11
北京长亭未来科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Lua is a very simple programming language, but it also has some disadvantages. For example, the Lua data structure is relatively primitive. For example, there are no map, struct or array types in other common programming languages, but a data structure called table.
In Lua code, passing a piece of data does not know exactly what type of data it is; Lua syntax is too loose, for example, a function definition accep

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
  • Dynamic programming language reconstruction method and device
  • Dynamic programming language reconstruction method and device
  • Dynamic programming language reconstruction method and device

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0041] In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only The embodiments are part of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the scope of protection of the present application.

[0042] like figure 1 As shown, a method for refactoring a dynamic programming language provided in an embodiment of the present invention includes:

[0043] Step S11, redefine the grammar of the original dynamic programming language to obtain a new dynamic programming language;

[0044] Step S12, performing syntax check on ...

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 embodiment of the invention discloses a dynamic programming language reconstruction method and device, and the method comprises the steps: redefining the grammar of an original dynamic programming language to obtain a new dynamic programming language; performing grammar check on the source program based on the new dynamic programming language. According to the method, the source program of the new dynamic programming language passing the grammar check is generated into the source program which is interpreted and executed by the original dynamic programming language interpreter, the new language grammar is defined, the code maintenance cost is reduced, and the code quality is improved.

Description

technical field [0001] The embodiments of the present invention relate to the field of computer programs, and in particular to a method and device for reconfiguring a dynamic programming language. Background technique [0002] Dynamic programming language is a category of high-level programming language, which has been widely used in the field of computer science. It is a kind of language whose type can be changed at runtime: for example, new functions, objects, and even code dynamic import. Dynamic languages ​​are currently very Vitality, such as Lua, PHP, Ruby, Python, etc. are dynamic languages, while C, C++ and other languages ​​are not dynamic languages. [0003] Lua is a very simple programming language, but it also has some disadvantages. For example, the Lua data structure is relatively primitive. For example, there are no map, struct or array types in other common programming languages, but a data structure called table. . In Lua code, passing a piece of data does...

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
IPC IPC(8): G06F8/30G06F8/41G06F8/72
CPCG06F8/31G06F8/437G06F8/72
Inventor 李扬王宁肖玉配屈宏远李昌志张嘉欢
Owner 北京长亭未来科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products