Move to ANTLR 4 with Java 11 language features and localization of more syntax errors. by sampottinger · Pull Request #15 · sampottinger/processing

and others added 6 commits

February 16, 2015 23:41
based on work of Florian Jenett

- included ANTLR 4.5, building PDE and running sketches works
- error reporting is not yet implemented
- parses size() and adds sketchXxxx methods
- moved tests to java mode folder
- fixed expected whitespace in tests
- added sketchXxxx methods to expected test outputs
- error reporting tests are disabled, other tests are gree

@sampottinger sampottinger changed the title Move to ANTLR 4 with Java 8 language features. [WIP] Move to ANTLR 4 with Java 8 language features.

Mar 26, 2019

@sampottinger

This was referenced

Mar 27, 2019

@sampottinger

@sampottinger

@sampottinger

@sampottinger

@sampottinger

@sampottinger

@sampottinger

@sampottinger

@sampottinger

@sampottinger

Migrate the Java 8 antlr file.

@sampottinger

@sampottinger

Some style clean up, added error msg handling, and a switch to using ANTLR for all preprocessing within the PreprocessingService.

@sampottinger

@sampottinger

Revert of sampottinger/processing #3 for the antlr branch.
Minor stylistic cleanup in PdeIssueEmitter.java, keeping identical base class method implementations in place and fixing long lines.
Minor stylistic cleanup in PdeIssueEmitter.java
We are seeing some sketches exceed the heap limits either through the JDT or ANTLR when they are very large (>50k lines). This PR increases the heap for helping the IDE keep up when the parse trees get larger. Separately, looking at benchmarks online, Java 11 is super fast but it may be a little less prudent on the heap. So, increasing the default sketch max memory to match the IDE.

@sampottinger

sampottinger added a commit to sampottinger/ROMANESCO-Processing that referenced this pull request

Aug 23, 2019
Unfortunately, mainline Processing is inconsistent on if imports within class bodies are allowed by the language definition. JavaBuild currently allows it (though does not explicitly permit it) while SourceUtil assumes that imports are "hoistable" to the top of the sketch so imply that the language does not permit it. The Sam Pottinger branch of Processing (specifically sampottinger/processing#15) makes SourceUtil's assumption explicity by dissallowing import statements within class bodies. This PR updates romanesco in response.
Bump memory for Processing and default sketch memory.

@sampottinger

Minor fix in error line attribution for ANTLR.
Implemented check for imports in class bodies without localization, providing a more informative error message when imports end up in unexpected places.

@sampottinger

@sampottinger

Detect import within class body.
Moved from Java 8 to Java 11 for Compiler and JDT. Also added gramatical support for local variable type inference (var).
Opened access to Java 11 language features.

@sampottinger sampottinger changed the title Move to ANTLR 4 with Java 8 language features and localization of more syntax errors. Move to ANTLR 4 with Java 11 language features and localization of more syntax errors.

Aug 29, 2019

@sampottinger

Fixed license header in .g4 files.