Merge pull request #1357 from parrt/doc-runtimetests

Update doc on runtime tests
This commit is contained in:
Terence Parr 2016-11-15 23:26:11 +01:00 committed by GitHub
commit 4290bdbaa0
32 changed files with 435 additions and 376 deletions

View File

@ -1,119 +1,125 @@
# Adding unit tests
## Generating Runtime Tests
## Introduction
Because ANTLR supports multiple target languages, the unit tests are broken into two groups: the unit tests that test the tool itself (in `tool-testsuite`) and the unit tests that test the parser runtimes (in antlr4/runtime-testsuite). To avoid a lot of cut-and-paste, we generate all **runtime** tests from a set of templates using [runtime-testsuite/src/org/antlr/v4/testgen/TestGenerator.java](../runtime-testsuite/src/org/antlr/v4/testgen/TestGenerator.java). The `mvn` command is simple to use:
Because ANTLR supports multiple target languages, the unit tests are broken into two groups: the unit tests that test the tool itself (in `tool-testsuite`) and the unit tests that test the parser runtimes (in `antlr4/runtime-testsuite`). The tool tests are straightforward because they are Java code testing Java code; see the section at the bottom of this file.
```
$ cd ~/antlr/code/antlr4/runtime-testsuite
$ mvn -Pgen generate-test-sources
...
rootDir = /Users/parrt/antlr/code/antlr4/runtime-testsuite
outputDir = /Users/parrt/antlr/code/antlr4/runtime-testsuite/test
templates = /Users/parrt/antlr/code/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates
target = ALL
browsers = false
viz = false
INFO: Generating target Java
INFO: Generating target Go
INFO: Generating target CSharp
INFO: Generating target Python2
INFO: Generating target Python3
INFO: Generating target JavaScript/Node
...
The runtime tests must be specified in a generic fashion to work across language targets. Furthermore, we must test the various targets from Java. This usually means Java launching processes to compile, say, C++ and run parsers.
As of 4.6, we use [a Java descriptor object](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/RuntimeTestDescriptor.java) to describe each runtime test. Unit tests are grouped together into categories such as [ParserExecDescriptors](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/descriptors/ParserExecDescriptors.java), which has multiple nested descriptor objects, one per test. For example, here is the start of that file:
```java
public class ParserExecDescriptors {
public static class APlus extends BaseParserTestDescriptor {
public String input = "a b c";
public String output = "abc\n";
public String errors = "";
public String startRule = "a";
public String grammarName = "T";
/**
grammar T;
a : ID+ {
<writeln("$text")>
};
ID : 'a'..'z'+;
WS : (' '|'\n') -> skip;
*/
@CommentHasStringValue
public String grammar;
}
```
It basically runs the Java program:
The mysterious `@CommentHasStringValue` annotation is a bit of a hack that allows multi-line strings in Java. This kung fu is required so that we can use Java classes rather than StringTemplate group files to specify runtime tests (the legacy system used those and it was hard to get them right). Here are all the [Runtime test descriptors](https://github.com/antlr/antlr4/tree/master/runtime-testsuite/test/org/antlr/v4/test/runtime/descriptors) organized into groups.
The grammars are strings representing StringTemplates (`ST` objects) so `<writeln("$text")>` will get replace when the unit test file is generated (`Test.java`, `Test.cs`, ...). The `writeln` template must be defined per target. Here are all of the
[Target templates for runtime tests](https://github.com/antlr/antlr4/tree/master/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates).
## Running the runtime tests
A single test rig is sufficient to test all targets against all descriptors using the [junit parameterized tests](https://github.com/junit-team/junit4/wiki/parameterized-tests) mechanism. But, that is inconvenient because we often want to test just a single target or perhaps even just a single test within a single group of a single target. I have automatically generated a bunch of
[Target runtime test rigs](https://github.com/antlr/antlr4/tree/master/runtime-testsuite/test/org/antlr/v4/test/runtime) that allow developers such flexibility. For example, here are the Python3 test rigs in intellij:
<img src=images/testrigs.png width=300>
And the result of testing the entire subdirectory:
<img src=images/python3-tests.png width=400>
From `mvn`, on the commandline, you will see:
```bash
$ java org.antlr.v4.testgen.TestGenerator \
-root ~/antlr/code/antlr4/runtime-testsuite \
-outdir ~/antlr/code/antlr4/runtime-testsuite/test \
-templates ~/antlr/code/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.antlr.v4.test.runtime.javascript.node.TestCompositeLexers
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.581 sec
Running org.antlr.v4.test.runtime.javascript.node.TestLexerErrors
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.721 sec
Running org.antlr.v4.test.runtime.javascript.node.TestSemPredEvalParser
Tests run: 26, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.084 sec
Running org.antlr.v4.test.runtime.javascript.node.TestSets
Tests run: 23, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.798 sec
Running org.antlr.v4.test.runtime.javascript.node.TestPerformance
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.505 sec
Running org.antlr.v4.test.runtime.javascript.node.TestSemPredEvalLexer
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.994 sec
Running org.antlr.v4.test.runtime.javascript.node.TestLexerExec
Tests run: 38, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.433 sec
...
```
## Adding a runtime test
For each target, you will find an `Index.stg` file with a dictionary of all test groups. E.g., `runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Index.stg` looks like:
To add a new runtime test, first determine which [group of tests](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/descriptors) it belongs to. Then, add a new [RuntimeTestDescriptor](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/RuntimeTestDescriptor.java) implementation by subclassing one of:
```
TestFolders ::= [
"CompositeLexers": [],
"CompositeParsers": [],
"FullContextParsing": [],
"LeftRecursion": [],
"LexerErrors": [],
"LexerExec": [],
"Listeners": [],
"ParserErrors": [],
"ParserExec": [],
"ParseTrees": [],
"Performance": [],
"SemPredEvalLexer": [],
"SemPredEvalParser": [],
"Sets": []
]
* [BaseParserTestDescriptor](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/BaseParserTestDescriptor.java); see example [APlus](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/descriptors/ParserExecDescriptors.java#L7).
* [BaseDiagnosticParserTestDescriptor](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/BaseDiagnosticParserTestDescriptor) if you want to test parser diagnostic output; see [example output](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/descriptors/FullContextParsingDescriptors.java#L16).
* [BaseCompositeParserTestDescriptor](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/BaseCompositeParserTestDescriptor.java); see example [BringInLiteralsFromDelegate](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/descriptors/CompositeParsersDescriptors.java#L11)
* [BaseLexerTestDescriptor](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/BaseLexerTestDescriptor.java); see example [ActionPlacement](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/descriptors/LexerExecDescriptors.java#L12).
* [BaseCompositeLexerTestDescriptor](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/BaseCompositeLexerTestDescriptor.java); see example [LexerDelegatorInvokesDelegateRule](https://github.com/antlr/antlr4/blob/master/runtime-testsuite/test/org/antlr/v4/test/runtime/descriptors/CompositeLexersDescriptors.java#L11)
Each descriptor object describes the following mandatory elements for the test:
* the test type
* the grammar
* the start rule
* the input text to parse or lex
* the expected output
* the expected errors
Your best bet is to find a similar test in the appropriate group and then copy and paste the descriptor object, creating a new nested class within the test group class. Modify the field definitions to suit your new problem.
If you need to create a whole new group of tests, it requires a new descriptor class; call it `XDescriptors`. Then, in each [target subdirectory](https://github.com/antlr/antlr4/tree/master/runtime-testsuite/test/org/antlr/v4/test/runtime), you need to create a new test rig `TestX.java` file:
```java
package org.antlr.v4.test.runtime.java;
import org.antlr.v4.test.runtime.BaseRuntimeTest;
import org.antlr.v4.test.runtime.RuntimeTestDescriptor;
import org.antlr.v4.test.runtime.descriptors.ListenersDescriptors;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(Parameterized.class)
public class TestX extends BaseRuntimeTest {
public TestX(RuntimeTestDescriptor descriptor) {
super(descriptor,new Base<TARGET>Test());
}
@Parameterized.Parameters(name="{0}")
public static RuntimeTestDescriptor[] getAllTestDescriptors() {
return BaseRuntimeTest.getRuntimeTestDescriptors(XDescriptors.class, "<TARGET>");
}
}
```
Then each group has a subdirectory with another index. E.g., `Sets/Index.stg` looks like:
```
TestTemplates ::= [
"SeqDoesNotBecomeSet": [],
"ParserSet": [],
"ParserNotSet": [],
"ParserNotToken": [],
"ParserNotTokenWithLabel": [],
"RuleAsSet": [],
"NotChar": [],
"OptionalSingleElement": [],
...
```
For every name mentioned, you will find a `.stg` file with the actual test template. E.g., `Sets/StarSet.stg`.
Each `.stg` file descripes the following mandatory elements for the test:
- the test type: "Parser" or "Lexer"
- some ANTLR options, such as "Debug"
- the grammar
- the start rule
- the input i.e. the text to parse
- the expected output
- the expected errors
The grammar can itself contain template expressions such as `<something>`.
The test generator replaces these with the corresponding values from the target language template (see below).
It then generates a unit test in which the grammar, the input and the expected output and errors are inlined.
where `<TARGET>` is replaced with Java, Cpp, CSharp, Python2, ... in the various subdirectories.
Here is an example test template:
```
TestType() ::= "Parser"
Options ::= [
"Debug": false
]
Grammar ::= [
"T": {<grammar("T")>}
]
Input() ::= "abaac"
Rule() ::= "a"
Output() ::= <<
abaac<\n>
>>
Errors() ::= ""
grammar(grammarName) ::= <<
grammar <grammarName>;
a : ('a'|'b')* 'c' {<InputText():writeln()>} ;
>>
```
### Ignoring tests
In order to turn off a test for a particular target, we need to use the `ignore` method. Given a target name, a descriptor object can decide whether to ignore the test. This is not always convenient but it is fully general and works well for the one case we have now where we have to ignore `Visitor` tests in all targets except JavaScript.
### Cross-language actions embedded within grammars
@ -129,14 +135,16 @@ Use instead the language-neutral:
<writeln("$set.stop")>
```
File `runtime-testsuite/resources/org/antlr/v4/test/runtime/java/Java.test.stg` has templates like:
Template file [runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Java.test.stg](https://github.com/antlr/antlr4/tree/master/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Java.test.stg) has templates like:
```
writeln(s) ::= <<System.out.println(<s>);>>
```
that translate generic operations to target-specific language statements or expressions.
## Adding an ANTLR tool unit test
Just go into the appropriate Java test class in dir `antlr4/tool-testsuite/test/org/antlr/v4/test/tool` and add your unit test.
Just go into the appropriate Java test class in dir [antlr4/tool-testsuite/test/org/antlr/v4/test/tool](https://github.com/antlr/antlr4/tree/master/tool-testsuite/test/org/antlr/v4/test/tool) and add your unit test.

View File

@ -9,12 +9,12 @@ Creating a new target involves the following key elements:
1. For the tool, create class *X*Target as a subclass of class `Target` in package `org.antlr.v4.codegen.target`. This class describes language specific details about escape characters and strings and so on. There is very little to do here typically.
1. Create *X*.stg in directory tool/resources/org/antlr/v4/tool/templates/codegen/*X*/*X*.stg. This is a [StringTemplate](http://www.stringtemplate.org/) group file (`.stg`) that tells ANTLR how to express all of the parsing elements needed to generate code. You will see templates called `ParserFile`, `Parser`, `Lexer`, `CodeBlockForAlt`, `AltBlock`, etc... Each of these must be described how to build the indicated chunk of code. Your best bet is to find the closest existing target, copy that template file, and tweak to suit.
1. Create a runtime library to support the parsers generated by ANTLR. Under directory runtime/*X*, you are in complete control of the directory structure as dictated by common usage of that target language. For example, Java has: `runtime/Java/lib` and `runtime/Java/src` directories. Under `src`, you will find a directory structure for package `org.antlr.v4.runtime` and below.
1. Create a template file for runtime tests. All you have to do is provide a few simple templates that indicate how to print values and declare variables. Our runtime test mechanism in dir `runtime-testsuite` will automatically generate code in a new target and check the results. All it needs to know is how to generate a test rig (i.e., a `main` program), how to define various class fields, compare members and so on. You must create a *X* directory underneath `runtime-testsuite/resources/org/antlr/v4/test/runtime`. Again, your best bet is to copy the templates from the closest language to your target and tweak it to suit.
1. Create a template file for runtime tests. All you have to do is provide a few templates that indicate how to print values and declare variables. Our runtime test mechanism in dir `runtime-testsuite` will automatically generate code using these templates for each target and check the test results. It needs to know how to define various class fields, compare members and so on. You must create a *X*.test.stg file underneath [runtime-testsuite/resources/org/antlr/v4/test/runtime](https://github.com/antlr/antlr4/tree/master/runtime-testsuite/resources/org/antlr/v4/test/runtime). Again, your best bet is to copy the templates from the closest language to your target and tweak it to suit.
## Getting started
1. Fork the `antlr/antlr4` repository at github to your own user so that you have repository `username/antlr4`.
2. Clone `username/antlr4`, forked repository, to your local disk. Your remote `origin` will be the forked repository on GitHub. Add a remote `upstream` to the original `antlr/antlr4` repository (URL `https://github.com/antlr/antlr4.git`). Changes that you would like to contribute back to the project are done with [pull requests](https://help.github.com/articles/using-pull-requests/).
2. Clone `username/antlr4`, the forked repository, to your local disk. Your remote `origin` will be the forked repository on GitHub. Add a remote `upstream` to the original `antlr/antlr4` repository (URL `https://github.com/antlr/antlr4.git`). Changes that you would like to contribute back to the project are done with [pull requests](https://help.github.com/articles/using-pull-requests/).
3. Try to build it before doing anything
```bash
$ mvn compile

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

BIN
doc/images/testrigs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

View File

@ -1,6 +1,6 @@
package org.antlr.v4.test.runtime;
public abstract class BaseDebugParserTestDescriptor extends BaseParserTestDescriptor {
public abstract class BaseDiagnosticParserTestDescriptor extends BaseParserTestDescriptor {
@Override
public boolean showDiagnosticErrors() {
return true;

View File

@ -23,6 +23,14 @@ import java.util.List;
import static junit.framework.TestCase.assertEquals;
import static org.junit.Assume.assumeFalse;
/** This class represents a single runtime test. It pulls data from
* a {@link RuntimeTestDescriptor} and uses junit to trigger a test.
* The only functionality needed to execute a test is defined in
* {@link RuntimeTestSupport}. All of the various test rig classes
* derived from this one. E.g., see {@link org.antlr.v4.test.runtime.java.TestParserExec}.
*
* @since 4.6.
*/
public abstract class BaseRuntimeTest {
public final static String[] Targets = {
"Cpp",
@ -36,10 +44,10 @@ public abstract class BaseRuntimeTest {
"Node", "Safari", "Firefox", "Explorer", "Chrome"
};
protected SingleTest delegate;
protected RuntimeTestSupport delegate;
protected RuntimeTestDescriptor descriptor;
public BaseRuntimeTest(RuntimeTestDescriptor descriptor, SingleTest delegate) {
public BaseRuntimeTest(RuntimeTestDescriptor descriptor, RuntimeTestSupport delegate) {
this.descriptor = descriptor;
this.delegate = delegate;
}

View File

@ -8,6 +8,12 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/** An abstract but mostly complete test descriptor that pulls values
* for the various runtime test descriptor methods such as {@link #getInput()}
* from fields using reflection.
*
* @since 4.6
*/
public abstract class BaseRuntimeTestDescriptor implements RuntimeTestDescriptor {
protected String targetName;
@ -82,20 +88,6 @@ public abstract class BaseRuntimeTestDescriptor implements RuntimeTestDescriptor
return null;
}
@Override
public String getAfterGrammar() {
try {
Field f = this.getClass().getField("afterGrammar");
String s = stringIndentation((String)f.get(this));
if ( s.length()==0 ) return null;
return s;
}
catch (Exception nsfe) {
; // we are optional
}
return null;
}
@Override
public Pair<String, String> getGrammar() {
String grammarName = null;

View File

@ -0,0 +1,5 @@
# Runtime test mechanism
The files in the various target subdirectories were automatically generated
and exist as a convenience so that we can test individual targets and also
groups of tests using the development environments like Intellij.

View File

@ -4,23 +4,62 @@ import org.antlr.v4.runtime.misc.Pair;
import java.util.List;
/** This interface describes everything that a runtime test
* descriptor can specify. Most testing descriptors will
* subclass {@link BaseRuntimeTestDescriptor} rather than
* implement this directly. The {@link BaseRuntimeTest}
* class pulls data from descriptors to execute tests.
*
* @since 4.6
*/
public interface RuntimeTestDescriptor {
/** The name of this test such as TokenAndRuleContextString (see
* {@link org.antlr.v4.test.runtime.descriptors.ParseTreesDescriptors.TokenAndRuleContextString})
*/
String getTestName();
/** A type in {"Lexer", "Parser", "CompositeLexer", "CompositeParser"} */
String getTestType();
/** Parser input. Return "" if not input should be provided to the parser or lexer. */
String getInput();
/** Output from executing the parser. Return null if no output is expected. */
String getOutput();
/** Parse errors Return null if no errors are expected. */
String getErrors();
/** Errors generated by ANTLR processing the grammar. Return null if no errors are expected. */
String getANTLRToolErrors();
/** The rule at which parsing should start */
String getStartRule(); // TODO: alter tests to use same default start rule?
String getAfterGrammar(); // TODO: only a few use. make part of testrig or rename?
/** Initialization code */
//String getAfterGrammar(); // TODO: only a few use. make part of testrig or rename?
/** For lexical tests, dump the DFA of the default lexer mode to stdout */
boolean showDFA();
/** For parsing, engage the DiagnosticErrorListener, dumping results to stderr */
boolean showDiagnosticErrors();
Pair<String,String> getGrammar(); // Associates name of grammar like M in M.g4 to string (template) of grammar
/** Associates name of grammar like M in M.g4 to string (template) of grammar */
Pair<String,String> getGrammar();
/** Return a list of grammars imported into the grammar specified in {#getGrammar}. */
List<Pair<String,String>> getSlaveGrammars();
/** Return a string representing the name of the target currently testing
* this descriptor. Multiple instances of the same descriptor class
* can be created to test different targets.
*/
String getTarget();
/** Set the target we are testing */
void setTarget(String targetName);
/** Return true if this test should be ignored for the indicated target */
boolean ignore(String targetName);
}

View File

@ -1,6 +1,13 @@
package org.antlr.v4.test.runtime;
public interface SingleTest {
/** This interface describes functionality needed to execute a runtime test.
* Unfortunately the Base*Test.java files are big junk drawers. This is
* an attempt to make it more obvious what new target implementers have to
* implement.
*
* @since 4.6
*/
public interface RuntimeTestSupport {
void testSetUp() throws Exception;
void testTearDown() throws Exception;
void eraseTempDir();

View File

@ -60,7 +60,7 @@ import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.semantics.SemanticPipeline;
import org.antlr.v4.test.runtime.ErrorQueue;
import org.antlr.v4.test.runtime.SingleTest;
import org.antlr.v4.test.runtime.RuntimeTestSupport;
import org.antlr.v4.tool.ANTLRMessage;
import org.antlr.v4.tool.DOTGenerator;
import org.antlr.v4.tool.DefaultToolListener;
@ -99,7 +99,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
public class BaseCppTest implements SingleTest {
public class BaseCppTest implements RuntimeTestSupport {
// -J-Dorg.antlr.v4.test.BaseTest.level=FINE
// private static final Logger LOGGER = Logger.getLogger(BaseTest.class.getName());
public static final String newline = System.getProperty("line.separator");

View File

@ -36,7 +36,7 @@ import org.antlr.v4.runtime.TokenSource;
import org.antlr.v4.runtime.WritableToken;
import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.test.runtime.ErrorQueue;
import org.antlr.v4.test.runtime.SingleTest;
import org.antlr.v4.test.runtime.RuntimeTestSupport;
import org.antlr.v4.tool.ANTLRMessage;
import org.antlr.v4.tool.DefaultToolListener;
import org.antlr.v4.tool.GrammarSemanticsMessage;
@ -77,7 +77,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
public class BaseCSharpTest implements SingleTest {
public class BaseCSharpTest implements RuntimeTestSupport {
public static final String newline = System.getProperty("line.separator");
public static final String pathSep = System.getProperty("path.separator");

View File

@ -20,7 +20,7 @@ public class CompositeLexersDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "M";
@ -60,7 +60,7 @@ public class CompositeLexersDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "M";

View File

@ -11,7 +11,7 @@ public class CompositeParsersDescriptors {
public static class BringInLiteralsFromDelegate extends BaseCompositeParserTestDescriptor {
public String input = "=a";
public String output = "S.a\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "M";
@ -43,7 +43,7 @@ public class CompositeParsersDescriptors {
public static class CombinedImportsCombined extends BaseCompositeParserTestDescriptor {
public String input = "x 34 9";
public String output = "S.x\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "M";
@ -92,7 +92,7 @@ public class CompositeParsersDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "M";
@ -161,7 +161,7 @@ public class CompositeParsersDescriptors {
public static class DelegatorAccessesDelegateMembers extends BaseCompositeParserTestDescriptor {
public String input = "b";
public String output = "foo\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "M";
@ -196,7 +196,7 @@ public class CompositeParsersDescriptors {
public static class DelegatorInvokesDelegateRule extends BaseCompositeParserTestDescriptor {
public String input = "b";
public String output = "S.a\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "M";
@ -229,7 +229,7 @@ public class CompositeParsersDescriptors {
public static class DelegatorInvokesDelegateRuleWithArgs extends BaseCompositeParserTestDescriptor {
public String input = "b";
public String output = "S.a1000\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "M";
@ -262,7 +262,7 @@ public class CompositeParsersDescriptors {
public static class DelegatorInvokesDelegateRuleWithReturnStruct extends BaseCompositeParserTestDescriptor {
public String input = "b";
public String output = "S.ab\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "M";
@ -295,7 +295,7 @@ public class CompositeParsersDescriptors {
public static class DelegatorInvokesFirstVersionOfDelegateRule extends BaseCompositeParserTestDescriptor {
public String input = "b";
public String output = "S.a\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "M";
@ -336,7 +336,7 @@ public class CompositeParsersDescriptors {
public static class DelegatorRuleOverridesDelegate extends BaseCompositeParserTestDescriptor {
public String input = "c";
public String output = "S.a\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "M";
@ -375,7 +375,7 @@ public class CompositeParsersDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "M";
@ -416,7 +416,7 @@ public class CompositeParsersDescriptors {
public static class DelegatorRuleOverridesLookaheadInDelegate extends BaseCompositeParserTestDescriptor {
public String input = "float x = 3;";
public String output = "JavaDecl: floatx=3;\n";
public String errors = "";
public String errors = null;
public String startRule = "prog";
public String grammarName = "M";
@ -458,8 +458,8 @@ public class CompositeParsersDescriptors {
*/
public static class ImportLexerWithOnlyFragmentRules extends BaseCompositeParserTestDescriptor {
public String input = "test test";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "program";
public String grammarName = "Test";
@ -499,8 +499,8 @@ public class CompositeParsersDescriptors {
public static class ImportedGrammarWithEmptyOptions extends BaseCompositeParserTestDescriptor {
public String input = "b";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "s";
public String grammarName = "M";
@ -533,8 +533,8 @@ public class CompositeParsersDescriptors {
public static class ImportedRuleWithAction extends BaseCompositeParserTestDescriptor {
public String input = "b";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "s";
public String grammarName = "M";
@ -573,7 +573,7 @@ public class CompositeParsersDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "M";

View File

@ -1,10 +1,10 @@
package org.antlr.v4.test.runtime.descriptors;
import org.antlr.v4.test.runtime.BaseDebugParserTestDescriptor;
import org.antlr.v4.test.runtime.BaseDiagnosticParserTestDescriptor;
import org.antlr.v4.test.runtime.CommentHasStringValue;
public class FullContextParsingDescriptors {
public static class AmbigYieldsCtxSensitiveDFA extends BaseDebugParserTestDescriptor {
public static class AmbigYieldsCtxSensitiveDFA extends BaseDiagnosticParserTestDescriptor {
public String input = "abc";
/**
Decision 0:
@ -28,7 +28,7 @@ public class FullContextParsingDescriptors {
public String grammar;
}
public static class AmbiguityNoLoop extends BaseDebugParserTestDescriptor {
public static class AmbiguityNoLoop extends BaseDiagnosticParserTestDescriptor {
public String input = "a@";
public String output = "alt 1\n";
/**
@ -61,7 +61,7 @@ public class FullContextParsingDescriptors {
public String grammar;
}
public static class CtxSensitiveDFATwoDiffInput extends BaseDebugParserTestDescriptor {
public static class CtxSensitiveDFATwoDiffInput extends BaseDiagnosticParserTestDescriptor {
public String input = "$ 34 abc @ 34 abc";
/**
Decision 2:
@ -99,7 +99,7 @@ public class FullContextParsingDescriptors {
}
public static abstract class CtxSensitiveDFA extends BaseDebugParserTestDescriptor {
public static abstract class CtxSensitiveDFA extends BaseDiagnosticParserTestDescriptor {
public String startRule = "s";
public String grammarName = "T";
@ -156,7 +156,7 @@ public class FullContextParsingDescriptors {
public String errors;
}
public static abstract class ExprAmbiguity extends BaseDebugParserTestDescriptor {
public static abstract class ExprAmbiguity extends BaseDiagnosticParserTestDescriptor {
public String startRule = "s";
public String grammarName = "T";
@ -204,8 +204,8 @@ public class FullContextParsingDescriptors {
public String errors;
}
public static abstract class FullContextIF_THEN_ELSEParse extends BaseDebugParserTestDescriptor {
public String errors = "";
public static abstract class FullContextIF_THEN_ELSEParse extends BaseDiagnosticParserTestDescriptor {
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -346,7 +346,7 @@ public class FullContextParsingDescriptors {
* Tests predictions for the following case involving closures.
* http://www.antlr.org/wiki/display/~admin/2011/12/29/Flaw+in+ANTLR+v3+LL(*)+analysis+algorithm
*/
public static class LoopsSimulateTailRecursion extends BaseDebugParserTestDescriptor {
public static class LoopsSimulateTailRecursion extends BaseDiagnosticParserTestDescriptor {
public String input = "a(i)<-x";
public String output = "pass: a(i)<-x\n";
/**
@ -381,7 +381,7 @@ public class FullContextParsingDescriptors {
}
public static class SLLSeesEOFInLLGrammar extends BaseDebugParserTestDescriptor {
public static class SLLSeesEOFInLLGrammar extends BaseDiagnosticParserTestDescriptor {
public String input = "34 abc";
/**
Decision 0:

View File

@ -5,7 +5,7 @@ import org.antlr.v4.test.runtime.CommentHasStringValue;
public class LeftRecursionDescriptors {
public static abstract class AmbigLR extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "prog";
public String grammarName = "Expr";
@ -38,31 +38,31 @@ public class LeftRecursionDescriptors {
public static class AmbigLR_1 extends AmbigLR {
public String input = "1\n";
public String output = "";
public String output = null;
}
public static class AmbigLR_2 extends AmbigLR {
public String input = "a = 5\n";
public String output = "";
public String output = null;
}
public static class AmbigLR_3 extends AmbigLR {
public String input = "b = 6\n";
public String output = "";
public String output = null;
}
public static class AmbigLR_4 extends AmbigLR {
public String input = "a+b*2\n";
public String output = "";
public String output = null;
}
public static class AmbigLR_5 extends AmbigLR {
public String input = "(1+2)*3\n";
public String output = "";
public String output = null;
}
public static abstract class Declarations extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -90,7 +90,7 @@ public class LeftRecursionDescriptors {
public static class Declarations_1 extends Declarations {
public String input = "a";
public String output = "(s (declarator a) <EOF>)\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -166,7 +166,7 @@ public class LeftRecursionDescriptors {
* https://github.com/antlr/antlr4/issues/161
*/
public static abstract class DirectCallToLeftRecursiveRule extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -199,7 +199,7 @@ public class LeftRecursionDescriptors {
}
public static abstract class Expressions extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -259,7 +259,7 @@ public class LeftRecursionDescriptors {
}
public static abstract class JavaExpressions extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -388,7 +388,7 @@ public class LeftRecursionDescriptors {
}
public static abstract class LabelsOnOpSubrule extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -428,7 +428,7 @@ public class LeftRecursionDescriptors {
* https://github.com/antlr/antlr4/issues/625
*/
public static abstract class MultipleActionsPredicatesOptions extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -469,7 +469,7 @@ public class LeftRecursionDescriptors {
* https://github.com/antlr/antlr4/issues/625
*/
public static abstract class MultipleActions extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -491,7 +491,7 @@ public class LeftRecursionDescriptors {
public static class MultipleActions_1 extends MultipleActions {
public String input = "4";
public String output = "(s (e 4))\n";
public String errors = "";
public String errors = null;
}
public static class MultipleActions_2 extends MultipleActions {
@ -513,7 +513,7 @@ public class LeftRecursionDescriptors {
public static abstract class MultipleAlternativesWithCommonLabel extends BaseParserTestDescriptor {
public String startRule = "s";
public String grammarName = "T";
public String errors = "";
public String errors = null;
/**
grammar T;
@ -566,7 +566,7 @@ public class LeftRecursionDescriptors {
public static class PrecedenceFilterConsidersContext extends BaseParserTestDescriptor {
public String input = "aa";
public String output = "(prog (statement (letterA a)) (statement (letterA a)) <EOF>)\n";
public String errors = "";
public String errors = null;
public String startRule = "prog";
public String grammarName = "T";
@ -584,7 +584,7 @@ public class LeftRecursionDescriptors {
}
public static abstract class PrefixAndOtherAlt extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -616,7 +616,7 @@ public class LeftRecursionDescriptors {
}
public static abstract class PrefixOpWithActionAndLabel extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -653,7 +653,7 @@ public class LeftRecursionDescriptors {
}
public static abstract class ReturnValueAndActionsAndLabels extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -707,7 +707,7 @@ public class LeftRecursionDescriptors {
* to a ternary operator).
*/
public static abstract class ReturnValueAndActionsList extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -759,7 +759,7 @@ public class LeftRecursionDescriptors {
* This test treats the `,` and `>>` operators separately.
*/
public static abstract class ReturnValueAndActionsList2 extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -803,7 +803,7 @@ public class LeftRecursionDescriptors {
}
public static abstract class ReturnValueAndActions extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -848,7 +848,7 @@ public class LeftRecursionDescriptors {
public static class SemPred extends BaseParserTestDescriptor {
public String input = "x y z";
public String output = "(s (a (a (a x) y) z))\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -888,7 +888,7 @@ public class LeftRecursionDescriptors {
}
public static abstract class Simple extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -927,7 +927,7 @@ public class LeftRecursionDescriptors {
* https://github.com/antlr/antlr4/issues/542
*/
public static abstract class TernaryExprExplicitAssociativity extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -994,7 +994,7 @@ public class LeftRecursionDescriptors {
}
public static abstract class TernaryExpr extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -1067,8 +1067,8 @@ public class LeftRecursionDescriptors {
*/
public static abstract class WhitespaceInfluence extends BaseParserTestDescriptor {
public String input = "Test(1,3)";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "prog";
public String grammarName = "Expr";
@ -1129,11 +1129,11 @@ public class LeftRecursionDescriptors {
public static class WhitespaceInfluence_1 extends WhitespaceInfluence {
public String input = "Test(1,3)";
public String output = "";
public String output = null;
}
public static class WhitespaceInfluence_2 extends WhitespaceInfluence {
public String input = "Test(1, 3)";
public String output = "";
public String output = null;
}
}

View File

@ -54,7 +54,7 @@ public class LexerErrorsDescriptors {
}
public static abstract class EnforcedGreedyNestedBraces extends BaseLexerTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -212,7 +212,7 @@ public class LexerErrorsDescriptors {
}
public static abstract class StringsEmbeddedInActions extends BaseLexerTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";

View File

@ -22,7 +22,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -53,7 +53,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -79,7 +79,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -103,7 +103,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -129,7 +129,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -159,7 +159,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -186,7 +186,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -210,7 +210,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -234,7 +234,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -258,7 +258,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -282,7 +282,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -306,7 +306,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -329,7 +329,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -344,7 +344,7 @@ public class LexerExecDescriptors {
}
public static abstract class EOFSuffixInFirstRule extends BaseLexerTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -389,7 +389,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -413,7 +413,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -443,7 +443,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -472,7 +472,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -507,7 +507,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -541,7 +541,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -572,7 +572,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -598,7 +598,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -629,7 +629,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -659,7 +659,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -683,7 +683,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -705,7 +705,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -733,7 +733,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -778,7 +778,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "PositionAdjustingLexer";
@ -832,7 +832,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -846,7 +846,7 @@ public class LexerExecDescriptors {
}
public static abstract class RecursiveLexerRuleRefWithWildcardPlus extends BaseLexerTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -896,7 +896,7 @@ public class LexerExecDescriptors {
}
public static abstract class RecursiveLexerRuleRefWithWildcardStar extends BaseLexerTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -958,7 +958,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -985,7 +985,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -1018,7 +1018,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -1051,7 +1051,7 @@ public class LexerExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";

View File

@ -14,7 +14,7 @@ public class ListenersDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -57,7 +57,7 @@ public class ListenersDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -100,7 +100,7 @@ public class ListenersDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -132,7 +132,7 @@ public class ListenersDescriptors {
}
public static abstract class RuleGetters extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -184,7 +184,7 @@ public class ListenersDescriptors {
}
public static abstract class TokenGetters extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";

View File

@ -7,7 +7,7 @@ public class ParseTreesDescriptors {
public static class AltNum extends BaseParserTestDescriptor {
public String input = "xyz";
public String output = "(a:3 x (b:2 y) z)\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -99,7 +99,7 @@ public class ParseTreesDescriptors {
public static class RuleRef extends BaseParserTestDescriptor {
public String input = "yx";
public String output = "(a (b y) x)\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -153,7 +153,7 @@ public class ParseTreesDescriptors {
public static class Token2 extends BaseParserTestDescriptor {
public String input = "xy";
public String output = "(a x y)\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -184,7 +184,7 @@ public class ParseTreesDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -210,7 +210,7 @@ public class ParseTreesDescriptors {
public static class TwoAltLoop extends BaseParserTestDescriptor {
public String input = "xyyxyxz";
public String output = "(a x y y x y x z)\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -235,7 +235,7 @@ public class ParseTreesDescriptors {
public static class TwoAlts extends BaseParserTestDescriptor {
public String input = "y";
public String output = "(a y)\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";

View File

@ -43,7 +43,7 @@ public class ParserErrorsDescriptors {
public static class ContextListGetters extends BaseParserTestDescriptor {
public String input = "abab";
public String output = "abab\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -62,8 +62,8 @@ public class ParserErrorsDescriptors {
}
public static abstract class DuplicatedLeftRecursiveCall extends BaseParserTestDescriptor {
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "start";
public String grammarName = "T";
@ -105,8 +105,8 @@ public class ParserErrorsDescriptors {
*/
public static class InvalidATNStateRemoval extends BaseParserTestDescriptor {
public String input = "x:x";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "start";
public String grammarName = "T";
@ -128,7 +128,7 @@ public class ParserErrorsDescriptors {
*/
public static class InvalidEmptyInput extends BaseParserTestDescriptor {
public String input = "";
public String output = "";
public String output = null;
public String errors = "line 1:0 missing ID at '<EOF>'\n";
public String startRule = "start";
public String grammarName = "T";
@ -146,7 +146,7 @@ public class ParserErrorsDescriptors {
public static class LL1ErrorInfo extends BaseParserTestDescriptor {
public String input = "dog and software";
public String output = "{'hardware', 'software'}\n";
public String errors = "";
public String errors = null;
public String startRule = "start";
public String grammarName = "T";
@ -173,7 +173,7 @@ public class ParserErrorsDescriptors {
public static class LL2 extends BaseParserTestDescriptor {
public String input = "ae";
public String output = "";
public String output = null;
public String errors = "line 1:1 no viable alternative at input 'ae'\n";
public String startRule = "a";
public String grammarName = "T";
@ -192,7 +192,7 @@ public class ParserErrorsDescriptors {
public static class LL3 extends BaseParserTestDescriptor {
public String input = "abe";
public String output = "";
public String output = null;
public String errors = "line 1:2 no viable alternative at input 'abe'\n";
public String startRule = "a";
public String grammarName = "T";
@ -211,7 +211,7 @@ public class ParserErrorsDescriptors {
public static class LLStar extends BaseParserTestDescriptor {
public String input = "aaae";
public String output = "";
public String output = null;
public String errors = "line 1:3 no viable alternative at input 'aaae'\n";
public String startRule = "a";
public String grammarName = "T";
@ -230,7 +230,7 @@ public class ParserErrorsDescriptors {
public static class MultiTokenDeletionBeforeLoop extends BaseParserTestDescriptor {
public String input = "aacabc";
public String output = "";
public String output = null;
public String errors = "line 1:1 extraneous input 'a' expecting {'b', 'c'}\n";
public String startRule = "a";
public String grammarName = "T";
@ -246,7 +246,7 @@ public class ParserErrorsDescriptors {
public static class MultiTokenDeletionBeforeLoop2 extends BaseParserTestDescriptor {
public String input = "aacabc";
public String output = "";
public String output = null;
public String errors = "line 1:1 extraneous input 'a' expecting {'b', 'z', 'c'}\n";
public String startRule = "a";
public String grammarName = "T";
@ -262,7 +262,7 @@ public class ParserErrorsDescriptors {
public static class MultiTokenDeletionDuringLoop extends BaseParserTestDescriptor {
public String input = "abaaababc";
public String output = "";
public String output = null;
/**
line 1:2 extraneous input 'a' expecting {'b', 'c'}
line 1:6 extraneous input 'a' expecting {'b', 'c'}
@ -284,7 +284,7 @@ public class ParserErrorsDescriptors {
public static class MultiTokenDeletionDuringLoop2 extends BaseParserTestDescriptor {
public String input = "abaaababc";
public String output = "";
public String output = null;
/**
line 1:2 extraneous input 'a' expecting {'b', 'z', 'c'}
line 1:6 extraneous input 'a' expecting {'b', 'z', 'c'}
@ -306,7 +306,7 @@ public class ParserErrorsDescriptors {
public static class NoViableAltAvoidance extends BaseParserTestDescriptor {
public String input = "a.";
public String output = "";
public String output = null;
public String errors = "line 1:1 mismatched input '.' expecting '!'\n";
public String startRule = "s";
public String grammarName = "T";
@ -327,7 +327,7 @@ public class ParserErrorsDescriptors {
public static class SingleSetInsertion extends BaseParserTestDescriptor {
public String input = "ad";
public String output = "";
public String output = null;
public String errors = "line 1:1 missing {'b', 'c'} at 'd'\n";
public String startRule = "a";
public String grammarName = "T";
@ -360,7 +360,7 @@ public class ParserErrorsDescriptors {
public static class SingleTokenDeletion extends BaseParserTestDescriptor {
public String input = "aab";
public String output = "";
public String output = null;
public String errors = "line 1:1 extraneous input 'a' expecting 'b'\n";
public String startRule = "a";
public String grammarName = "T";
@ -376,7 +376,7 @@ public class ParserErrorsDescriptors {
public static class SingleTokenDeletionBeforeAlt extends BaseParserTestDescriptor {
public String input = "ac";
public String output = "";
public String output = null;
public String errors = "line 1:0 extraneous input 'a' expecting {'b', 'c'}\n";
public String startRule = "a";
public String grammarName = "T";
@ -395,7 +395,7 @@ public class ParserErrorsDescriptors {
public static class SingleTokenDeletionBeforeLoop extends BaseParserTestDescriptor {
public String input = "aabc";
public String output = "";
public String output = null;
/**
line 1:1 extraneous input 'a' expecting {<EOF>, 'b'}
line 1:3 token recognition error at: 'c'
@ -417,7 +417,7 @@ public class ParserErrorsDescriptors {
public static class SingleTokenDeletionBeforeLoop2 extends BaseParserTestDescriptor {
public String input = "aabc";
public String output = "";
public String output = null;
/**
line 1:1 extraneous input 'a' expecting {<EOF>, 'b', 'z'}
line 1:3 token recognition error at: 'c'
@ -439,7 +439,7 @@ public class ParserErrorsDescriptors {
public static class SingleTokenDeletionBeforePredict extends BaseParserTestDescriptor {
public String input = "caaab";
public String output = "";
public String output = null;
public String errors = "line 1:0 extraneous input 'c' expecting 'a'\n";
public String startRule = "a";
public String grammarName = "T";
@ -475,7 +475,7 @@ public class ParserErrorsDescriptors {
public static class SingleTokenDeletionDuringLoop extends BaseParserTestDescriptor {
public String input = "ababbc";
public String output = "";
public String output = null;
public String errors = "line 1:2 extraneous input 'a' expecting {'b', 'c'}\n";
public String startRule = "a";
public String grammarName = "T";
@ -491,7 +491,7 @@ public class ParserErrorsDescriptors {
public static class SingleTokenDeletionDuringLoop2 extends BaseParserTestDescriptor {
public String input = "ababbc";
public String output = "";
public String output = null;
public String errors = "line 1:2 extraneous input 'a' expecting {'b', 'z', 'c'}\n";
public String startRule = "a";
public String grammarName = "T";
@ -507,7 +507,7 @@ public class ParserErrorsDescriptors {
public static class SingleTokenDeletionExpectingSet extends BaseParserTestDescriptor {
public String input = "aab";
public String output = "";
public String output = null;
public String errors = "line 1:1 extraneous input 'a' expecting {'b', 'c'}\n";
public String startRule = "a";
public String grammarName = "T";
@ -523,7 +523,7 @@ public class ParserErrorsDescriptors {
public static class SingleTokenInsertion extends BaseParserTestDescriptor {
public String input = "ac";
public String output = "";
public String output = null;
public String errors = "line 1:1 missing 'b' at 'c'\n";
public String startRule = "a";
public String grammarName = "T";
@ -539,7 +539,7 @@ public class ParserErrorsDescriptors {
public static class TokenMismatch extends BaseParserTestDescriptor {
public String input = "aa";
public String output = "";
public String output = null;
public String errors = "line 1:1 mismatched input 'a' expecting 'b'\n";
public String startRule = "a";
public String grammarName = "T";
@ -555,7 +555,7 @@ public class ParserErrorsDescriptors {
public static class TokenMismatch2 extends BaseParserTestDescriptor {
public String input = "( ~FORCE_ERROR~ ";
public String output = "";
public String output = null;
public String errors = "line 1:2 mismatched input '~FORCE_ERROR~' expecting {')', ID}\n";
public String startRule = "stat";
public String grammarName = "T";

View File

@ -7,7 +7,7 @@ public class ParserExecDescriptors {
public static class APlus extends BaseParserTestDescriptor {
public String input = "a b c";
public String output = "abc\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -27,7 +27,7 @@ public class ParserExecDescriptors {
public static class AStar_1 extends BaseParserTestDescriptor {
public String input = "";
public String output = "\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -47,7 +47,7 @@ public class ParserExecDescriptors {
public static class AStar_2 extends BaseParserTestDescriptor {
public String input = "a b c";
public String output = "abc\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -67,7 +67,7 @@ public class ParserExecDescriptors {
public static class AorAPlus extends BaseParserTestDescriptor {
public String input = "a b c";
public String output = "abc\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -87,7 +87,7 @@ public class ParserExecDescriptors {
public static class AorAStar_1 extends BaseParserTestDescriptor {
public String input = "";
public String output = "\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -107,7 +107,7 @@ public class ParserExecDescriptors {
public static class AorAStar_2 extends BaseParserTestDescriptor {
public String input = "a b c";
public String output = "abc\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -127,7 +127,7 @@ public class ParserExecDescriptors {
public static class AorB extends BaseParserTestDescriptor {
public String input = "34";
public String output = "alt 2\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -150,7 +150,7 @@ public class ParserExecDescriptors {
public static class AorBPlus extends BaseParserTestDescriptor {
public String input = "a 34 c";
public String output = "a34c\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -172,7 +172,7 @@ public class ParserExecDescriptors {
public static class AorBStar_1 extends BaseParserTestDescriptor {
public String input = "";
public String output = "\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -194,7 +194,7 @@ public class ParserExecDescriptors {
public static class AorBStar_2 extends BaseParserTestDescriptor {
public String input = "a 34 c";
public String output = "a34c\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -216,7 +216,7 @@ public class ParserExecDescriptors {
public static class Basic extends BaseParserTestDescriptor {
public String input = "abc 34";
public String output = "abc34\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -241,8 +241,8 @@ public class ParserExecDescriptors {
*/
public static class EOFInClosure extends BaseParserTestDescriptor {
public String input = "x";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "prog";
public String grammarName = "T";
@ -265,7 +265,7 @@ public class ParserExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "start";
public String grammarName = "T";
@ -293,7 +293,7 @@ public class ParserExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "start";
public String grammarName = "T";
@ -321,7 +321,7 @@ public class ParserExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "start";
public String grammarName = "T";
@ -349,7 +349,7 @@ public class ParserExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "start";
public String grammarName = "T";
@ -371,7 +371,7 @@ public class ParserExecDescriptors {
public static class LL1OptionalBlock_1 extends BaseParserTestDescriptor {
public String input = "";
public String output = "\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -392,7 +392,7 @@ public class ParserExecDescriptors {
public static class LL1OptionalBlock_2 extends BaseParserTestDescriptor {
public String input = "a";
public String output = "a\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -424,7 +424,7 @@ public class ParserExecDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "start";
public String grammarName = "T";
@ -445,8 +445,8 @@ public class ParserExecDescriptors {
public static class Labels extends BaseParserTestDescriptor {
public String input = "abc 34;";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -470,8 +470,8 @@ public class ParserExecDescriptors {
*/
public static class ListLabelForClosureContext extends BaseParserTestDescriptor {
public String input = "a";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "expression";
public String grammarName = "T";
@ -509,8 +509,8 @@ public class ParserExecDescriptors {
*/
public static class ListLabelsOnSet extends BaseParserTestDescriptor {
public String input = "abc 34;";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -535,8 +535,8 @@ public class ParserExecDescriptors {
*/
public static class MultipleEOFHandling extends BaseParserTestDescriptor {
public String input = "x";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "prog";
public String grammarName = "T";
@ -555,8 +555,8 @@ public class ParserExecDescriptors {
*/
public static class Optional_1 extends BaseParserTestDescriptor {
public String input = "x";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "stat";
public String grammarName = "T";
@ -573,8 +573,8 @@ public class ParserExecDescriptors {
public static class Optional_2 extends BaseParserTestDescriptor {
public String input = "if x";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "stat";
public String grammarName = "T";
@ -591,8 +591,8 @@ public class ParserExecDescriptors {
public static class Optional_3 extends BaseParserTestDescriptor {
public String input = "if x else x";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "stat";
public String grammarName = "T";
@ -609,8 +609,8 @@ public class ParserExecDescriptors {
public static class Optional_4 extends BaseParserTestDescriptor {
public String input = "if if x else x";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "stat";
public String grammarName = "T";
@ -633,7 +633,7 @@ public class ParserExecDescriptors {
public static class ParserProperty extends BaseParserTestDescriptor {
public String input = "abc";
public String output = "valid\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -656,8 +656,8 @@ public class ParserExecDescriptors {
*/
public static class PredicatedIfIfElse extends BaseParserTestDescriptor {
public String input = "if x if x a else b";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -683,7 +683,7 @@ public class ParserExecDescriptors {
public static class PredictionIssue334 extends BaseParserTestDescriptor {
public String input = "a";
public String output = "(file_ (item a) <EOF>)\n";
public String errors = "";
public String errors = null;
public String startRule = "file_";
public String grammarName = "T";
@ -715,7 +715,7 @@ public class ParserExecDescriptors {
public static class ReferenceToATN_1 extends BaseParserTestDescriptor {
public String input = "";
public String output = "\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -734,7 +734,7 @@ public class ParserExecDescriptors {
public static class ReferenceToATN_2 extends BaseParserTestDescriptor {
public String input = "a 34 c";
public String output = "a34c\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";

View File

@ -10,8 +10,8 @@ public class PerformanceDescriptors {
* https://github.com/antlr/antlr4/issues/192
*/
public static abstract class ExpressionGrammar extends BaseParserTestDescriptor {
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "program";
public String grammarName = "Expr";

View File

@ -21,7 +21,7 @@ public class SemPredEvalLexerDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -52,7 +52,7 @@ public class SemPredEvalLexerDescriptors {
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -82,7 +82,7 @@ public class SemPredEvalLexerDescriptors {
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -118,7 +118,7 @@ public class SemPredEvalLexerDescriptors {
@CommentHasStringValue // no 'm'-> transition...conflicts with pred
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -158,7 +158,7 @@ public class SemPredEvalLexerDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -193,7 +193,7 @@ public class SemPredEvalLexerDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";
@ -226,7 +226,7 @@ public class SemPredEvalLexerDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "";
public String grammarName = "L";

View File

@ -14,7 +14,7 @@ public class SemPredEvalParserDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -48,7 +48,7 @@ public class SemPredEvalParserDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -76,8 +76,8 @@ public class SemPredEvalParserDescriptors {
*/
public static class AtomWithClosureInTranslatedLRRule extends BaseParserTestDescriptor {
public String input = "a+b+a";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "start";
public String grammarName = "T";
@ -106,7 +106,7 @@ public class SemPredEvalParserDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -131,7 +131,7 @@ public class SemPredEvalParserDescriptors {
public static class DependentPredNotInOuterCtxShouldBeIgnored extends BaseParserTestDescriptor {
public String input = "a;";
public String output = "alt 2\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -159,8 +159,8 @@ public class SemPredEvalParserDescriptors {
*/
public static class DisabledAlternative extends BaseParserTestDescriptor {
public String input = "hello";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "cppCompilationUnit";
public String grammarName = "T";
@ -179,7 +179,7 @@ public class SemPredEvalParserDescriptors {
public static class IndependentPredNotPassedOuterCtxToAvoidCastException extends BaseParserTestDescriptor {
public String input = "a;";
public String output = "alt 2\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -202,7 +202,7 @@ public class SemPredEvalParserDescriptors {
public static class NoTruePredsThrowsNoViableAlt extends BaseParserTestDescriptor {
public String input = "y 3 x 4";
public String output = "";
public String output = null;
public String errors = "line 1:0 no viable alternative at input 'y'\n";
public String startRule = "s";
public String grammarName = "T";
@ -231,7 +231,7 @@ public class SemPredEvalParserDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -287,11 +287,11 @@ public class SemPredEvalParserDescriptors {
public static class PredFromAltTestedInLoopBack_2 extends PredFromAltTestedInLoopBack {
public String input = "s\n\n\nx\n\n";
public String output = "(file_ (para (paraContent s) \\n \\n) (para (paraContent \\n x) \\n \\n) <EOF>)\n";
public String errors = "";
public String errors = null;
}
public static abstract class PredTestedEvenWhenUnAmbig extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "primary";
public String grammarName = "T";
@ -317,7 +317,7 @@ public class SemPredEvalParserDescriptors {
public static class PredTestedEvenWhenUnAmbig_2 extends PredTestedEvenWhenUnAmbig {
public String input = "enum";
public String output = "";
public String output = null;
public String errors = "line 1:0 no viable alternative at input 'enum'\n";
}
@ -336,7 +336,7 @@ public class SemPredEvalParserDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -369,8 +369,8 @@ public class SemPredEvalParserDescriptors {
*/
public static class PredicateDependentOnArg2 extends BaseParserTestDescriptor {
public String input = "a b";
public String output = "";
public String errors = "";
public String output = null;
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -403,7 +403,7 @@ public class SemPredEvalParserDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -433,7 +433,7 @@ public class SemPredEvalParserDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -462,7 +462,7 @@ public class SemPredEvalParserDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -484,7 +484,7 @@ public class SemPredEvalParserDescriptors {
public static class SimpleValidate extends BaseParserTestDescriptor {
public String input = "x";
public String output = "";
public String output = null;
public String errors = "line 1:0 no viable alternative at input 'x'\n";
public String startRule = "s";
public String grammarName = "T";
@ -542,7 +542,7 @@ public class SemPredEvalParserDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -579,7 +579,7 @@ public class SemPredEvalParserDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -684,7 +684,7 @@ public class SemPredEvalParserDescriptors {
public static class UnpredicatedPathsInAlt extends BaseParserTestDescriptor {
public String input = "x 4";
public String output = "alt 1\n";
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -709,7 +709,7 @@ public class SemPredEvalParserDescriptors {
public static class ValidateInDFA extends BaseParserTestDescriptor {
public String input = "x ; y";
public String output = "";
public String output = null;
/**
line 1:0 no viable alternative at input 'x'
line 1:4 no viable alternative at input 'y'

View File

@ -15,7 +15,7 @@ public class SetsDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -32,7 +32,7 @@ public class SetsDescriptors {
public static class ComplementSet extends BaseParserTestDescriptor {
public String input = "a";
public String output = "";
public String output = null;
/**
line 1:0 token recognition error at: 'a'
line 1:1 missing {} at '<EOF>'
@ -56,7 +56,7 @@ public class SetsDescriptors {
public static class LexerOptionalSet extends BaseParserTestDescriptor {
public String input = "ac";
public String output = "ac\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -73,7 +73,7 @@ public class SetsDescriptors {
public static class LexerPlusSet extends BaseParserTestDescriptor {
public String input = "abaac";
public String output = "abaac\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -90,7 +90,7 @@ public class SetsDescriptors {
public static class LexerStarSet extends BaseParserTestDescriptor {
public String input = "abaac";
public String output = "abaac\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -107,7 +107,7 @@ public class SetsDescriptors {
public static class NotChar extends BaseParserTestDescriptor {
public String input = "x";
public String output = "x\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -124,7 +124,7 @@ public class SetsDescriptors {
public static class NotCharSet extends BaseParserTestDescriptor {
public String input = "x";
public String output = "x\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -141,7 +141,7 @@ public class SetsDescriptors {
public static class NotCharSetWithLabel extends BaseParserTestDescriptor {
public String input = "x";
public String output = "x\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -158,7 +158,7 @@ public class SetsDescriptors {
public static class NotCharSetWithRuleRef3 extends BaseParserTestDescriptor {
public String input = "x";
public String output = "x\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -177,7 +177,7 @@ public class SetsDescriptors {
public static class OptionalLexerSingleElement extends BaseParserTestDescriptor {
public String input = "bc";
public String output = "bc\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -194,7 +194,7 @@ public class SetsDescriptors {
public static class OptionalSet extends BaseParserTestDescriptor {
public String input = "ac";
public String output = "ac\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -210,7 +210,7 @@ public class SetsDescriptors {
public static class OptionalSingleElement extends BaseParserTestDescriptor {
public String input = "bc";
public String output = "bc\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -227,7 +227,7 @@ public class SetsDescriptors {
public static class ParserNotSet extends BaseParserTestDescriptor {
public String input = "zz";
public String output = "z\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -243,7 +243,7 @@ public class SetsDescriptors {
public static class ParserNotToken extends BaseParserTestDescriptor {
public String input = "zz";
public String output = "zz\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -259,7 +259,7 @@ public class SetsDescriptors {
public static class ParserNotTokenWithLabel extends BaseParserTestDescriptor {
public String input = "zz";
public String output = "z\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -275,7 +275,7 @@ public class SetsDescriptors {
public static class ParserSet extends BaseParserTestDescriptor {
public String input = "x";
public String output = "x\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -291,7 +291,7 @@ public class SetsDescriptors {
public static class PlusLexerSingleElement extends BaseParserTestDescriptor {
public String input = "bbbbc";
public String output = "bbbbc\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -308,7 +308,7 @@ public class SetsDescriptors {
public static class PlusSet extends BaseParserTestDescriptor {
public String input = "abaac";
public String output = "abaac\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -324,7 +324,7 @@ public class SetsDescriptors {
public static class RuleAsSet extends BaseParserTestDescriptor {
public String input = "b";
public String output = "b\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -340,7 +340,7 @@ public class SetsDescriptors {
public static class SeqDoesNotBecomeSet extends BaseParserTestDescriptor {
public String input = "34";
public String output = "34\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -357,7 +357,7 @@ public class SetsDescriptors {
}
public static abstract class StarLexerSingleElement extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";
@ -384,7 +384,7 @@ public class SetsDescriptors {
public static class StarSet extends BaseParserTestDescriptor {
public String input = "abaac";
public String output = "abaac\n";
public String errors = "";
public String errors = null;
public String startRule = "a";
public String grammarName = "T";

View File

@ -22,7 +22,7 @@ public class VisitorsDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -67,7 +67,7 @@ public class VisitorsDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -113,7 +113,7 @@ public class VisitorsDescriptors {
@CommentHasStringValue
public String output;
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -151,7 +151,7 @@ public class VisitorsDescriptors {
}
public static abstract class RuleGetters extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";
@ -209,7 +209,7 @@ public class VisitorsDescriptors {
}
public static abstract class TokenGetters extends BaseParserTestDescriptor {
public String errors = "";
public String errors = null;
public String startRule = "s";
public String grammarName = "T";

View File

@ -57,7 +57,7 @@ import org.antlr.v4.runtime.misc.Interval;
import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.semantics.SemanticPipeline;
import org.antlr.v4.test.runtime.ErrorQueue;
import org.antlr.v4.test.runtime.SingleTest;
import org.antlr.v4.test.runtime.RuntimeTestSupport;
import org.antlr.v4.tool.ANTLRMessage;
import org.antlr.v4.tool.DOTGenerator;
import org.antlr.v4.tool.DefaultToolListener;
@ -97,7 +97,7 @@ import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertArrayEquals;
public class BaseGoTest implements SingleTest {
public class BaseGoTest implements RuntimeTestSupport {
// -J-Dorg.antlr.v4.test.BaseTest.level=FINE
// private static final Logger LOGGER =
// Logger.getLogger(BaseTest.class.getName());

View File

@ -61,7 +61,7 @@ import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.semantics.SemanticPipeline;
import org.antlr.v4.test.runtime.ErrorQueue;
import org.antlr.v4.test.runtime.SingleTest;
import org.antlr.v4.test.runtime.RuntimeTestSupport;
import org.antlr.v4.tool.ANTLRMessage;
import org.antlr.v4.tool.DefaultToolListener;
import org.antlr.v4.tool.Grammar;
@ -109,7 +109,7 @@ import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertArrayEquals;
public class BaseJavaTest implements SingleTest {
public class BaseJavaTest implements RuntimeTestSupport {
// -J-Dorg.antlr.v4.test.BaseTest.level=FINE
private static final Logger LOGGER = Logger.getLogger(BaseJavaTest.class.getName());

View File

@ -57,7 +57,7 @@ import org.antlr.v4.runtime.misc.Interval;
import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.semantics.SemanticPipeline;
import org.antlr.v4.test.runtime.ErrorQueue;
import org.antlr.v4.test.runtime.SingleTest;
import org.antlr.v4.test.runtime.RuntimeTestSupport;
import org.antlr.v4.tool.ANTLRMessage;
import org.antlr.v4.tool.DOTGenerator;
import org.antlr.v4.tool.DefaultToolListener;
@ -103,7 +103,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
public abstract class BaseBrowserTest implements SingleTest {
public abstract class BaseBrowserTest implements RuntimeTestSupport {
// -J-Dorg.antlr.v4.test.BaseTest.level=FINE
// private static final Logger LOGGER = Logger.getLogger(BaseTest.class.getName());

View File

@ -57,7 +57,7 @@ import org.antlr.v4.runtime.misc.Interval;
import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.semantics.SemanticPipeline;
import org.antlr.v4.test.runtime.ErrorQueue;
import org.antlr.v4.test.runtime.SingleTest;
import org.antlr.v4.test.runtime.RuntimeTestSupport;
import org.antlr.v4.tool.ANTLRMessage;
import org.antlr.v4.tool.DOTGenerator;
import org.antlr.v4.tool.DefaultToolListener;
@ -95,7 +95,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
public class BaseNodeTest implements SingleTest {
public class BaseNodeTest implements RuntimeTestSupport {
// -J-Dorg.antlr.v4.test.BaseTest.level=FINE
// private static final Logger LOGGER =
// Logger.getLogger(BaseTest.class.getName());

View File

@ -60,7 +60,7 @@ import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.semantics.SemanticPipeline;
import org.antlr.v4.test.runtime.ErrorQueue;
import org.antlr.v4.test.runtime.SingleTest;
import org.antlr.v4.test.runtime.RuntimeTestSupport;
import org.antlr.v4.tool.ANTLRMessage;
import org.antlr.v4.tool.DOTGenerator;
import org.antlr.v4.tool.DefaultToolListener;
@ -101,7 +101,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
public abstract class BasePythonTest implements SingleTest {
public abstract class BasePythonTest implements RuntimeTestSupport {
// -J-Dorg.antlr.v4.test.BaseTest.level=FINE
// private static final Logger LOGGER = Logger.getLogger(BaseTest.class.getName());
public static final String newline = System.getProperty("line.separator");