帮助 本站公告
您现在所在的位置:网站首页 > 知识中心 > 文献详情
文献详细Journal detailed

工业机器人语言的词法语法分析器研究
Study on the Lexical and Syntactic Analyzer for Industrial Robot Language

作  者: ; ; ; ;

机构地区: 华南理工大学机械与汽车工程学院

出  处: 《机械设计与制造》 2014年第1期209-212,共4页

摘  要: 解释器与编译器是把工业机器人语言程序翻译成目标代码的两种主要语言处理器实现技术,但二者的翻译过程都离不开词法语法分析环节。词法分析器主要用于识别语言系统的标识符及关键字等标记,而语法分析器则对这些标记所组成的句子进行语法检查等。高效准确的词法语法分析是实现工业机器人语言程序向可执行目标代码翻译的关键之一。提出以C语言为蓝本的动作级工业机器人语言的体系结构及指令集;采用Parser Generator工具来开发词法语法分析器,运用正则表达式和LR文法来描述扩展工业机器人语言的词法语法规则,并指出了非法格式的错误报告实现。对所开发的可视化分析器进行的实例测试表明,分析结果正确可靠。 The interpreter and the compiler is language processor implementation technology to tranzlate industrial robot programming language into the target code, but both of the tranzlation process is inseparable from the lexical grammar analysis. Lexical analyzer is mainly used for identification of language system identifier and keywords tag; whereas the parser syntax checks on these markers of sentences and so on. One of the key for industrial robot language in the translating from source to executable code is an efficient and accurate lexical and syntactic analyzer. A motion level industrial robot language based on C language is proposed. Parser Generator tool is utilized to develop a lexical and syntactic analyzer. Regular expression and LR grammar are introduced to describe the lexieal and syntactic rule. The implementation of error report on illegal expressions is also discussed. Through test case of robot motion, the lexieal and syntactic analysis result is proved reliable.

关 键 词: 词法语法分析 工业机器人语言 正则表达式 文法

领  域: [机械工程] [自动化与计算机技术] [自动化与计算机技术]

相关作者

作者 黄讴

相关机构对象

机构 中山大学

相关领域作者

作者 李文姬
作者 邵慧君
作者 杜松华
作者 黄晓宇
作者 孟显勇