Unreachable statement recognition method, and C language and Java conversion method and device
The invention relates to an unreachable statement recognition method and a C language and JAVA conversion method and device. The unreachable statement recognition method comprises the steps of obtaining a to-be-processed C language program; performing lexical analysis on the to-be-processed C langua...
Saved in:
Main Authors | , , |
---|---|
Format | Patent |
Language | Chinese English |
Published |
25.03.2022
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | The invention relates to an unreachable statement recognition method and a C language and JAVA conversion method and device. The unreachable statement recognition method comprises the steps of obtaining a to-be-processed C language program; performing lexical analysis on the to-be-processed C language program to obtain to-be-processed words; performing grammatical analysis on the to-be-processed word to establish a syntax tree; and traversing the syntax tree through a depth-first traversal method to identify the unreachable statements in the syntax tree. The method for converting the C language program into the Java program comprises the following steps: identifying the C language program according to an unreachable statement identification method in a C language to obtain an unreachable statement; and converting the C language program into a Java program according to the unreachable statement. By adopting the method, the unreachable statements in the C language can be identified.
本申请涉及一种不可达语句识别方法、C语言与JAVA转换方 |
---|---|
Bibliography: | Application Number: CN202111363168 |