This repository has been archived on 2022-01-17. You can view files and clone it, but cannot push or open issues/pull-requests.
2019-07-31 20:10:16 +02:00
|
|
|
# recipes parser
|
2019-07-24 05:26:14 +02:00
|
|
|
|
|
|
|
Parsing grammars requires the `pegasus` software: https://github.com/DanilaFe/pegasus
|
2019-07-31 19:38:40 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
```
|