Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doublec/jsparse
JavaScript Parser Combinator Library
https://github.com/doublec/jsparse
Last synced: 21 days ago
JSON representation
JavaScript Parser Combinator Library
- Host: GitHub
- URL: https://github.com/doublec/jsparse
- Owner: doublec
- Created: 2010-03-17T22:12:24.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-04-20T01:27:33.000Z (over 13 years ago)
- Last Synced: 2024-07-31T21:54:48.820Z (4 months ago)
- Language: JavaScript
- Homepage: http://www.bluishcoder.co.nz/2007/10/javascript-packrat-parser.html
- Size: 251 KB
- Stars: 112
- Watchers: 7
- Forks: 17
- Open Issues: 1
-
Metadata Files:
- Readme: readme.txt
Awesome Lists containing this project
- awesome-combinator-parsers - jsparse
README
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_grammarThe 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.htmlExamples:
tests.js
Various tests to ensure things are workingexample1.js
Simple expression example from wikipedia article on PEGs.example2.js
Expression example with actions used to produce AST.example3.js
Expression example with actions used to evaluate as it parses.es3.js
Incomplete/work-in-progress ECMAScript 3 parseres3_tests.js
Tests for ECMAScript 3 parserI use it from within the Mozilla Rhino environment but it also works
in the browser.