add wildcard test.
This commit is contained in:
parent
4c1dc90064
commit
d966702d63
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue