purs-puppy
v0.1.0
Published
An LR parser generator for PureScript
Maintainers
Readme
🐶 purs-puppy
An LR parser generator for PureScript.
Puppy turns a grammar into a PureScript parser. You write the grammar and what each rule means; Puppy works out the parsing table and writes a module.
npm install --save-dev purs-puppyPuppy assumes your project is organised with
spago. Grammars use the .pursy
extension and live under src:
puppy -p my-packageThat finds every grammar under the package's src and writes each one's parser
module beside it. A single grammar can be named directly:
puppy src/Foo/Parser.pursy -m Foo.ParserA generated module depends on puppy-runtime and nothing else of Puppy's. The
generator is not needed to build or run what it produced.
puppy-runtime is not in the PureScript registry yet, so for now name it as an
extra package pointing at the subdirectory it lives in:
workspace:
extraPackages:
puppy-runtime:
git: https://github.com/katsujukou/puppy.git
ref: v0.1.0
subdir: puppy-runtimeRead the documentation for the grammar language, the shape of what Puppy generates, and how to read a conflict report.
