jsdatalogparser
v0.0.3
Published
'datalog' + AST tree.
Readme
Setup and Running
Parse really simple datalog programs
A(x, y) :- B(c, d)
A(x, y) :- B(c, d), A(e, f)
A(x, y) :- B(c, d), c > 1
A(x, y) :- B(c, d), c * d > 1
A(x, y) :- B(c, d), c + 1 > 1, d < 1
A(x, sum(y)) :- B(c, d)Files
pegs/datalog.pegjsis the grammar file for the language. Runningpegjs ./pegs/datalog.pegjswill generate a javascript parser file as./pegs/sql.jssrc/ast.coffeedefines the AST nodes for the language. It's a rough subset of SQL and interaction statements.
Getting started
install stuff
npm install . cp node_modules/pegjs/bin/pegjs . pip install fabricfabcommandsfab -lcompile parser
fab pegcompile modules
fab coffeerun a test in
./tests/fab parser
