[antlr-interest] Intermitent bug with ANTLR.
Daniel Shane
lachinois at hotmail.com
Wed Jan 28 11:49:03 PST 2004
Hi everyone, mostly Terence.
I will greatly need your help on this one. I have a grammar (that uses XPA)
and, listen to this, I sometimes get a grammar error, and sometimes not by
executing the same command line with the same input.
Here is what happens:
$ java -cp
"/usr/local/soft/antlr-2.7.2/lib/antlr.jar:/usr/local/soft/xpa-1.0.1/lib/xpa1_0_1-full.jar:.:Code"
MainRegulationParser tmp/Fr/C.R.C.,_c._100.06-MTE.html > /tmp/g
$ java -cp
"/usr/local/soft/antlr-2.7.2/lib/antlr.jar:/usr/local/soft/xpa-1.0.1/lib/xpa1_0_1-full.jar:.:Code"
MainRegulationParser tmp/Fr/C.R.C.,_c._100.06-MTE.html > /tmp/g
$ java -cp
"/usr/local/soft/antlr-2.7.2/lib/antlr.jar:/usr/local/soft/xpa-1.0.1/lib/xpa1_0_1-full.jar:.:Code"
MainRegulationParser tmp/Fr/C.R.C.,_c._100.06-MTE.html > /tmp/g
$ java -cp
"/usr/local/soft/antlr-2.7.2/lib/antlr.jar:/usr/local/soft/xpa-1.0.1/lib/xpa1_0_1-full.jar:.:Code"
MainRegulationParser tmp/Fr/C.R.C.,_c._100.06-MTE.html > /tmp/g
line 3: expecting "<IdOfRegulation>", found 'TitleOfAct'
$ java -cp
"/usr/local/soft/antlr-2.7.2/lib/antlr.jar:/usr/local/soft/xpa-1.0.1/lib/xpa1_0_1-full.jar:.:Code"
MainRegulationParser tmp/Fr/C.R.C.,_c._100.06-MTE.html > /tmp/g
$
These invocation were done in sequence and the input file has not changed
between invocations. I printed some debug out of ANTLR to show the sequence
of tokens that have been read and in both cases the token sequence is the
same.
Something is happening in ANTLR that is causing it to take a different path
for what seems like a random reason.
This is really causing me a headache, and I can trace the problem to one
rule I added in the grammar. If I remove this rule, then I do not get this
strange behavior (BTW, the rule is simple, so I'm not doing anything tricky
here). I really cannot see why this additionnal rule would break anything
and specially not like this.
I really out of clues here, what would you like me to do to give you some
additionnal information? Do you want the java files/grammar so that you can
run it on your setup see if it does the same? Would you like an ssh access
to this linux machine to see for yourself? Do you think the bug arrises from
XPA?
I'm running on Linux, RedHat 9 with the SUN JDK 1.4.2 for linux.
Daniel Shane
_________________________________________________________________
MSN Search, le moteur de recherche qui pense comme vous !
http://fr.ca.search.msn.com/
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list