forked from jasder/antlr
Added tests with escaped characters.
This commit is contained in:
parent
5b11aed48d
commit
763eccc2a4
|
@ -415,9 +415,11 @@ public class TestSymbolIssues extends BaseJavaToolTest {
|
|||
"TOKEN8: 'a' 'b' | 'b' | 'a' 'b';\n" +
|
||||
"fragment\n" +
|
||||
"TOKEN9: 'asdf' | 'qwer' | 'qwer';\n" +
|
||||
"TOKEN10: '\\r\\n' | '\\r\\n';\n" +
|
||||
"TOKEN11: '\\r\\n';\n" +
|
||||
"\n" +
|
||||
"mode MODE1;\n" +
|
||||
"TOKEN10: 'asdf';\n" +
|
||||
"TOKEN12: 'asdf';\n" +
|
||||
"\n" +
|
||||
"fragment A: 'A';",
|
||||
|
||||
|
@ -426,7 +428,10 @@ public class TestSymbolIssues extends BaseJavaToolTest {
|
|||
"warning(" + ErrorType.TOKEN_UNREACHABLE.code + "): Test.g4:7:0: One of the token TOKEN6 values unreachable. asdf is always overlapped by token TOKEN1\n" +
|
||||
"warning(" + ErrorType.TOKEN_UNREACHABLE.code + "): Test.g4:7:0: One of the token TOKEN6 values unreachable. asdf is always overlapped by token TOKEN3\n" +
|
||||
"warning(" + ErrorType.TOKEN_UNREACHABLE.code + "): Test.g4:9:0: One of the token TOKEN8 values unreachable. ab is always overlapped by token TOKEN8\n" +
|
||||
"warning(" + ErrorType.TOKEN_UNREACHABLE.code + "): Test.g4:11:0: One of the token TOKEN9 values unreachable. qwer is always overlapped by token TOKEN9\n"
|
||||
"warning(" + ErrorType.TOKEN_UNREACHABLE.code + "): Test.g4:11:0: One of the token TOKEN9 values unreachable. qwer is always overlapped by token TOKEN9\n" +
|
||||
"warning(" + ErrorType.TOKEN_UNREACHABLE.code + "): Test.g4:12:0: One of the token TOKEN10 values unreachable. \\r\\n is always overlapped by token TOKEN10\n" +
|
||||
"warning(" + ErrorType.TOKEN_UNREACHABLE.code + "): Test.g4:13:0: One of the token TOKEN11 values unreachable. \\r\\n is always overlapped by token TOKEN10\n" +
|
||||
"warning(" + ErrorType.TOKEN_UNREACHABLE.code + "): Test.g4:13:0: One of the token TOKEN11 values unreachable. \\r\\n is always overlapped by token TOKEN10\n"
|
||||
};
|
||||
|
||||
testErrors(test, false);
|
||||
|
|
Loading…
Reference in New Issue