2007 · 82 citations · 13 references
ComputingComputer ScienceNatural Language ProcessingProgramming LanguagesSyntaxParsingQuery ProcessingStructured Query LanguageSyntactic AnalysisSyntactic ParsingSyntax ParsingEmbedded Domain-specific LanguagesLanguage ParsingLanguage SyntaxParser DesignParsing Algorithms
This paper introduces new parsing and context-aware scanning algorithms in which the scanner uses contextual information to disambiguate lexical syntax. The parser uses a slightly modified LR-style algorithm that passes to the scanner the set of valid symbols that the scanner may return at that point in parsing. This set is those terminals whose entries in the parse table for the current parse state are shift, reduce, or accept, but not error. The scanner then only returns tokens in this set. An analysis is given that can statically verify that the scanner will never return more than one token for a single input. Context-aware scanning is especially useful when parsing and scanning extensible languages in which domain specific languages can be embedded. It has been used in extensible versions of Java 1.4 and ANSI C. We illustrate this approach with a declarative specification of a subset of Java and extensions that embed SQL queries and Boolean expression tables into Java.
13
On the translation of languages from left to right
Donald E. Knuth · Information and Control · 1965 · 792 citations
Bryan Ford · 2004 · 409 citations
Computing, Computer Science, Natural Language Processing +16
Silver: An extensible attribute grammar system
Eric Van Wyk, Derek Bodin, Jimin Gao et al. · Science of Computer Programming · 2009 · 164 citations
Scannerless Generalized-LR Parsing
Eelco Visser · 1997 · 137 citations
Better extensibility through modular syntax
Robert Grimm · ACM SIGPLAN Notices · 2006 · 128 citations
Computing, Computer Science, Natural Language Processing +16