210 Commits (7d13580855b9d488297cca61a83d1c56a7b71345)

Author SHA1 Message Date
David Majda c8836c0312 Remove two unused variables 14 years ago
David Majda 7b03f164b8 Avoid passing |context| in the generated parser
Passing the context is not necessary, global variable is good enough
(passing the context would make more sense if each AST node was
translated into a function call, but this isn't the case).

The performance gain is very small, on the border of statstical error.

Results of benchmark with 100 runs on V8:

  Before:  31.49 kB/s
  After:   31.57 kB/s
  Speedup: 0.254 %

Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like
Gecko) Chrome/5.0.375.127 Safari/533.4
14 years ago
David Majda a42b957573 Remove now mostly useless comment headers from the code 14 years ago
David Majda f82a4ebf28 Compiler checks and passes are named for easier reference from tests 14 years ago
David Majda 906488027b Fix stupid mistakes in the |buildNodeVisitor| function 14 years ago
David Majda f787793848 Rename |node| -> |subnode| to avoid aliasing 14 years ago
David Majda 088c78e88c Fix incorrect variable name on two places 14 years ago
David Majda 4d50a37b14 Extract |buildNodeVisitor| 14 years ago
David Majda 1279e87766 Simplify utility functions structure + do not export them as part of the PEG object 14 years ago
David Majda e59f3ba338 Split the source code into several files, introduce build system
The source code is now in the src directory. The library needs to be
built using "rake", which creates the lib/peg.js file by combining the
source files.
14 years ago