Compilers: Principles, Techniques, and Tools (2nd Edition)
Compilers: Principles, Techniques, and Tools (2nd Edition)
Hi-index | 0.00 |
During the development of a new stand-alone motion controller, we encountered how to compile client terminal motion programs into low-level C language data structure and motion functions which could be executed by motion controller processor. For real-time motion control applications like high speed machining tasks could not be interrupted, the client terminal motion programs must not contain any syntax errors before they were interpreted and executed by the motion controller processor. So a syntax checker for client terminal motion programs should be designed to instruct users to rule out every syntax error in them. For this we developed a syntax checker to perform the task as mentioned above. To present our work of the syntax checker, we firstly give an introduction to syntax rules of widely used GALIL motion commands, and then we focus our discussions on system structure of the syntax checker. Detailed descriptions are also made item by item on implementations of the sub syntax checker modules including lexical and grammar analysis, integration processing, semantic analysis and post-processing. Finally we present the experimental results to demonstrate the effectiveness of our developed syntax checker.