摘要
本文通过对编译原理的研究和当前流行的通用编译器的剖析,提出了一种基于IEC61131-3标准的ST语言编译前端的实现方法,设计并实现了语法分析的算法。基于当前业界最为成熟的编译前端生产工具YACC设计实现ST语言编译器的词法分析器和语法分析器。实际应用表明,本研究所实现的ST语言编译器具有高效可靠、操作灵活、使用方便等优点。
According to the research of compiler theory and the analysis of the current popular compiler, we propose a method to implement the ST language compiler based on IEC 61131-3 standard, then a parsing algorithm is designed and implemented, Using the most current industry mature compiler front-end production tools Bison make ST language compiler lexical analyzer and syntax analyzer. The practical application shows that the ST language compiler implemented in this research has the advantages of high efficiency, reliable, flexible operation, easy to use and so on.
出处
《仪器仪表标准化与计量》
2015年第5期26-29,共4页
Instrument Standardization & Metrology
基金
国家863高技术研究计划"CMC芯片的软件应用平台开发"(2012AA041703)资助