[antlr-interest] bug: bison/yacc converter won't parse

Mark Whitis whitis at freelabs.com
Sat Dec 29 21:44:48 PST 2007


I tried to build the bison/yacc to antlr converter but antlr chokes
on the grammar files even though I am using the version of antlr
it was supposedly written for.   The distribution contains
no makefile, just ambiguous instructions to run antlr on the
two grammars and then compile with Main.java.

wget http://www.antlr.org/share/1151380794488/bison.zip
unzip bison.zip
cd bison

runantlr bison.g
Running java antlr.Tool $* with /usr/share/java/antlr.jar appended to the 
CLASSPATH variable
ANTLR Parser Generator   Version 2.7.6 (20071129)   1989-2005
bison.g:191:17: rule classDef trapped:
bison.g:191:17: unexpected token: ^
error: aborting grammar 'BisonParser' due to errors
Exiting due to errors.

runantlr BisonParserTree.g
Running java antlr.Tool $* with /usr/share/java/antlr.jar appended to the 
CLASSPATH variable
ANTLR Parser Generator   Version 2.7.6 (20071129)   1989-2005
BisonParserTree.g:42:13: Treewalkers only support k=1
panic: Cannot find importVocab file 'BisonTokenTypes.txt'




More information about the antlr-interest mailing list