当前位置: X-MOL 学术arXiv.cs.FL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
A Derivative-based Parser Generator for Visibly Pushdown Grammars
arXiv - CS - Formal Languages and Automata Theory Pub Date : 2021-09-09 , DOI: arxiv-2109.04258
Xiaodong Jia, Ashish Kuma, Gang Tan

In this paper, we present a derivative-based, functional recognizer and parser generator for visibly pushdown grammars. The generated parser accepts ambiguous grammars and produces a parse forest containing all valid parse trees for an input string in linear time. Each parse tree in the forest can then be extracted also in linear time. Besides the parser generator, to allow more flexible forms of the visibly pushdown grammars, we also present a translator that converts a tagged CFG to a visibly pushdown grammar in a sound way, and the parse trees of the tagged CFG are further produced by running the semantic actions embedded in the parse trees of the translated visibly pushdown grammar. The performance of the parser is compared with a popular parsing tool ANTLR and other popular hand-crafted parsers. The correctness of the core parsing algorithm is formally verified in the proof assistant Coq.

中文翻译:

用于可见下推文法的基于导数的解析器生成器

在本文中,我们提出了一种基于导数的函数式识别器和解析器生成器,用于可见下推文法。生成的解析器接受不明确的语法,并在线性时间内生成一个包含输入字符串的所有有效解析树的解析森林。然后也可以在线性时间内提取森林中的每个解析树。除了解析器生成器,为了让可见下推文法的形式更加灵活,我们还提出了一个翻译器,以合理的方式将标记 CFG 转换为可见下推文法,并通过运行嵌入在翻译的可见下推文法的解析树中的语义动作。将解析器的性能与流行的解析工具 ANTLR 和其他流行的手工制作的解析器进行比较。
更新日期:2021-09-10
down
wechat
bug