20 lines
529 B
Markdown
20 lines
529 B
Markdown
# recipes parser
|
|
|
|
Parsing grammars requires the `pegasus` software: https://github.com/DanilaFe/pegasus
|
|
|
|
# toying with spec library
|
|
|
|
The parser is composed of two main files:
|
|
* `parser.cr`, lexer + grammar
|
|
* `spec.cr`, high-level parser to include in softwares
|
|
|
|
# toying with new grammar
|
|
|
|
After downloading the `pegasus̀` software.
|
|
|
|
```sh
|
|
# simple example for debug & chill
|
|
watch -d ./build.sh test-grammars/simpletokens 2>/dev/null | grep -vE "(Token|^[)])"
|
|
../pegasus/bin/pegasus-crystal < test-grammars/simpletokens.json
|
|
```
|