6 Commits (2120de36af601277daa232ec7f72a2c48d491437)

Author SHA1 Message Date
David Majda 2120de36af Behave like CommonJS module in CommonJS context 14 years ago
David Majda 2d38c5cab3 Handle non-unique expected values of match failuers differently
Before this commit, uniqueness was checked when addding the failure. Now
we make the entiries unique when generating the error report, saving a
little time when the parsing is successful. This does not increase the
benchmark numbers too much though.

Results of benchmark with 100 runs on V8:

  Before:  37.25 kB/s
  After:   37.41 kB/s
  Speedup: 0.241 %

Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like
Gecko) Chrome/6.0.472.63 Safari/534.3
14 years ago
David Majda 906488027b Fix stupid mistakes in the |buildNodeVisitor| function 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