Pavel-Husakouski / tuco.js

Minimalist library to use for simple query grammars, built on parser combinators.
MIT License
1 stars 0 forks source link

BNF-like DSL #5

Open Pavel-Husakouski opened 10 years ago

Pavel-Husakouski commented 10 years ago

ie.

function grammar() { / verbatim > "text" text > anyChar{anyChar} / }

var parser = tuco.compile(grammar);

this should be the equivalent of

var text = anyChar(); var verbatim = between(charIs('"'), text, charIs('"'));

return verbatim;