计算机科学 > 程序设计语言
[提交于 2015年7月30日]
标题:Fast, Flexible, and Declarative Construction of Abstract Syntax Trees with PEGs
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:We address a declarative construction of abstract syntax trees with Parsing Expression Grammars. AST operators (constructor, connector, and tagging) are newly defined to specify flexible AST constructions. A new challenge coming with PEGs is the consistency management of ASTs in backtracking and packrat parsing. We make the transaction AST machine in order to perform AST operations in the context of the speculative parsing of PEGs. All the consistency control is automated by the analysis of AST operators. The proposed approach is implemented in the Nez parser, written in Java. The performance study shows that the transactional AST machine requires 25\% approximately more time in CSV, XML, and C grammars.
提交历史
来自:Kimio Kuramitsu[v1] 2015年7月30日 星期四 18:15:02 UTC