Context Aware Scanning: Specification, Implementation, and Applications

Loading...
Thumbnail Image

View/Download File

Persistent link to this item

Statistics
View Statistics

Journal Title

Journal ISSN

Volume Title

Title

Context Aware Scanning: Specification, Implementation, and Applications

Alternative title

Published Date

2007-04-25

Publisher

Type

Report

Abstract

This report introduces new parsing and context-aware scanning algorithms in which the scanner uses contextual information to disambiguate lexical syntax. The parser utilizes a slightly modified LR-style algorithm that passes to the scanner the set of valid symbols which the scanner may return at that point in parsing. This set is the terminal symbols that are valid for the current state, i.e., those whose entry in the parse table are shift, reduce, or accept, but not error. The scanner then only returns tokens in this set. Also, 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. We illustrate this approach with a declarative specification of a Java subset and extensions that embed SQL queries and Boolean expression tables into Java. An updated version of this paper has been published in GPCE 2007. This version can be found at http://www.cs.umn.edu/~evw/papers.

Keywords

Description

Related to

Replaces

License

Series/Report Number

Technical Report; 07-012

Funding information

Isbn identifier

Doi identifier

Previously Published Citation

Other identifiers

Suggested citation

Van Wyk, Eric; Schwerdfeger, August. (2007). Context Aware Scanning: Specification, Implementation, and Applications. Retrieved from the University Digital Conservancy, https://hdl.handle.net/11299/215726.

Content distributed via the University Digital Conservancy may be subject to additional license and use restrictions applied by the depositor. By using these files, users agree to the Terms of Use. Materials in the UDC may contain content that is disturbing and/or harmful. For more information, please see our statement on harmful content in digital repositories.