-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change individual to grouped parsing #2988
Comments
There is one problem with warm-up parsing: the script is designed to produce one .error and one .tree file when needed. For example, in antlr/antlr4/examples, grammar three.g4 does not parse, and should produce the file three.g4.errors. Likewise, in arithmetic/examples, there are several .tree files containing the parse trees for those files. I think the solution is to have an option to shunt output to a .error and/or .tree file when parsing, instead of sending everything to stderr/stdout. |
* Changes for #2988 * Prior to this PR, .errors files were hand-constructed. This is not sustainable. All .errors and .trees that are tracked in Git repo must be generated exactly from the program consistently. Errors in the .errors files must have exactly one newline terminating the error. The parse tree in the .tree file does not have a newline terminating the tree. * Renamed interfering Test.java sources--trgen much better tester. * Actually, you can't ignore .errors even if tracked because this .gitignore causes any diffs in the tracked to be ignored as well, completely defeating the whole purpose. Makes absolutely zero sense writers of Git because .gitignore is a "broad brush" setting, and tracking a specific file ***should be*** a fine brush overriding the broad brush. * Build failed with absolutely no output, no data on why it failed. This file changed last, cause massive failure in github actions. Push something to test again. * Remove mvn builds.
Testing in the V4 repo parse one input file per test program, which I call individual parsing. But, we can save a good deal of time by parsing multiple input files per test program, called grouped parsing. Let's see what this looks like in the output from a build:
With grouped parsing, the run time for inputs after the first are much shorter:
Grouped parsing will help for Java, CSharp, and probably a few other targets. But, it may not fix targets like PHP, which show no speed-up with warm-up. See antlr/antlr-php-runtime#36.
To implement grouped parsing, the newest version of Trash trgen will need to be employed, as well as the templates in this repo updated.
There is still a significant amount of time required to generate and compile the drivers, so the builds will still be slow.
The text was updated successfully, but these errors were encountered: