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,7 +123,7 @@ public <if(parser.abstractRecognizer)>abstract <endif>class <parser.name> extend
|
||||||
<parser.tokens:{k | <k>=<parser.tokens.(k)>}; separator=", ", wrap, anchor>;
|
<parser.tokens:{k | <k>=<parser.tokens.(k)>}; separator=", ", wrap, anchor>;
|
||||||
<endif>
|
<endif>
|
||||||
public static final String[] tokenNames = {
|
public static final String[] tokenNames = {
|
||||||
"\<INVALID>", "\<INVALID>", "\<INVALID>",
|
"\<INVALID>",
|
||||||
<parser.tokenNames:{t | <t>}; separator=", ", wrap, anchor>
|
<parser.tokenNames:{t | <t>}; separator=", ", wrap, anchor>
|
||||||
};
|
};
|
||||||
public static final int
|
public static final int
|
||||||
|
@ -723,7 +723,7 @@ public <if(lexer.abstractRecognizer)>abstract <endif>class <lexer.name> extends
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final String[] tokenNames = {
|
public static final String[] tokenNames = {
|
||||||
"\<INVALID>", "\<INVALID>", "\<INVALID>",
|
"\<INVALID>",
|
||||||
<lexer.tokenNames:{t | <t>}; separator=", ", wrap, anchor>
|
<lexer.tokenNames:{t | <t>}; separator=", ", wrap, anchor>
|
||||||
};
|
};
|
||||||
public static final String[] ruleNames = {
|
public static final String[] ruleNames = {
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class TestATNInterpreter extends BaseTest {
|
||||||
errorTokenType = re.getOffendingToken().getType();
|
errorTokenType = re.getOffendingToken().getType();
|
||||||
}
|
}
|
||||||
assertEquals(1, errorIndex);
|
assertEquals(1, errorIndex);
|
||||||
assertEquals(errorTokenType, 5);
|
assertEquals(3, errorTokenType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test public void testMustTrackPreviousGoodAlt2() throws Exception {
|
@Test public void testMustTrackPreviousGoodAlt2() throws Exception {
|
||||||
|
@ -106,7 +106,7 @@ public class TestATNInterpreter extends BaseTest {
|
||||||
errorTokenType = re.getOffendingToken().getType();
|
errorTokenType = re.getOffendingToken().getType();
|
||||||
}
|
}
|
||||||
assertEquals(2, errorIndex);
|
assertEquals(2, errorIndex);
|
||||||
assertEquals(errorTokenType, 6);
|
assertEquals(4, errorTokenType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test public void testMustTrackPreviousGoodAlt3() throws Exception {
|
@Test public void testMustTrackPreviousGoodAlt3() throws Exception {
|
||||||
|
@ -129,7 +129,7 @@ public class TestATNInterpreter extends BaseTest {
|
||||||
errorTokenType = re.getOffendingToken().getType();
|
errorTokenType = re.getOffendingToken().getType();
|
||||||
}
|
}
|
||||||
assertEquals(2, errorIndex);
|
assertEquals(2, errorIndex);
|
||||||
assertEquals(errorTokenType, 6);
|
assertEquals(4, errorTokenType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test public void testAmbigAltChooseFirst() throws Exception {
|
@Test public void testAmbigAltChooseFirst() throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue