Commit graph

11 commits

Author SHA1 Message Date
David Majda 70e4166bb2 Fix typo in a comment in JavaScript example grammar 2012-02-12 15:35:26 +01:00
David Majda 8ae3eea7c4 Fix typo in JavaScript example grammar
Fixes GH-62.
2012-02-04 22:25:06 +01:00
Jason Davies d386d3a351 Fix typo in comment. 2011-10-09 16:38:26 +01:00
David Majda 5cf66d824c Fix typo in JavaScript example grammar 2011-08-15 20:14:34 +02:00
David Majda 5f810f803b Make example grammars compatible with Rhino 2010-06-08 17:01:54 +02:00
David Majda ee8c121676 Use labeled expressions and variables instead of $1, $2, etc.
Labeled expressions lead to more maintainable code and also will allow
certain optimizations (we can ignore results of expressions not passed
to the actions).

This does not speed up the benchmark suite execution statistically
significantly on V8.

Detailed results (benchmark suite totals):

---------------------------------
 Test #     Before       After
---------------------------------
      1   28.43 kB/s   28.46 kB/s
      2   28.38 kB/s   28.56 kB/s
      3   28.22 kB/s   28.58 kB/s
      4   28.76 kB/s   28.55 kB/s
      5   28.57 kB/s   28.48 kB/s
---------------------------------
Average   28.47 kB/s   28.53 kB/s
---------------------------------

Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.55 Safari/533.4
2010-06-07 09:23:04 +02:00
David Majda 409ddf2ae8 Formatted all grammars more consistently and transparently
This is purely cosmetical change, no functionality was affected
(hopefully).
2010-05-31 16:35:03 +02:00
David Majda 698564a3c2 Replace ":" after a rule name with "="
I'll introduce labelled expressions shortly and I want to use ":" as a
label-expression separator. This change avoids conflict between the two
meanings of ":". (What would e.g. "foo: 'bar'" mean?  Rule "foo"
matching string "bar", or string "bar" labelled "foo"?)
2010-05-31 16:31:45 +02:00
David Majda f9ea46ef15 Fix string literal parsing in the JavaScript grammar 2010-05-31 15:26:35 +02:00
David Majda 7fc491412d Work around the fact that IE does not recognize "\v" in strings. 2010-04-14 21:29:05 +02:00
David Majda 6a194e8f68 Added example JavaScript parser. 2010-04-11 13:18:23 +02:00