Expressing disambiguation filters as combinators

Contrarily to most conventional programming languages where certain symbols are used so as to create non-ambiguous grammars, most recent programming languages allow ambiguity. These ambiguities are solved using disambiguation rules, which dictate how the software that parses these languages should b...

Full description

Bibliographic Details
Main Author: Macedo, José Nuno (author)
Other Authors: Saraiva, João (author)
Format: conferencePaper
Language:eng
Published: 2020
Subjects:
Online Access:http://hdl.handle.net/1822/68616
Country:Portugal
Oai:oai:repositorium.sdum.uminho.pt:1822/68616
Description
Summary:Contrarily to most conventional programming languages where certain symbols are used so as to create non-ambiguous grammars, most recent programming languages allow ambiguity. These ambiguities are solved using disambiguation rules, which dictate how the software that parses these languages should behave when faced with ambiguities. Such rules are highly efficient but come with some limitations - they cannot be further modified, their behaviour is hidden, and changing them implies re-building a parser. We propose a different approach for disambiguation. A set of disambiguation filters (expressed as combinators) are provided, and disambiguation can be achieved by composing combinators. New combinators can be created and, by having the disambiguation step separated from the parsing step, disambiguation rules can be changed without modifying the parser.