[antlr-interest] Bison-> Antlr 3 help
Mike Aubury
antlr at aubit.com
Thu Oct 19 06:16:42 PDT 2006
I'm trying to convert some bison grammar to work with Antlr and could do with
some pointers on what needs to be done next...
I'm getting lots of output like :
fgl_v3.g:164:12: Decision can match input such as "NAMED OPEN_BRACKET"
using
multiple alternatives: 4, 5
As a result, alternative(s) 5 were disabled for that input
fgl_v3.g:285:2: Decision can match input such as "AFTCONSTRUCT" using
multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
fgl_v3.g:285:2: Decision can match input such as "KW_ON" using
multiple
alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
fgl_v3.g:285:2: Decision can match input such as "BEFCONSTRUCT" using
multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
fgl_v3.g:285:2: Decision can match input such as "ON_ANY_KEY" using
multiple
alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
.
.
.
fgl_v3.g:1959:31: ANTLR could not analyze this decision in rule
message_cmd;
often this is because of recursive rule references visible from the
left edge
of alternatives. ANTLR will re-analyze the decision with a fixed
lookahead
of k=1. Consider using "options {k=1;}" for that decision and
possibly
adding a syntactic predicate.
Any help gratefully received!
Grammar is here : http:/www.aubit.com/fgl_v3.g
FWIW - The 'end game' is to end up with some some of tree I can walk down to
generate
my code rather than the current "generate as I parse" bison stuff...
--
Mike Aubury
More information about the antlr-interest
mailing list