计算机科学 > 形式语言与自动机理论
[提交于 2015年1月11日]
标题:Scanning and Parsing Languages with Ambiguities and Constraints: The Lamb and Fence Algorithms
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:Luis Quesada[v1] 2015年1月11日 星期日 15:11:15 UTC