FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
Search
\
Report a Bug
\
Reports
\
Requests
\
Login
Bug 598 : Update ANTLR grammars to support Java 1.5 syntax
Last modified: 2009-11-01 17:39
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status
:
ASSIGNED
Resolution
:
-
Pr
i
ority
:
P3
Severity
:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
fry
Assigned To
:
fry
Attachment
Type
Created
Size
Actions
Create a New Attachment
(proposed patch, testcase, etc.)
View All
Votes
:
0
Show votes for this bug
Vote for this bug
S
ummary:
Update ANTLR grammars to support Java 1.5 syntax
C
omments:
U
RL:
Please use attachments to demonstrate the bug you are reporting.
Description
: Opened: 2007-07-16 07:30
We can't currently support the syntax changes in Java 1.5+ because the
grammar for the preprocessor needs to be updated.
The grammar is called pde.g, and is an extension of the java.g grammar
found in app/antlr/java. Anyone who has the chops to update the java.g
grammar from 1.3 to 1.5 would be greatly appreciated. In addition then, the
grammar for pde.g needs to be updated to make sure it still works.
This is a time consuming/mind-bending process, and has been put off since
the new Java syntax features are not a priority, and using
ArrayList<Integer> is way slower than just dealing with an int array... and
speed is important for interactive graphics.
Additional Comment
#1 From fry 2007-07-16 07:30
***
Bug 459
has been marked as a duplicate of this bug. ***
Additional Comment
#2 From h3 2008-01-29 17:36
Some direction and a list of what syntax changes would be helpful. Got
some links?
Elaborate on the statement "Updated to make sure it still works"? Do you
really mean "adapt the new pde.g with 1.5 syntax including backwards
compatibility for previous versions of pde.g.." or..?
Additional Comment
#3 From Classiclll 2008-07-26 00:22
[Request]
grammar "import static xxx" support will make it easy to handle a static method
correction(class).
Additional Comment
#4 From tobi 2009-09-02 08:34
There are grammar files for Java 1.5 [1] and Java 1.6 [2] linked at
http://www.antlr.org/grammar/list
; would they be of any help?
--
[1]
http://www.antlr.org/grammar/1152141644268/Java.g
[2]
http://openjdk.java.net/projects/compiler-grammar/antlrworks/Java.g
Additional Comment
#5 From fry 2009-09-02 08:38
Those are the starting point, the major work comes from porting the
Processing extensions to those new grammars and ANTLR v3 syntax. One of
those 1.5/1.6 grammars will replace the java.g file in the source, it's the
pde.g file (the extensions to java.g) that is most of the work.
The once that's finished, the emitter code needs to be updated so that we
can re-create java source after it's been run through the grammar.
Additional Comment
#6 From fry 2009-11-01 17:39
***
Bug 1366
has been marked as a duplicate of this bug. ***