Fast deterministic parsers for transition networks
Autor: | Angelo Borsotti, Luca Breveglieri, Angelo Morzenti, Stefano Crespi Reghizzi |
---|---|
Jazyk: | angličtina |
Rok vydání: | 2018 |
Předmět: |
Theoretical computer science
Computer Networks and Communications Computer science 02 engineering and technology computer.software_genre Canonical LR parser bottom-up parsing parsing conflicts Rule-based machine translation 0202 electrical engineering electronic engineering information engineering Regular expression Parsing syntax analysis Programming language LR parser 020207 software engineering shift-reduce Parsing expression grammar Context-free grammar EBNF extended grammar syntax chart TheoryofComputation_MATHEMATICALLOGICANDFORMALLANGUAGES ELR(1) 020201 artificial intelligence & image processing parser performance computer Software Information Systems Bottom-up parsing |
Popis: | Extended BNF grammars (EBNF) allow regular expressions in the right parts of their rules. They are widely used to define languages, and can be represented by recursive Transition Networks (TN) consisting of a set of finite-state machines. We present a novel direct construction of efficient shift-reduce ELR(1) parsers for TNs. We show that such a parser works deterministically if the TN is free from the classical shift-reduce and reduce–reduce conflicts of the LR(1) parsers, and from a new conflict type called convergence conflict. Such a novel condition for determinism is proved correct and is more general than those proposed in the past for EBNF grammars or TNs. Such ELR(1) parsers perform fewer shift moves than the equivalent LR(1) parsers. A simple optimization of the reduction moves is described. |
Databáze: | OpenAIRE |
Externí odkaz: |