Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fix for #3575, in response to antlr/antlr4test-maven-plugin#88 and #3574 (comment).
Tracking what tokens are produced in a parse is just as important as tracking the parse tree. The main problem with the .tree output file trace is that it doesn't print out detailed information about a token.
The change here automatically computes the tokens and places them in a file named after the input file with ".token" appended. Note, the suffix/extension of the file cannot be ".tokens" because that conflicts with the Antlr4 tool generated .tokens files. The .gitignore contains a pattern to ignore .tokens files!
To track the differences in the tokens produced, simply
git add
the file to the repo. To generate the file from scratch, run _scripts/test.sh or test.ps1. If you check in the token file, you should updated the pom.xml, and make sure to specify a wildcard pattern for the files to parse, e.g., examples/.sys`. If you do not, the old Maven test plugin will try to parse the .token file!*The changes are:
-tokens
and reset the lexer back to the beginning. Note, this will slow testing down because the input is lexed twice. But, it is a good test for the reset function of the port.