[antlr-interest] problem with option, and double kot

jabon elekis at gmail.com
Sun Mar 30 07:31:18 PDT 2008


hi all,

I begun to use antlr (the main goal is to make a plugin eclipse with a 
new language).
but I have trouble with options.

exemple if I have a token like this

LPAREN:
options {paraphrase="'('";}
'(';
or even

tokens {
    PLUS     = "+";
}
I have lots of error
.
yaflplug.g:47:7: unexpected token: :
error(100): yaflplug__.g:47:7: syntax error: antlr: yaflplug__.g:47:7: 
unexpecte
d token: :

it's the same thing for begun options like

options {
k=2;
charVocabulary = '\3'..'\377';
}

C:\Program Files\eclipse>java -classpath "C:\Documents and 
Settings\elekis\works
pace\grammarTest\src"\antlrworks-1.1.7.jar org.antlr.Tool "C:\Documents 
and Sett
ings\elekis\workspace\grammarTest\src"\yaflplug.g
ANTLR Parser Generator  Version 3.0.1 (August 13, 2007)  1989-2007

error(100): C:\Documents and 
Settings\elekis\workspace\grammarTest\src\yaflplug.
g:5:22: syntax error: antlr: C:\Documents and 
Settings\elekis\workspace\grammarT
est\src\yaflplug.g:5:22: expecting SEMI, found '..'
error(133): C:\Documents and 
Settings\elekis\workspace\grammarTest\src\yaflplug.
g:3:1: illegal option charVocabulary
error(100): C:\Documents and 
Settings\elekis\workspace\grammarTest\src\yaflplug.
g:47:7: syntax error: antlr: C:\Documents and 
Settings\elekis\workspace\grammarT
est\src\yaflplug.g:47:7: unexpected token: :
error(100): yaflplug__.g:47:7: syntax error: antlr: yaflplug__.g:47:7: 
unexpecte
d token: :
warning(208): C:\Documents and 
Settings\elekis\workspace\grammarTest\src\yaflplu
g.g:55:1: The following token definitions are unreachable: STAR



any idea???

thanks

a++



More information about the antlr-interest mailing list