Permalink
Browse files

Add PEG.js Lisp parser based on our example grammar; runs at similar …

…speed to our parser.
  • Loading branch information...
1 parent e02cf5b commit 6a67b43dc047e5bd550f8909c504c625f8dcd6a7 @jcoglan committed May 1, 2010
Showing with 861 additions and 0 deletions.
  1. +5 −0 examples/lisp.js
  2. +856 −0 examples/pegjs/lisp.js
View
@@ -1,6 +1,7 @@
load('vendor/js.class/build/min/core.js');
load('build/stake-min.js');
load('examples/benchmark.js');
+load('examples/pegjs/lisp.js');
grammar = 'grammar CompiledLisp \
\
@@ -29,3 +30,7 @@ benchmark('Combinator parser', 20, function() {
CombinatorLispParser.parse(program);
});
+benchmark('PEG.js parser', 20, function() {
+ LispParser.parse(program);
+});
+
Oops, something went wrong.

0 comments on commit 6a67b43

Please sign in to comment.