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

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 accepts three parameters `function a(arg1,arg2,arg3)` but when the function is called, it lacks Some parameters, such as `a(1,2)` are also acceptable, missing parameters automatically become `nil`
If the programmer's negligence leads to less parameter passing, it will bring hidden dangers to code stability; type errors and some code bugs may only report errors during runtime, which is inconvenient to find during development

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

Embodiment Construction

[0041] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is an embodiment of a part of the application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.

[0042] Such as 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 syntax of the original dynamic programming language to obtain a new dynamic programming language;

[0044] Step S12, checking the syntax of the source program based on t...

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 北京长亭未来科技有限公司
Features
  • Generate Ideas
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More