基于ANTLR的前端编译器若干关键问题的研究与实现  被引量:1

Research and Implementation of Some Key Problems about the Front-end Compiler Based on ANTLR

在线阅读下载全文

作  者:王海燕[1] 杨鹤标[2] 

机构地区:[1]宿迁学院计算机科学系 [2]江苏大学计算机科学与通信工程学院

出  处:《长春工程学院学报(自然科学版)》2013年第3期104-107,共4页Journal of Changchun Institute of Technology:Natural Sciences Edition

基  金:国家自然科学基金项目(61005017);国家自然科学基金项目(61202110);校级教改研究项目(2011YJG08)

摘  要:采用自动生成工具ANTLR的LL(*)文法对编译器前端进行构造,所涉及的关键问题有:文法的左递归、算符的结合性、算符优先级及语法断言。针对上述关键问题进行研究,给出了具体可行的解决方案。实验结果表明:该方案有效地解决了基于ANTLR的代码编译问题,具有良好的可操作性和实用性。The compiler front end is structured by the LL ( * ) grammar of ANTLR automatic generation tool. Its key problems include the left recursive of the grammar, the association of the operators, the priori- ty of the operators, and the predicate of the grammar. The feasible solution is obtained through the research on the above key problems. The experiment results show that the problems of the code compile based on ANTLR are effectively solved by this solution,which has the good operability and practicality.

关 键 词:ANTLR 左递归 算符 语法断言 

分 类 号:TP39[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象