Design and Implementation of Lexical and Syntax Analysis Tool CParser for C Language
Yang Shao-ju
Abstract
Yang Shao-ju
Abstract
Program analysis techniques contains control flow analysis,data flow analysis,alias analysis,program slicing techniques and program instrumentation,and has important applications in program comprehension,code refactoring,code optimization,automated software debugging and other aspects. Especially,the lexical analysis and syntax analysis technology is the basis for program analysis techniques. This paper designs and implements a new C language syntax analysis tool named CParser,through three steps which are lexical analysis,preprocessing and syntax analysis to achieve the establishment of the abstract syntax tree based on the source code. This tool is easy to use,and can fully support the C99 standard,furtherly can be used to code clone detection and fault localization.
OpenAlex reports 3 citations for this work. Citation counts describe recorded attention and do not establish research quality.
A contribution statement is not available in the OpenAlex record.
Method details are not available in the OpenAlex metadata.
Findings are not separately available in the OpenAlex metadata.
Limitations are not available in the OpenAlex metadata.
Application details are not available in the OpenAlex metadata.
Program analysis techniques contains control flow analysis,data flow analysis,alias analysis,program slicing techniques and program instrumentation,and has important applications in program comprehension,code refactoring,code optimization,automated software debugging and other aspects. Especially,the lexical analysis and syntax analysis technology is the basis for program analysis techniques. This paper designs and implements a new C language syntax analysis tool named CParser,through three steps which are lexical analysis,preprocessing and syntax analysis to achieve the establishment of the abstract syntax tree based on the source code. This tool is easy to use,and can fully support the C99 standard,furtherly can be used to code clone detection and fault localization.
Key concepts: Computer science, Abstract syntax tree, Programming language, Lexical analysis, Program comprehension, Abstract syntax, Code refactoring, Program analysis