The Definitive ANTLR Reference: Building Domain-Specific Languages (Pragmatic Programmers)

The Definitive ANTLR Reference: Building Domain-Specific Languages (Pragmatic Programmers)

Terence Parr

ANTLR v3 is the main strong, easy-to-use parser generator equipped up to now, and represents the fruits of greater than 15 years of study by way of Terence Parr. This booklet is the fundamental reference advisor to utilizing this thoroughly rebuilt model of ANTLR, with its impressive new LL() parsing know-how, tree building amenities, StringTemplate code new release template engine, and complicated ANTLRWorks GUI improvement atmosphere. learn how to use ANTLR without delay from the author!

ANTLR is a parser generator-a application that generates code to translate a special enter language right into a great, tidy information constitution. you could imagine that parser turbines are just used to construct compilers. yet in reality, programmers frequently use parser turbines to construct translators and interpreters for domain-specific languages resembling proprietary information codecs, universal community protocols, textual content processing languages, and domain-specific programming languages.

Domain-specific languages are very important to software program improvement simply because they characterize a extra traditional, excessive constancy, strong, and maintainable technique of encoding an issue than just writing software program in a general-purpose language. for instance, NASA makes use of domain-specific command languages for area missions to enhance reliability, lessen possibility, decrease fee, and elevate the rate of improvement. Even the 1st Apollo advice regulate computing device from the Nineteen Sixties used a domain-specific language that supported vector computations.

This booklet is the definitive consultant to utilizing the thoroughly rebuilt ANTLR v3 and describes all beneficial properties intimately, together with the superb new LL(

) parsing expertise, tree development amenities, StringTemplate code iteration template engine, and complex ANTLRWorks GUI improvement setting. you are going to research all approximately ANTLR grammar syntax, resolving grammar ambiguities, parser fault tolerance and mistake reporting, embedding activities to interpret or translate languages, construction intermediate-form timber, extracting details from bushes, producing resource code, and the way to exploit the ANTLR Java API.

Show sample text content

Download sample