Directory groovy/jsr/ideas/parsers/antlr/misc/

Directory Created:
2004-12-13 13:04
Total Files:
6
Deleted Files:
0
Lines of Code:
4404

Browse with ViewVC

[root]/groovy/jsr/ideas/parsers/antlr/misc

Lines of Code

groovy/jsr/ideas/parsers/antlr/misc/ Lines of Code

Developers

Author Changes Lines of Code Lines per Change
jez 19 (100.0%) 5089 (100.0%) 267.8

Most Recent Commits

jez 2005-02-04 00:41

* Added amendments suggested by Christopher Schultz

7 lines of code changed in:

jez 2005-02-03 22:59

* spot the silly typos :-)

12 lines of code changed in:

jez 2005-02-03 22:49

* 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:

jez 2005-01-25 11:34

* 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:

jez 2005-01-18 22:17

* 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:

jez 2005-01-18 16:14

* fixed some of the more obvious issues, still much non-determinism left however...

28 lines of code changed in:

jez 2005-01-18 10:24

* 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:

jez 2005-01-17 21:22

* finally got as far as the lexer, not far to go now... whee this is fun

265 lines of code changed in:

jez 2005-01-17 09:31

* a few more productions, precedence of operators etc

403 lines of code changed in:

jez 2005-01-12 20:41

* a few more productions, this time including some statements and the quite interesting for loops (classic, each, in)

246 lines of code changed in:

jez 2005-01-12 10:43

* still working through adding groovy productions to the 1.5 grammar

85 lines of code changed in:

jez 2005-01-11 20:39

* another few productions added to the 1.5 grammar

83 lines of code changed in:

jez 2005-01-10 20:29

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:

jez 2005-01-10 20:27

* for ease of comparison, I am placing the baseline studman grammar here

52 lines of code changed in:

jez 2005-01-10 20:25

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:

jez 2004-12-13 22:47

* 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:

jez 2004-12-13 13:04

* Added dummy antlr/ant project, ready to take groovy.g when it's ready...

1305 lines of code changed in:

Generated by StatSVN 0.3.2-SNAPSHOT