3
0
Fork 0
This is a prequel to `package.mk`. Conserved for historical reasons and as a Crystal code example.
This repository has been archived on 2022-01-17. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
Go to file
Philippe Pittoli 4f4b2590e8 parse! => parse 2021-03-01 16:29:04 +01:00
samples
src Multi-lines + exceptions give the erroneous line. 2021-03-01 16:13:22 +01:00
.gitignore
README.md
build.sh
debug.cr parse! => parse 2021-03-01 16:29:04 +01:00
read-spec.cr
shard.yml Multi-lines + exceptions give the erroneous line. 2021-03-01 16:13:22 +01:00

README.md

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.

# 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