arXiv · 1501.02795
Scanning and Parsing Languages with Ambiguities and Constraints: The Lamb and Fence Algorithms
Abstract
Traditional language processing tools constrain language designers to specific kinds of grammars. In contrast, model-based language processing tools decouple language design from language processing. These tools allow the occurrence of lexical and syntactic ambiguities in language specifications and the declarative specification of constraints for resolving them. As a result, these techniques require scanners and parsers able to parse context-free grammars, handle ambiguities, and enforce constraints for disambiguation. In this paper, we present Lamb and Fence. Lamb is a scanning algorithm that supports ambiguous token definitions and the specification of custom pattern matchers and constraints. Fence is a chart parsing algorithm that supports ambiguous context-free grammars and the definition of constraints on associativity, composition, and precedence, as well as custom constraints. Lamb and Fence, in conjunction, enable the implementation of the ModelCC model-based language processing tool.
Explore related subjects
Keep this discovery
Luis Quesada, Fernando Berzal, Francisco J. Cortijo. 2015-01-11. Scanning and Parsing Languages with Ambiguities and Constraints: The Lamb and Fence Algorithms. https://arxiv.org/abs/1501.02795
Cite the original work for its findings. Save a collection to share your selection of sources.