Affiliation:
1. Pennsylvania State University, USA
Abstract
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.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference21 articles.
1. Adding nesting structure to words
2. Derivatives of Regular Expressions
3. F. L. Deremer. 1969. PRACTICAL TRANSLATORS FOR LR(K) LANGUAGES. USA. F. L. Deremer. 1969. PRACTICAL TRANSLATORS FOR LR(K) LANGUAGES. USA.
4. An efficient context-free parsing algorithm
Cited by
3 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. V-Star: Learning Visibly Pushdown Grammars from Program Inputs;Proceedings of the ACM on Programming Languages;2024-06-20
2. Fast and Verified UNSAT Certificate Checking;Lecture Notes in Computer Science;2024
3. A Derivative-based Parser Generator for Visibly Pushdown Grammars;ACM Transactions on Programming Languages and Systems;2023-05-15