摘要
从编译原理角度出发,采取确定有穷自动机的词法分析、自顶向下的语法分析,产生数控伪指令,通过数据栈来进行语义分析,手工实现数控B类宏指令。该方案思路清晰,简化程序设计,方便代码重用。其为国内数控系统对B类宏指令的编译实现,提供了一种行之有效的解决方案。
From the compilation theory point of view, deterministic finite state automata was used in lexical analysis, top-down grammatical analysis to generate NC pseudo-instruction. Semantic analysis was carried out through data stack, then NC-B class macro was manually generated. The scheme has clear ideas, simplified programming and increased reusability of code. For the domestic nu- merical control system, an effective solution in compilation of NC-B class macro is provided.
出处
《机床与液压》
北大核心
2011年第6期25-27,31,共4页
Machine Tool & Hydraulics
关键词
数控B类宏指令
词法分析
语法分析
语义分析
NC-B class macro
Lexical analysis
Grammatical analysis
Semantic analysis