[root]/groovy/jsr/ideas/parsers/antlr/misc
* Added amendments suggested by Christopher Schultz
7 lines of code changed in:
* spot the silly typos :-)
12 lines of code changed in:
* a script to pull out the useful classes for runtime execution of antlr,
* hoping to reduce the 400k dependancy down to 40k or so...
61 lines of code changed in:
* added changes based on jrose comments http://article.gmane.org/gmane.comp.lang.groovy.jsr/401
*** All uses of the new nonterminal annotation should by accompanied by
'nls!', by analogy with modifier.
> // TODO - verify that 't' is useful/correct here, used to be 'rt'
*** Yes, that's correct. ??The effect of declaratorBrackets would be a no-op
if the brackets are not present.
*** There's a lookahead (declaration)=> which should probably be
(declarationStart)=>.
*** The 'for' syntax is too back-tracky for my taste; it probably hides
ambiguities.
I don't favor supporting both {for (x in y)} and {for (x : y)}.
The former is what the Java designers would have used, if they had been
able to introduce the key word 'in'; let's do it right without worrying
about sideways compatibility.
The rule I propose is "if there are semicolons inside the for-head, we
support Java 1.4-type loops, else it's a Groovy x-in-y loop. ??And
change colon to 'in' when porting from Java."
Therefore, there's no need at all for squeezing in the new Java 5 "for"
syntax, since Groovy's is a suitable alternative.
Even if I get outvoted and we support the Java 5 syntax, I'd prefer for
it to be stuck onto the side of the grammar, later, not irretrievably
wedged now into the middle.
*** The argumentLabelStart rule has a typo: ??too many COLON tokens.
*** Also, '.' ('0'..'9')* should be '.' ('0'..'9')+ instead.
59 lines of code changed in:
* Grammar file is now at the stage where antlr will generate a parser, and the TCK can be run over the result
* However, there still remains some non-determinism within this parser which is visible as antlr warnings during generation
218 lines of code changed in:
* fixed some of the more obvious issues, still much non-determinism left however...
28 lines of code changed in:
* Finished initial port across from groovy.g to Studman's 1.5 grammar
* Next stage is to make sure the grammar is valid...
154 lines of code changed in:
* finally got as far as the lexer, not far to go now... whee this is fun
265 lines of code changed in:
* a few more productions, precedence of operators etc
403 lines of code changed in:
* a few more productions, this time including some statements and the quite interesting for loops (classic, each, in)
246 lines of code changed in:
* still working through adding groovy productions to the 1.5 grammar
85 lines of code changed in:
* another few productions added to the 1.5 grammar
83 lines of code changed in:
I have taken java.g for Java1.5 from Michael Studman (1.22.4)
and have begun applying the groovy.diff from java.g (1.22)
back onto the new root (1.22.4)
(by hand, as 'patch' won't be enough)
for a map of the task see...
http://groovy.javanicus.com/java-g.png
(apologies for committing thrice, but I have put the base Studman grammar
in at r1.2, for ease of comparison)
171 lines of code changed in:
* for ease of comparison, I am placing the baseline studman grammar here
52 lines of code changed in:
I have taken java.g for Java1.5 from Michael Studman (1.22.4)
and have begun applying the groovy.diff from java.g (1.22)
back onto the new root (1.22.4)
(by hand, as 'patch' won't be enough)
for a map of the task see...
http://groovy.javanicus.com/java-g.png
1940 lines of code changed in:
* added the syndiag tool. This provides a graphical view of valid antlr .g files
* for usage and other info see http://syndiag.javanicus.com
0 lines of code changed in:
* Added dummy antlr/ant project, ready to take groovy.g when it's ready...
1305 lines of code changed in: