[antlr-interest] Why is ANTLR getting lost?
Jon Schewe
jpschewe at mtu.net
Wed Feb 20 04:32:46 PST 2008
I've figured out that ANTLR is dying in the DFA when it's trying to
determine which branch of the constraintDecl rule to follow. Attached
is the grammar, suggestions on how to resolve this are very welcome.
Test case is here:
/**
* @throws RecognitionException
*/
@Test
public void testConstraintDecl0() throws RecognitionException {
final String data = "constraint3: 5.0 <= 6 + 6 * a[1 + 3] * c - 1 <=
10.0;";
final GHOCESLexer lexer = new GHOCESLexer(new ANTLRStringStream(data));
final CommonTokenStream tokens = new CommonTokenStream(lexer);
final GHOCESParser parser = new GHOCESParser(tokens);
final GHOCESParser.constraintDecl_return r = parser.constraintDecl();
Assert.assertNotNull(r);
}
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: GHOCES.g
Url: http://www.antlr.org/pipermail/antlr-interest/attachments/20080220/51edd6a9/attachment.pl
More information about the antlr-interest
mailing list