Solving LR Conflicts Through Context Aware Scanning

Autor: C. Rodriguez Leon, L. Garcia Forte, Theodore E. Simos, George Psihoyios, Ch. Tsitouras, Zacharias Anastassi
Rok vydání: 2011
Předmět:
Zdroj: AIP Conference Proceedings.
ISSN: 0094-243X
DOI: 10.1063/1.3636861
Popis: This paper presents a new algorithm to compute the exact list of tokens expected by any LR syntax analyzer at any point of the scanning process. The lexer can, at any time, compute the exact list of valid tokens to return only tokens in this set. In the case than more than one matching token is in the valid set, the lexer can resort to a nested LR parser to disambiguate. Allowing nested LR parsing requires some slight modifications when building the LR parsing tables. We also show how LR parsers can parse conflictive and inherently ambiguous languages using a combination of nested parsing and context aware scanning. These expanded lexical analyzers can be generated from high level specifications.
Databáze: OpenAIRE