The LL(finite) strategy for optimal LL(k) parsing

10/15/2020
by   Peter Belcak, et al.
0

The LL(finite) parsing strategy for parsing of LL(k) grammars where k needs not to be known is presented. The strategy parses input in linear time, uses arbitrary but always minimal lookahead necessary to disambiguate between alternatives of nonterminals, and it is optimal in the number of lookahead terminal scans performed. Modifications to the algorithm are shown that allow for resolution of grammar ambiguities by precedence – effectively interpreting the input as a parsing expression grammar – as well as for the use of predicates, and a proof of concept, the open-source parser generator Astir, employs the LL(finite) strategy in the output it generates.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/09/2021

A Derivative-based Parser Generator for Visibly Pushdown Grammars

In this paper, we present a derivative-based, functional recognizer and ...
research
07/08/2019

parboiled2: a macro-based approach for effective generators of parsing expressions grammars in Scala

In today's computerized world, parsing is ubiquitous. Developers parse l...
research
05/13/2020

Pika parsing: reformulating packrat parsing as a dynamic programming algorithm solves the left recursion and error recovery problems

A recursive descent parser is built from a set of mutually-recursive fun...
research
03/14/2023

Happy-GLL: modular, reusable and complete top-down parsers for parameterized nonterminals

Parser generators and parser combinator libraries are the most popular t...
research
12/12/2018

Systematic Parsing of X.509: Eradicating Security Issues with a Parse Tree

X.509 certificate parsing and validation is a critical task which has sh...
research
06/03/2022

A closer look at TDFA

We present an algorithm for regular expression parsing and submatch extr...
research
06/20/2017

Alignment Elimination from Adams' Grammars

Adams' extension of parsing expression grammars enables specifying inden...

Please sign up or login with your details

Forgot password? Click here to reset