ack. more cleanup work will be required for change of token types from 3..n to 1..n
This commit is contained in:
parent
8481979f69
commit
5a2fe297e3
|
@ -123,8 +123,8 @@ public <if(parser.abstractRecognizer)>abstract <endif>class <parser.name> extend
|
|||
<parser.tokens:{k | <k>=<parser.tokens.(k)>}; separator=", ", wrap, anchor>;
|
||||
<endif>
|
||||
public static final String[] tokenNames = {
|
||||
"\<INVALID>", "\<INVALID>", "\<INVALID>",
|
||||
<parser.tokenNames:{t | <t>}; separator=", ", wrap, anchor>
|
||||
"\<INVALID>",
|
||||
<parser.tokenNames:{t | <t>}; separator=", ", wrap, anchor>
|
||||
};
|
||||
public static final int
|
||||
<parser.rules:{r | RULE_<r.name> = <r.index>}; separator=", ", wrap, anchor>;
|
||||
|
@ -723,7 +723,7 @@ public <if(lexer.abstractRecognizer)>abstract <endif>class <lexer.name> extends
|
|||
};
|
||||
|
||||
public static final String[] tokenNames = {
|
||||
"\<INVALID>", "\<INVALID>", "\<INVALID>",
|
||||
"\<INVALID>",
|
||||
<lexer.tokenNames:{t | <t>}; separator=", ", wrap, anchor>
|
||||
};
|
||||
public static final String[] ruleNames = {
|
||||
|
|
|
@ -80,7 +80,7 @@ public class TestATNInterpreter extends BaseTest {
|
|||
errorTokenType = re.getOffendingToken().getType();
|
||||
}
|
||||
assertEquals(1, errorIndex);
|
||||
assertEquals(errorTokenType, 5);
|
||||
assertEquals(3, errorTokenType);
|
||||
}
|
||||
|
||||
@Test public void testMustTrackPreviousGoodAlt2() throws Exception {
|
||||
|
@ -106,7 +106,7 @@ public class TestATNInterpreter extends BaseTest {
|
|||
errorTokenType = re.getOffendingToken().getType();
|
||||
}
|
||||
assertEquals(2, errorIndex);
|
||||
assertEquals(errorTokenType, 6);
|
||||
assertEquals(4, errorTokenType);
|
||||
}
|
||||
|
||||
@Test public void testMustTrackPreviousGoodAlt3() throws Exception {
|
||||
|
@ -129,7 +129,7 @@ public class TestATNInterpreter extends BaseTest {
|
|||
errorTokenType = re.getOffendingToken().getType();
|
||||
}
|
||||
assertEquals(2, errorIndex);
|
||||
assertEquals(errorTokenType, 6);
|
||||
assertEquals(4, errorTokenType);
|
||||
}
|
||||
|
||||
@Test public void testAmbigAltChooseFirst() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue