add wildcard test.

This commit is contained in:
parrt 2017-03-15 09:33:15 -07:00
parent 4c1dc90064
commit d966702d63
1 changed files with 23 additions and 1 deletions

View File

@ -240,8 +240,30 @@ public class ParserExecDescriptors {
}
/** Match assignments, ignore other tokens with wildcard. */
public static class Wildcard extends BaseParserTestDescriptor {
public String input = "x=10; abc;;;; y=99;";
public String output = "x=10;\ny=99;\n";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
/**
* This test ensures that {@link ParserATNSimulator} does not produce a
grammar T;
a : (assign|.)+ EOF ;
assign : ID '=' INT ';' {
<writeln("$text")>
} ;
ID : 'a'..'z'+ ;
INT : '0'..'9'+;
WS : (' '|'\n') -> skip;
*/
@CommentHasStringValue
public String grammar;
}
/**
* This test ensures that {@link org.antlr.v4.runtime.atn.ParserATNSimulator} does not produce a
* {@link StackOverflowError} when it encounters an {@code EOF} transition
* inside a closure.
*/