Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Five minute introduction to ANTLR 3

This is the home page for the ANTLR 3 space.

What is ANTLR 3?


To be written. Volunteers?

ANTLR 3 is the latest version of a language processing toolkit that was originally released in the late 19990s. As was the case then, this release of the ANTLR toolkit advances the state of the art with it's new LL(*) parsing engine. ANTLR (ANother Tool for Language Recognition) provides a framework for the generation of recognizers, compilers, and translators from grammatical descriptions. The generated code can be in Java, C#, Objective-C or C. The grammatical descriptions can optionally include action code written in the target language (i.e. Java, C#, Objective-C, C etc). In the future, support for additional languages such as C++, Ruby and Perl6 is expected.

What does ANTLR 3 do?


To be written. Volunteers?

Put simply, ANTLR 3 is a tool for generating language processing tools. To this end, it is commonly categorised as a compiler generator or compiler compiler in the tradition of tools such as Lex/Flex and Yacc/Bison). Given the grammatical description of a langauge, ANTLR can generate the source code for various tools that can processing and transform input in that language. The basic types of language processing tools that ANTLR can generates are Lexer, Parsers and TreeParsers.

Why should I use ANTLR 3?


To be written. Volunteers?

Because it can you time and resources. It is a well established fact that generative tools such as compiler compilers have a major impact on productivity. In addition, ANTLR v3's improved analysis engine, it's significantly enhanced parsing strength via LL(*) parsing with arbitrary lookahead, it's vastly improved tree construction rewrite rules and the availability of the simply fantastic AntlrWorks IDE offers productivity benefits above other comparable language tools toolkits.

How do I use ANTLR 3?

1. Get ANTLR V3 and the wonderful AntlrWorks IDE

Download and install ANTLR 3 from the V3 page of the ANTLR website

Download and AntlrWorks from the AntlrWorks page of the ANTLR website

2. Learn basic ANTLR 3 syntax


To be written. Volunteers?

Java

lexer grammar MyLangLexer;

@header
{
    package antlr3.tutorial.mylang;
}

OR : '||' ;

3. Build and use a basic ANTLR 3 grammar


To be written. Volunteers?

Java

grammar Simple;

C#

grammar Simple;

options
{
   language=CSharp;
}

Objective-C

grammar Simple;

options
{
   language=ObjC;
}

4. Build and use a more complex ANTLR 3 grammar from the examples-v3 distribution


To be written. Volunteers?

What next?

Read the Antlr 3 Documentation

Browse the list of questions frequently asked about ANTLR 3

Your five minutes are up!

  • No labels