Questions tagged [antlrv3ide]

An eclipse plugin for ANTLRv3 grammars.

An eclipse plugin for ANTLRv3 grammars.

Features:

  • Support ANTLR 3.0.x/3.1.x/3.2.x
  • ANTLR Launcher and Debugger(Java only)
  • ANTLR Built-in Interpreter
  • Source Formatter (Ctrl+Shift+F)
  • Railroad Diagrams
  • Custom targets
  • Automatically (on save) generate resources
  • Problem markers for errors and warnings in grammar files
  • Advanced text editor, code selection (F3) and code completion (Ctrl+Space)
  • Simple syntax highlighting for target language (Java, C#, Python, C, etc.)
  • Mark generated resources as derived
  • Advanced StringTemplate Editor (*.st and .stg) Advanced gUnit Editor (.gunit and *.testsuite)

http://antlrv3ide.sourceforge.net

19 questions
9
votes
1 answer

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 Antlr IDE, the plugin for eclipse, the interpreter cannot match the sentence that I wrote, telling me mismatch. And it seems to me that it cannot…
darkjh
  • 2,821
  • 7
  • 35
  • 43
8
votes
1 answer

Parser and Lexer Files Not Auto Generated by Eclipse

I'm using the antlr-3.4-complete-no-antlrv2.jar version of ANTLR on Eclipse Indigo. I have installed the ANTLR IDE plugin along with ZEST and GEF. When I generate a combined grammar file and add a header, lexer header and a rule, Eclipse doesn't…
c12
  • 9,557
  • 48
  • 157
  • 253
5
votes
1 answer

ANTLR - allow any char between to keywords

I'd like to define a grammar for a simple language. The language allows some sort of assignments. Example keyworda: this is the 1 keyword-A keywordb: this is the second keywordb ... The thing is, that after the keyword and the ':' any char should…
Alexander
  • 7,178
  • 8
  • 45
  • 75
4
votes
3 answers

ANTLR Interpreter running error

When i run the interpreter as follows, to create parse tree in ANTLR 3.4(in eclipse 3.7) it shows, An internal error occurred during: "ANTLR Event Listener". For input string: "false" When I run the second option Debug(Java) it doesn't give…
DarRay
  • 2,550
  • 6
  • 27
  • 39
3
votes
1 answer

ANTLR is not reporting an error when evaluating a string that does not fits my grammar definition

This is the first time I am working with ANTLR for a project at Imperial College London and until now it has been really useful. I have already defined a simple recursive grammar as follows grammar Hello; execution: workflow; workflow :…
user3723800
  • 145
  • 7
2
votes
1 answer

Why two ANLTR parsers interpret the same string differently?

I have the following ANTLR grammar: grammar Tasks; options { language = Java; } tokens { TODO = 'TODO'; } plan : block; block: '(' TODO ( TODO | block )* ')'; WS : ( ' ' | '\t' | '\r' | '\n' | '\v' ) { $channel = HIDDEN; } ; I and the…
dzieciou
  • 4,049
  • 8
  • 41
  • 85
2
votes
1 answer

antlr reading grammar tokens from file

I want to parse the sentence "i am looking for a java developer". The output I need is language=java. I created a grammar file as follows. grammar Job; eval returns [String value] : output=jobExp { $value = $output.text;} ; jobExp…
din_oops
  • 698
  • 1
  • 9
  • 27
2
votes
1 answer

cannot debug simple channel flag in ANTLR with Eclipse

I following the antlr tutorial and write exactly same code as tutorial says .but when I try to add $channel = HIDDEN; it keep give me error like Multiple markers: -(100): syntax error: antlr: MissingTokenException(inserted [@-1,0:0='
Yank
  • 718
  • 6
  • 17
1
vote
1 answer

define a terminal called 'message' to handle "\n" , nightmare ..

i use a definition so called message : '"'.* '"'; that represents every little thing inside " " is message , terminals it works well with "lkjaldjfa kajf " something common but when i met "\n" it turns to a nightmare -- which cause infinitive…
Yank
  • 718
  • 6
  • 17
1
vote
1 answer

only char 'a' cannot be recognized in ANTLR grammar

identification for ID : ID : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')* ; when I parse my rules it , only char 'a' cannot be recognised ,but 'A' or 'aa' or 'a0' or 'b' or 'c' or 'AAAZzzzxx' or .... everything else in…
Yank
  • 718
  • 6
  • 17
1
vote
1 answer

antlr3ide generates parsers and lexers without package info?

antlr3ide seems to generate parser and lexer files without the package info where the java files are located (such as package tour.trees;, here the relative path folder tour/trees contains the corresponding files ExprParser.java and…
Hongxu Chen
  • 5,240
  • 2
  • 45
  • 85
1
vote
1 answer

Eclipse Antlr Interpreter failure

The following grammar successfully generates a parser for treating the string 'ccdunion'. But when I try with the interpreter, I have NoViableAltException error, why? grammar SimpleCalc; options { k = 2; output = AST; backtrack =…
moueza
  • 69
  • 1
  • 7
0
votes
0 answers

ANTLR grammar error: The following alternatives can never be matched

I'm trying to built C-- compiler using ANTLR 3.4. For the grammar for a function I wrote fundeclaration : typespecifier ID OPENP params CLOSEP compoundstmt ; typespecifier : INT | VOID ; params …
DarRay
  • 2,550
  • 6
  • 27
  • 39
0
votes
1 answer

how to create token file from grammar file in antlr

I am creating a DSL using antlr. Lexer and Parser are written in one grammar file(say layout.g). Tree grammar is written in another grammar file (say layoutTree.g). Now Tree parser is not properly parsing. I printed the AST output from parser, and…
hnm
  • 789
  • 2
  • 9
  • 24
0
votes
1 answer

ANTLR3 String Literals and Disallowing Nested Comments

I've recently been tasked with writing an ANTLR3 grammar for a fictional language. Everything else seems fine, but I've a couple of minor issues which I could do with some help with: 1) Comments are between '/*' and '*/', and may not be nested. I…
1
2