[antlr-interest] ANTLR 3.1.1 test failures
Hartmuth Gutsche
hgutsche at storm.ca
Thu Oct 2 19:38:30 PDT 2008
Definitely such a kind of problem. One of the cases I am looking at is the
following:
...
public void testRuleLabelOnTwoDifferentRulesAST() throws Exception {
String grammar =
"grammar T;\n"+
"options {output=AST;}\n"+
"s : x+=a x+=b {System.out.println($x);} ;" +
"a : 'a';\n"+
"b : 'b';\n"+
"WS : (' '|'\n') {skip();};\n";
...
and what I find generated for mWS() in the lexer TLexer.java is:
...
switch (alt1) {
case 1 :
// C:\\DOCUME~1\\HARTMU~1\\LOCALS~1\\Temp\\antlr-1222999104471\\T.g:5:7: ' '
{
match(' ');
}
break;
case 2 :
// C:\\DOCUME~1\\HARTMU~1\\LOCALS~1\\Temp\\antlr-1222999104471\\T.g:5:11:
'\r\n'
{
match(" <<<<<<<-------
"); <<<<<<<-------
}
break;
...
The "broken call" to match is of course what javac complains about with all
its consequences.
Any idea how to make that "unhappen"?
I still think is has something to-do with my environment setup I just don't
know what to look for.
Which environmental settings could possibly affect the generated code in the
above way?
Hartmuth
----- Original Message -----
From: "Terence Parr" <parrt at cs.usfca.edu>
To: "Hartmuth Gutsche" <hgutsche at storm.ca>
Cc: <antlr-interest at antlr.org>
Sent: Thursday, October 02, 2008 2:44 PM
Subject: Re: [antlr-interest] ANTLR 3.1.1 test failures
On Oct 2, 2008, at 11:02 AM, Hartmuth Gutsche wrote:
> I am trying to run the tests under “org.antlr.test” and get 503
> failures
> out of 1095 tests. Are they supposed to pass without failure?
>
> I see this in two different Windows environments.
Mostly likely \n and \r issue.
T
More information about the antlr-interest
mailing list