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

Breakpoint debugging method for LR(k) grammar random grammar position

A debugging method and breakpoint technology, applied in the direction of program control design, instrumentation, electrical digital data processing, etc., can solve problems such as increased processing burden for users, damage to grammar readability, failure of analysis process, etc., to achieve increased traceability and debugging The number of breakpoints, good grammar debugging, and easy integration effects

Inactive Publication Date: 2008-03-26
BEIHANG UNIV
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

First of all, this method modifies the original grammar and damages the readability of the grammar; second, it adds additional processing burden to the user; third, these useless non-terminals are not part of the original grammar in nature, so after debugging Finally, they must be deleted from the grammar. In this way, every time the user sets a breakpoint, he must manually add a useless non-terminal symbol, and he has to delete it after debugging, which brings great inconvenience to the user's debugging; Finally, adding useless nonterminals to an LR(k) grammar may introduce new parsing conflicts, causing the changed grammar to no longer be an LR(k) grammar, causing the parsing process to fail

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
  • Breakpoint debugging method for LR(k) grammar random grammar position
  • Breakpoint debugging method for LR(k) grammar random grammar position
  • Breakpoint debugging method for LR(k) grammar random grammar position

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] The invention proposes a novel LR(k) grammar breakpoint debugging method, which supports inserting a breakpoint at any grammar position (grammar position) on the right side of the production formula. For example, for the problem discussed above, if the user wants to view the analysis status information after recognizing the "+", our debugging method supports setting a breakpoint directly after the "+" (Figure 4). The present invention also proposes a method to distinguish between valid, invalid and indeterminate breakpoint locations. The present invention can significantly increase the number of available breakpoints, and users can track more fine-grained grammar fragments, which can help users better understand the analysis process.

[0030] 1 related definitions

[0031] For the convenience of discussion later, definitions of some related terms used in the present invention are given here. For the basic knowledge of grammar, language and analysis techniques involved...

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

This invention relates to the break point debug method in the LR(k) random grammar position, its steps is: Defines language LR(k) grammar or LR(k) grammar subclass grammar G; Inserts the break point in the corresponding grammar position; Inspects each break point, if this break point establishes in some grammar position right middle of the production pattern, then adds the useless non-end mark, thus obtains new grammar G'; to generate the grammar G' analytical statement; to calculate the type of each break point; to analysis the input string, until meets a reduction operation, inspects this position whether corresponds a break point, if it is, then adopts the following: To the effective break point, suspends the parsing process, demonstrates the current analysis status messages; To the invalid break point, neglects this break point, continues the parsing process; To indefinite break point, then neglects or joints with current input string and the position the break point established, further judges this position whether effective or not, if this position of the current input string is effective, presses effective break point position processing, if this position is invalid, then neglects this position, continues the parsing process. This invention obviously increases the break point number which may track and debug, may track the fine grain grammar ingredient, helps the user to carry on the grammar debugging well, and reduces the development difficulty of analyzer.

Description

technical field [0001] The invention relates to a grammar breakpoint debugging technology, and proposes a breakpoint debugging method for an arbitrary grammatical position in an LR(k) grammar, which can significantly increase the number of breakpoints that can be tracked and debugged, and helps users better perform grammar debugging. Background technique [0002] Parser generators are widely used in the construction of parsers and compiler front ends, and more and more developers use automatic parser generation tools to generate parsers or compiler front ends. [0003] Unlike experts in the field of compilation, these ordinary developers are often not familiar with analysis theory, and they do not often develop such analysis tools. For such developers, good grammar debugging support is indispensable, which can effectively reduce the complexity of analyzer development and improve development efficiency. Even for compilation experts, good grammar debugging support can help th...

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): G06F9/45
Inventor 许福李虎金茂忠刘超
Owner BEIHANG UNIV
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