Code specification checking method and device

By converting the source code into a lexical unit stream and generating a binary tree for inspection, the problem of inefficiency of existing code specification inspection tools is solved, achieving faster inspection times and higher efficiency.

CN119690447AActive Publication Date: 2025-03-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
7 Cites 0 Cited by

Patent Information

Application Number
CN202411591668.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-03-25
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

The existing automated code specification inspection tools are inefficient and time-consuming when checking code specifications, mainly due to wasted resources for checking source code syntax.

Method used

By converting the source code to be checked into a lexical unit stream and moving into reduction operations based on the source code syntax, a binary tree is generated and the target statement is checked.

Benefits of technology

Reduces the amount of data storage, shortens code specification inspection time, improves inspection efficiency, and reduces the maintenance cost of subsequent tools.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a code specification checking method which comprises the steps that source codes to be checked are converted into lexical unit streams, and the lexical unit streams comprise different types of lexical units conforming to the lexical corresponding to the source codes; based on a grammar corresponding to a source code, performing a shift-in reduction operation on the lexical unit stream, and in the shift-in reduction operation process, generating a binary tree for a target statement output by reduction, the target statement being defined based on the grammar corresponding to the source code; and checking the target statement based on the binary tree according to a rule defined in a to-be-checked specification. According to the method, the binary tree is generated only for the target statement reduced according to the grammar, and in the process of performing standard checking on the corresponding target statement based on the binary tree, compared with a traditional syntax tree, the data storage amount is reduced, the code standard checking time is shortened, and the standard checking efficiency is improved.
Need to check novelty before this filing date? Find Prior Art