Skip to content

rictic/jsparse

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsparse
=======

This is a simple library of parser combinators for Javascript based on
Packrat parsers [1] and Parsing expression grammars [2].

[1] http://pdos.csail.mit.edu/~baford/packrat/
[2] http://en.wikipedia.org/wiki/Parsing_expression_grammar

The only documentation currently available in these blog entries:

http://www.bluishcoder.co.nz/2007/10/javascript-packrat-parser.html
http://www.bluishcoder.co.nz/2007/10/javascript-parser-combinators.html

Examples:

tests.js
  Various tests to ensure things are working

examples/example1.js
  Simple expression example from wikipedia article on PEGs.

examples/example2.js
  Expression example with actions used to produce AST.

examples/example3.js
  Expression example with actions used to evaluate as it parses.

examples/es3.js
  Incomplete/work-in-progress ECMAScript 3 parser (currently broken)

examples/es3_tests.js
  Tests for ECMAScript 3 parser

It has been updated to work in nodejs as well as in the browser.

About

JavaScript Parser Combinator Library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%