Top "Antlr" questions

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.

Negating inside lexer- and parser rules

How can the negation meta-character, ~, be used in ANTLR's lexer- and parser rules?

antlr antlr3 parser-generator
Antlr Extraneous Input

I have a grammar file BoardFile.g4 that has (relevant parts only): grammar Board; //Tokens GADGET : 'squareBumper' | 'circleBumper' | 'triangleBumper' | 'leftFlipper' | …

java antlr antlr4
How to match a string, but case-insensitively?

Let's say that I want to match "beer", but don't care about case sensitivity. Currently I am defining a token …

antlr antlr3
How to Display ANTLR Tree GUI

How do you display the AST GUI if you have code like this, both of console or swing? My ANTLR …

java swing user-interface tree antlr
Extending simple ANTLR grammar to support input variables

I'm still on my quest for a really simple language and I know now that there are none. So I'm …

java antlr antlr3
Lexer/parser tools

Which lexer/parser generator is the best (easiest to use, fastest) for C or C++? I'm using flex and bison …

parsing antlr bison lexer flex-lexer
How do I get the original text that an antlr4 rule matched?

Using the Java 7 grammar https://github.com/antlr/grammars-v4/blob/master/java7/Java7.g4 I want to find methods with …

java antlr antlr4
Antlr IDE in Eclipse doesn't work

I'm using Antlr v3 and java for a project and all goes well in AntlrWorks, but when I switch to …

java eclipse antlr antlrv3ide
Visitor/Listener code for a while loop in ANTLR 4

So far i have searched the whole "The Definitive ANTLR 4 Reference" book as well as many sites for an answer …

java antlr antlr4
Token recognition error: antlr

I have an ANTLR 4 grammar: grammar Test; start : NonZeroDigit '.' Digit Digit? EOF ; DOT : '.' ; PLUS : '+' ; …

antlr grammar antlr4 lexer antlrworks2