Skip to content
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

Move to ANTLR 4 with Java 11 language features and localization of more syntax errors. #15

Open
wants to merge 150 commits into
base: java11
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
c4a5906
ANTLR 4.5 initial commit
JakubValtar Feb 16, 2015
6234762
Preproc test cleanup
JakubValtar Feb 16, 2015
409ac9b
Merge branch 'feature-antlr-4.5' of https://github.com/JakubValtar/pr…
sampottinger Mar 26, 2019
b5e1ecb
Fix merge conflicts on sampottinger#15.
sampottinger Mar 26, 2019
7c286d1
Cleanup for java build related to new ANTLR
sampottinger Mar 26, 2019
2861f70
Working but noisy ANTLR 4 with Java 11.
sampottinger Mar 26, 2019
1f41093
Working non-syntax errors reporting.
sampottinger Mar 26, 2019
6d616a9
Passable syntax error checking.
sampottinger Mar 26, 2019
7bab527
Default to STATIC if mode cannot be determined.
sampottinger Mar 26, 2019
5dd5f60
Compile with 1.8 language features.
sampottinger Mar 26, 2019
afc3c35
Fix treatment of size in antlr4 with settings method.
sampottinger Mar 27, 2019
6a3b5ca
Fix javadoc to use antlr 4.5 complete.
sampottinger Mar 27, 2019
d9746df
Remove dead code deprecated by move to ANTLR 4.
sampottinger Mar 27, 2019
3902811
Moved tests for compiler as part of ANTLR 4 refactor.
sampottinger Mar 27, 2019
54a1ab9
Restored parser, autoformat, and supporting test files.
sampottinger Mar 27, 2019
db10ac8
Finished restoring unit tests for preproc.
sampottinger Mar 27, 2019
f7520f8
Added generics and labmda test.
sampottinger Mar 27, 2019
483c585
Introduce updated Java g4 file.
sampottinger Mar 28, 2019
5c1aa19
Working primitive function calls again.
sampottinger Mar 28, 2019
bb69728
Finished restoring tests under updated grammer.
sampottinger Mar 28, 2019
473b8f2
Cleanup related to updated java grammer.
sampottinger Mar 28, 2019
2e354d9
Merge pull request #20 from sampottinger/move_java_8_antlr
sampottinger Mar 28, 2019
3ae3d85
Fix color type.
sampottinger Mar 28, 2019
9a826ae
Added some error cleanup to support kinder messages.
sampottinger Mar 29, 2019
f23c248
ANTLR for preprocessing and some related cleanup.
sampottinger Mar 29, 2019
51936a3
Allow multi-line grammatical errors.
sampottinger Mar 29, 2019
ae58e77
Minor fixes in ANTLR-based preprocessing after testing.
sampottinger Mar 29, 2019
371691f
Fix detecting identifier starting with a number.
sampottinger Mar 29, 2019
413fb1d
Fix 371691f0d4abc3a81552a46e3ca6ed34b145c483.
sampottinger Mar 29, 2019
59c3156
Fix issue in error formulation in ANTLR for ErrorTable.
sampottinger Mar 29, 2019
ca010a5
Minor edits plus documentation for new preproc contributions.
sampottinger Mar 30, 2019
23a9bbf
Minor improvements to issues re extraneous and missing token.
sampottinger Mar 30, 2019
402cf0f
Added line offset utilities for error reporting.
sampottinger Mar 30, 2019
ac8e5e9
Use original line numbers for known missing.
sampottinger Mar 30, 2019
a4ea0bc
Fix prior token finding.
sampottinger Apr 1, 2019
7195472
Second batch of documentation for sampottinger#15
sampottinger Apr 1, 2019
675af86
Start refactor for the ANTLR visitor for code quality and test.
sampottinger Apr 1, 2019
39366ab
Restored tests after refactor of PdeParseTreeListener.java.
sampottinger Apr 1, 2019
5e1026e
Finished documentation related to ANTLR-required edits.
sampottinger Apr 2, 2019
fcfd270
Finished some documentation in pdex related to new ANTLR.
sampottinger Apr 2, 2019
4fcc13c
Finish non-test quality edits related to new ANTLR migration.
sampottinger Apr 2, 2019
4215ccc
Merge pull request #24 from sampottinger/refactor_antlr_visitor
sampottinger Apr 2, 2019
28b917d
Added localization support in preproc error mapping.
sampottinger Apr 2, 2019
9d78c4b
Fix java line offset for ANTLR.
sampottinger Apr 2, 2019
95bacff
Clean up reporting of SketchException in JavaBuild / Editor.
sampottinger Apr 2, 2019
f4ad520
Added specific localization functionality for some syntax errors.
sampottinger Apr 2, 2019
d2266c4
Added limited syntax error localization support for other lang.
sampottinger Apr 2, 2019
2cdbde6
Added missing localization in PDE_el
sampottinger Apr 2, 2019
786ffce
Added additional testing related to new ANTLR implementation.
sampottinger Apr 2, 2019
8ef9fed
Minor fix in TabLineFactoryTest.
sampottinger Apr 2, 2019
ab5a331
Small typo fix in es editor.status.bad.parameter
sampottinger Apr 2, 2019
266ca1c
Update PDE_es.properties
sampottinger Apr 3, 2019
99b4569
Fix brittle compilation failure tests in ParserTests.
sampottinger Apr 3, 2019
ee820cf
Merge branch 'antlr' of github.com:sampottinger/processing into antlr
sampottinger Apr 3, 2019
bd530fc
Allow preprocessor to emit ImportStatements, fixing contrib libs.
sampottinger Apr 3, 2019
e18ccda
Merge pull request #30 from sampottinger/import_statement_antlr
sampottinger Apr 3, 2019
831636d
Minor style cleanup and bug fix in issue simplifier.
sampottinger Apr 3, 2019
58382a1
Some minor fixes in missing var name.
sampottinger Apr 3, 2019
f551967
Merge branch 'antlr' of github.com:sampottinger/processing into antlr
sampottinger Apr 3, 2019
0e13ec6
Simplify finding nearby token for error message.
sampottinger Apr 3, 2019
2dce23a
Fix MessageSimplifierUtilTest
sampottinger Apr 3, 2019
b02d437
Fix inconsistent line fix on certain missing characters.
sampottinger Apr 3, 2019
f0fc987
Minor refactor for cleanliness plus added missing generic test.
sampottinger Apr 3, 2019
9316e6e
Conformancy with existing test.
sampottinger Apr 3, 2019
cdfe09d
Minor fix in line offsets.
sampottinger Apr 3, 2019
c0f6bfd
Minor fixes in line placement within JavaBuild given new ANTLR.
sampottinger Apr 4, 2019
4c9ccd1
Allow multiple issue emit from PdePreprocessor for grammar error.
sampottinger Apr 4, 2019
3bfc061
Minor docstring update.
sampottinger Apr 4, 2019
ff8d537
Fixed special methods processing in antlr traversal.
sampottinger Apr 4, 2019
4c3eb56
Merge pull request #32 from sampottinger/fix_antlr_speical_method
sampottinger Apr 4, 2019
8397a2e
Minor fix in error reporting message for extraneous input.
sampottinger Apr 4, 2019
b25d75e
Minor fix in ExtraneousInputMessageSimplifierStrategy.
sampottinger Apr 4, 2019
485021c
Speed up preprocessing service.
sampottinger Apr 4, 2019
b5f53ce
Allow users to do weird stuff with methods matching special names.
sampottinger Apr 4, 2019
98909d7
Allow calling of strangly named special method matches.
sampottinger Apr 4, 2019
330f395
Fixed loose print
sampottinger Apr 4, 2019
dd483e1
Minor typo fix.
sampottinger Apr 4, 2019
d6d04f7
Minor edits in error message text for clarification.
sampottinger Apr 5, 2019
ac87245
Have default visibility modifier as public.
sampottinger Apr 5, 2019
b793588
Allow for inclusion of block comment in calls to size.
sampottinger Apr 5, 2019
a0af5f6
Merge pull request #38 from sampottinger/antlr_access_and_static
sampottinger Apr 5, 2019
9f32878
Pass all imports to JDT-related work as ImportStatements.
sampottinger Apr 5, 2019
9bd1ebe
Fixes for default visiblity annotated functions + fullscreen.
sampottinger Apr 5, 2019
3b22df9
Some fixes on fullscreen in global context.
sampottinger Apr 5, 2019
0f9ca0c
Clean up preprocessor comment injection.
sampottinger Apr 5, 2019
08655b3
Merge pull request #40 from sampottinger/antlr_various_fixes
sampottinger Apr 5, 2019
4ba3ae1
Fix issues related to sampottinger#37.
sampottinger Apr 6, 2019
b25fc5b
Fix insertion of public on first token.
sampottinger Apr 6, 2019
e466db3
Merge pull request #42 from sampottinger/antlr_public_fix
sampottinger Apr 6, 2019
d86abe3
Speed up preprocessing service.
sampottinger Apr 8, 2019
b7af110
Revert speed up preprocessing service.
sampottinger Apr 8, 2019
98589c2
Fix color transparency.
sampottinger Apr 8, 2019
c9ee8ef
Make SyntaxProblem a kind of JavaProblem.
sampottinger Apr 8, 2019
b441c5e
Remove loose print statement.
sampottinger Apr 8, 2019
2839fcb
Living dangerously. Moved to antlr 4.7
sampottinger Apr 8, 2019
e240d8e
Fix automated code folder imports.
sampottinger Apr 8, 2019
bf50e6c
Fix type erasure over preprocessor write.
sampottinger Apr 8, 2019
e4efb7d
Minor formatting fix on sampottinger#45.
sampottinger Apr 8, 2019
eb395fd
Minor formatting fix.
sampottinger Apr 8, 2019
e807c66
Merge branch 'antlr' into fix_antlr_code_folder
sampottinger Apr 8, 2019
21d213f
Merge pull request #46 from sampottinger/fix_antlr_code_folder
sampottinger Apr 8, 2019
2f64d31
Fix escaped characters for character literals.
sampottinger Apr 8, 2019
b5c4f40
Merge pull request #49 from sampottinger/antlr_fix_char_to_antlr
sampottinger Apr 8, 2019
dd29d73
Remove deprecated AntlrInputStream.
sampottinger Apr 8, 2019
67ed055
Allow genercised token stream in preprocessing.
sampottinger Apr 8, 2019
28d918c
Broken use of optimized Java grammar.
sampottinger Apr 9, 2019
598a5d0
Migrated to optimized Java 8 grammar.
sampottinger Apr 9, 2019
6aaf04a
Check for non method declaration containing size call.
sampottinger Apr 9, 2019
00d4eeb
Allow funky char literals.
sampottinger Apr 9, 2019
b255a00
Merge branch 'antlr' into antlr_fix_performance_to_antlr
sampottinger Apr 9, 2019
7826800
Merge pull request #51 from sampottinger/antlr_fix_performance_to_antlr
sampottinger Apr 9, 2019
28013c0
Minor cleanup for handeling automated import statements.
sampottinger Apr 9, 2019
6a17379
Merge branch 'antlr' of github.com:sampottinger/processing into antlr
sampottinger Apr 9, 2019
ba6351b
Minor refactor in the PdePreprocessor for readability.
sampottinger Apr 9, 2019
9383b6e
Remove loose print statement in Editor.java
sampottinger Apr 9, 2019
6a3961d
Updated some missing curly given new grammar.
sampottinger Apr 9, 2019
da653ca
Removed extraneous print and fixed some error msg.
sampottinger Apr 9, 2019
79e029a
Merge pull request #55 from sampottinger/antlr_remove_loose_print
sampottinger Apr 9, 2019
668352b
Fix append public when annotation is present for JDT edit.
sampottinger Apr 9, 2019
aa48e3e
Merge branch 'java11' into antlr
sampottinger Apr 9, 2019
176824a
Minor change in error description.
sampottinger Apr 10, 2019
0d4663c
Expose width and height of sketch on preprocessor result.
sampottinger Apr 11, 2019
46bc321
Provide default width / height for preprocessor result.
sampottinger Apr 11, 2019
095b72b
Fix typo on ExtraneousInputMessageSimplifierStrategy.
sampottinger Apr 11, 2019
c4fec48
Allow PdePreprocessor clients to specify code folder imports flexibly.
sampottinger Apr 12, 2019
7f3f211
Merge pull request #59 from sampottinger/antlr_fix_rename
sampottinger Apr 12, 2019
a9caa0e
Merge branch 'antlr' into processing-master
sampottinger Apr 25, 2019
002e103
Revert to antlr java/build.xml
sampottinger Apr 25, 2019
08c7a5f
Merge pull request #63 from sampottinger/processing-master
sampottinger Apr 25, 2019
2fb41c3
Use UTF8 in writing preprocessor result
sampottinger May 19, 2019
fb53698
Add missing import re #72
sampottinger May 24, 2019
425eba4
Merge pull request #72 from sampottinger/antlr-utf8
sampottinger May 24, 2019
3fcf512
Clean up comments
dzaima Jul 10, 2019
c5b047e
Merge pull request #75 from dzaima/antlr
sampottinger Jul 16, 2019
ec81610
Merge pull request #81 from sampottinger/io_refactor_revert
sampottinger Aug 10, 2019
e23de37
Minor stylistic cleanup in PdeIssueEmitter.java
sampottinger Aug 21, 2019
83c9305
Merge pull request #92 from sampottinger/antlr_clean_listener
sampottinger Aug 21, 2019
0271c20
Bump memory for Processing and default sketch memory.
sampottinger Aug 23, 2019
4796437
Fix linux memory increase for IDE.
sampottinger Aug 23, 2019
8a502c7
Merge pull request #94 from sampottinger/antlr_memory
sampottinger Aug 23, 2019
179b4c8
Minor fix in error line attribution for ANTLR.
sampottinger Aug 23, 2019
bb4b4bb
Merge pull request #97 from sampottinger/antlr_line_correction
sampottinger Aug 23, 2019
c8cf212
Implemented check for imports in class bodies.
sampottinger Aug 26, 2019
060b8d3
Added localization for import statment inside class body.
sampottinger Aug 26, 2019
6036d2e
Add missing PdeParseTreeErrorListener.java
sampottinger Aug 26, 2019
92814ba
Merge pull request #101 from sampottinger/antlr_detect_bad_import
sampottinger Aug 26, 2019
8e0bf4e
Opened access to Java 11 language features.
sampottinger Aug 28, 2019
0d0219a
Merge pull request #105 from sampottinger/antlr_var
sampottinger Aug 29, 2019
c05e85a
Fixed license header in .g4 files.
sampottinger Sep 2, 2019
3498243
Merge pull request #109 from sampottinger/antlr_update_grammar_license
sampottinger Sep 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/src/processing/app/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public class Platform {

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

static public boolean isInit() {
return inst != null;
}


static public void init() {
try {
Expand Down
2 changes: 1 addition & 1 deletion app/src/processing/app/tools/InstallCommander.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ public boolean accept(File dir, String name) {
list.append(jar.getAbsolutePath());
}
}
}
}
7 changes: 3 additions & 4 deletions app/src/processing/app/ui/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2898,7 +2898,6 @@ public void statusError(String what) {
* Show an exception in the editor status bar.
*/
public void statusError(Exception e) {
e.printStackTrace();
// if (e == null) {
// System.err.println("Editor.statusError() was passed a null exception.");
// return;
Expand All @@ -2909,9 +2908,7 @@ public void statusError(Exception e) {

// Make sure something is printed into the console
// Status bar is volatile
if (!re.isStackTraceEnabled()) {
System.err.println(re.getMessage());
}
System.err.println(re.getMessage());

// Move the cursor to the line before updating the status bar, otherwise
// status message might get hidden by a potential message caused by moving
Expand Down Expand Up @@ -2940,6 +2937,8 @@ public void statusError(Exception e) {
textarea.getLineStopOffset(line) - 1);
}
}
} else {
e.printStackTrace();
}

// Since this will catch all Exception types, spend some time figuring
Expand Down
53 changes: 0 additions & 53 deletions app/test/resources/annotations.expected

This file was deleted.

29 changes: 0 additions & 29 deletions app/test/resources/bug1064.expected

This file was deleted.

41 changes: 0 additions & 41 deletions app/test/resources/bug136.expected

This file was deleted.

29 changes: 0 additions & 29 deletions app/test/resources/bug1362.expected

This file was deleted.

28 changes: 0 additions & 28 deletions app/test/resources/bug1442.expected

This file was deleted.

37 changes: 0 additions & 37 deletions app/test/resources/bug1511.expected

This file was deleted.

29 changes: 0 additions & 29 deletions app/test/resources/bug1512.expected

This file was deleted.

45 changes: 0 additions & 45 deletions app/test/resources/bug1518a.expected

This file was deleted.

43 changes: 0 additions & 43 deletions app/test/resources/bug1518b.expected

This file was deleted.

9 changes: 0 additions & 9 deletions app/test/resources/bug1519.pde

This file was deleted.