Author: Rob Raisch [email protected]
Create a parser for "{float a =3;a*3+1;}" such that it will produce a result value of 10 per the StackOverflow question "The element of the two statements are mutually referenced with peg.js"
- pegjs - see pegjs.org
- util - used in grammar.js to format optional debugging messages
- assert - used in testParser to check parsing result
npm install pegjs
pegjs -o parser.js grammar.pegjs
node testParser
- README.md - this file
- grammar.pegjs - parser grammar
- testParser.js - simple test jig