Home arrow Tech Briefs arrow Software arrow ANTLR Tree Grammar Generator and Extensions
ANTLR Tree Grammar Generator and Extensions Print E-mail
NASA’s Jet Propulsion Laboratory   
Aug 31 2005
advertisement:
A computer program implements two extensions of ANTLR (Another Tool for Language Recognition), which is a set of software tools for translating source codes between different computing languages. ANTLR supports predicated-LL(k) lexer and parser grammars, a notation for annotating parser grammars to direct tree construction, and predicated tree grammars. [“LL(k)” signifies “left-right, leftmost derivation with k tokens of look-ahead,” referring to certain characteristics of a grammar.] One of the extensions is a syntax for tree transformations. The other extension is the generation of tree grammars from annotated parser or input tree grammars. These extensions can simplify the process of generating source-to-source language translators and they make possible an approach, called “polyphase parsing,” to translation between computing languages. The typical approach to translator development is to identify high-level semantic constructs such as “expressions,” “declarations,” and “definitions” as fundamental building blocks in the grammar specification used for language recognition. The polyphase approach is to lump ambiguous syntactic constructs during parsing and then disambiguate the alternatives in subsequent tree transformation passes. Polyphase parsing is believed to be useful for generating efficient recognizers for C++ and other languages that, like C++, have significant ambiguities.

This program was written by Loring Craymer of Caltech for NASA’s Jet Propulsion Laboratory. For further information, access the Technical Support Package (TSP) free on-line at www.techbriefs.com/tsp under the Software category.

This software is available for commercial licensing. Please contact Karina Edmonds of the California Institute of Technology at (818) 393-2827. Refer to NPO-30565.

This Brief includes a Technical Support Package (TSP).

ANTLR Tree Grammar Generator and Extensions (reference NPO-30565) is currently available for download from the TSP library.

Login first to download.










 


 

Dedicated to helping you design better products in a digital world... your guide to the latest tools & techniques for digital prototyping, simulation, and analysis of the real-world performance of your ideas.

Visit the Digital Design Center

>> Most Searched

>> Newsletter

Subscribe today to receive the INSIDER, a FREE e-mail newsletter from NASA Tech Briefs featuring exclusive previews of upcoming articles, late breaking NASA and industry news, hot products and design ideas, links to online resources, and much more.

Your name:

Your email:

Please Subscribe me to the Insider