• Stars
    star
    241
  • Rank 167,643 (Top 4 %)
  • Language
    Java
  • Created almost 13 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

antlr v3 repository (pulled from p4 with history from //depot/code/antlr/antlr3-main
ANTLR v3.5.3
April 9, 2022

Terence Parr
ANTLR project lead and supreme dictator for life
University of San Francisco

INTRODUCTION

Welcome to ANTLR v3!  ANTLR (ANother Tool for Language Recognition) is
a language tool that provides a framework for constructing
recognizers, interpreters, compilers, and translators from grammatical
descriptions containing actions in a variety of target
languages. ANTLR provides excellent support for tree construction,
tree walking, translation, error recovery, and error reporting. I've
been working on parser generators for 25 years and on this particular
version of ANTLR for 9 years.

You should use v3 in conjunction with ANTLRWorks:

    http://www.antlr3.org/works/

and gUnit (grammar unit testing tool included in distribution):

    http://theantlrguy.atlassian.net/wiki/display/ANTLR3/gUnit+-+Grammar+Unit+Testing

The book will also help you a great deal (printed May 15, 2007); you
can also buy the PDF:

    http://www.pragmaticprogrammer.com/titles/tpantlr/index.html

2nd book, Language Implementation Patterns:

    http://pragprog.com/titles/tpdsl/language-implementation-patterns

See the getting started document:

    http://theantlrguy.atlassian.net/wiki/display/ANTLR3/FAQ+-+Getting+Started

You also have the examples plus the source to guide you.

See the wiki FAQ:

    http://theantlrguy.atlassian.net/wiki/display/ANTLR3/ANTLR+v3+FAQ

and general doc root:

    http://theantlrguy.atlassian.net/wiki/display/ANTLR3/ANTLR+3+Wiki+Home

Please help add/update FAQ entries.

If all else fails, you can buy support or ask the antlr-interest list:

    http://www.antlr.org/support.html

Per the license in LICENSE.txt, this software is not guaranteed to
work and might even destroy all life on this planet:

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

----------------------------------------------------------------------

EXAMPLES

ANTLR v3 sample grammars:

    https://github.com/antlr/examples-v3

Examples from Language Implementation Patterns:

    http://www.pragprog.com/titles/tpdsl/source_code

----------------------------------------------------------------------

What is ANTLR?

ANTLR stands for (AN)other (T)ool for (L)anguage (R)ecognition
and generates LL(*) recursive-descent parsers. ANTLR is a language tool
that provides a framework for constructing recognizers, compilers, and
translators from grammatical descriptions containing actions.
Target language list:

http://theantlrguy.atlassian.net/wiki/display/ANTLR3/Code+Generation+Targets

----------------------------------------------------------------------

How is ANTLR v3 different than ANTLR v2?

See "What is the difference between ANTLR v2 and v3?"

    http://theantlrguy.atlassian.net/wiki/pages/viewpage.action?pageId=2687279

See migration guide:

    http://theantlrguy.atlassian.net/wiki/display/ANTLR3/Migrating+from+ANTLR+2+to+ANTLR+3

----------------------------------------------------------------------

How do I install this damn thing?

You will have grabbed either of these:

    http://www.antlr3.org/download/antlr-3.5.3-complete-no-st3.jar
    http://www.antlr3.org/download/antlr-3.5.3-complete.jar

It has all of the jars you need combined into one. Then you need to
add antlr-3.5.3-complete.jar to your CLASSPATH or add to arg list; e.g., on unix:

$ java -cp "/usr/local/lib/antlr-3.5.3-complete.jar:$CLASSPATH" org.antlr.Tool Test.g

Source + java binaries: Just untar antlr-3.5.3.tar.gz and you'll get:

antlr-3.5.3/BUILD.txt
antlr-3.5.3/antlr3-maven-plugin
antlr-3.5.3/antlrjar.xml
antlr-3.5.3/antlrsources.xml
antlr-3.5.3/gunit
antlr-3.5.3/gunit-maven-plugin
antlr-3.5.3/pom.xml
antlr-3.5/runtime
antlr-3.5.3/tool
antlr-3.5.3/lib

Please see the FAQ

    http://theantlrguy.atlassian.net/wiki/display/ANTLR3/ANTLR+v3+FAQ

-------------------------

How can I contribute to ANTLR v3?

http://theantlrguy.atlassian.net/wiki/pages/viewpage.action?pageId=2687297

More Repositories

1

antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
Java
17,043
star
2

grammars-v4

Grammars written for ANTLR v4; expectation that the grammars are free of actions.
ANTLR
10,114
star
3

stringtemplate4

StringTemplate 4
Java
943
star
4

intellij-plugin-v4

An IntelliJ plugin for ANTLR v4
Java
467
star
5

codebuff

Language-agnostic pretty-printing through machine learning (uh, like, is this possible? YES, apparently).
Java
440
star
6

antlrcs

The C# port of ANTLR 3, StringTemplate 3, and StringTemplate 4
C#
281
star
7

antlr4-intellij-adaptor

A library to support the use of ANTLR grammars in jetbrains IDE plugins for building custom languages.
Java
209
star
8

jetbrains-plugin-sample

A sample plugin for jetbrains IDEs that uses an ANTLR grammar for a nontrivial custom language.
Java
118
star
9

antlrworks

AntlrWorks tool for ANTLR
Java
97
star
10

antlr4-tools

Tools to run antlr4 w/o needing to install java or antlr4!
Python
83
star
11

antlr-php-runtime

PHP Runtime for ANTLR4
PHP
81
star
12

antlr4-cpp

C++ target for ANTLR 4, including templates and runtime
C++
75
star
13

examples-v3

Java
59
star
14

antlr5

Java
52
star
15

symtab

Generic symbol table for lexically/statically scoped languages
Java
48
star
16

Antlr4Formatter

Formatter for ANTLR 4 grammars
ANTLR
40
star
17

antlr4-lab

A client/server for trying out and learning about ANTLR
Java
35
star
18

grammars-v3

Grammars written for ANTLR v3; expectation that the grammars are free of actions but it's not a hard and fast rule. there is no common license!
GAP
24
star
19

jetbrains-plugin-st4

An intellij/jetbrains plugin for StringTemplate .st and .stg files
Java
23
star
20

antlr4test-maven-plugin

A maven plugin used to test the grammars-v4 repo grammars
Java
17
star
21

stringtemplate3

StringTemplate v3
Java
15
star
22

website-antlr3

The ANTLR 3 Website
HTML
13
star
23

website-antlr4

The ANTLR 4 Website
HTML
11
star
24

antlr-php-runtime-phpstan

Static analysis for ANTLR4 PHP Runtime.
PHP
6
star
25

antlr5-specs

Specs for antlr5
4
star
26

grammars-v5

3
star
27

_grammar-test

Historical files from grammars-v4 repo
Java
2
star
28

performance

Test the performance of ANTLR parsers (initially just Java target)
Java
2
star
29

website-antlr2

The ANTLR 2 Website
Java
1
star
30

website-st4

stringtemplate.org content
HTML
1
star
31

antlr5-lab

TypeScript
1
star