Method for transforming switch special language into C language

A special language, C language technology, applied in the direction of program control devices, etc., can solve the problems of low readability, complexity, no annotation processing, etc., and achieve the effect of high readability and high portability

Active Publication Date: 2011-10-19
中电福富信息科技有限公司
View PDF2 Cites 18 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the switch special language has its special features. For example, the special language is relatively complex, without comment processing, and the readability is very low; in the existing high-level languages, it is basically processed in units of Byte, and only some compilers, Such as gcc (compiler), use "_attribute_((packed))" to specify the special memory mode of the data type
But the "PACK / NO_PACK" rules of the switch-specific language are far more complicated than this, which leads to difficulties in language conversion
The usual language conversion tools don't come up with a good way of doing this

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
  • Method for transforming switch special language into C language
  • Method for transforming switch special language into C language
  • Method for transforming switch special language into C language

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017] see figure 1 As shown, the switch special language of the present invention is converted into the method for C language, and described method provides preprocessing module, symbol table unit, conversion processing module, annotation preprocessing module and annotation processing module, and described preprocessing module comprises LEX lexical analysis Device and YACC analysis program generator; Described transform processing module comprises LEX lexical analyzer and YACC analysis program generator; Described annotation preprocessing module includes LEX lexical analyzer, and its concrete steps are as follows:

[0018] Step 10, importing the switch-specific language source code into the pre-processing module and the comment pre-processing module for processing, the LEX lexical analyzer and the YACC analysis program generator of the pre-processing module carry out syntax and semantic analysis to the switch-specific language source code , analyzing and producing the global ...

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 invention provides a method for transforming a switch special language into C language. In the method, a preprocessing module, a symbol list unit, a transformation processing module, an annotation preprocessing module and an annotation processing module are provided, wherein the preprocessing module comprises an LEX lexical analyzer and a Yet Another Compiler-Compiler (YACC) analysis program generator; the annotation preprocessing module comprises an LEX lexical analyzer and a YACC analysis program generator; the annotation preprocessing module comprises an LEX lexical analyzer, wherein source codes of the switch special language are imported into the preprocessing module and the annotation preprocessing module to be processed and then sentences and annotation contents which produce a global symbol table and a syntax tree format are obtained; and then final C language codes with the annotations are generated through the transformation processing module and the annotation preprocessing module. The method realizes the transformation of the switch special language into the C language, and the C language is provided with the annotations and is highly readable.

Description

【Technical field】 [0001] The invention relates to the technical field of special language for switches of computers, in particular to a method for converting the special language of switches into C language. 【Background technique】 [0002] Most of the old large-scale program-controlled switches currently in operation use dedicated hardware and switch-specific languages. However, with the upgrading of computer hardware and the popularity of general-purpose high-level languages. The old large-scale program-controlled switches face problems such as hardware upgrades, special-purpose language compiler upgrades, and operating efficiency. These problems urgently require that the special language of the switch be converted into a general high-level language (such as C, C++ language), so as to maintain and upgrade the function of the system. [0003] The conversion principle of high-level languages ​​is the same as that of compilers. Basically, it is converted into an intermediat...

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/44
Inventor 林居京陈益林林团林铿伍琰华吴坤雄陈浚
Owner 中电福富信息科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products