[antlr-interest] Intermitent bug with ANTLR.

mzukowski at yci.com mzukowski at yci.com
Thu Jan 29 09:36:50 PST 2004


To continue on the theme of the week, try building with -trace and then
running.  I'd be curious to see the difference between success & failure.

Monty

-----Original Message-----
From: Daniel Shane [mailto:lachinois at hotmail.com] 
Sent: Wednesday, January 28, 2004 11:49 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Intermitent bug with ANTLR.

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/xpa
1_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/xpa
1_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/xpa
1_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/xpa
1_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/xpa
1_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/ 


 

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