An open API service indexing awesome lists of open source software.

https://github.com/jaimecgomezz/dft.p

dft instructions parser
https://github.com/jaimecgomezz/dft.p

parser

Last synced: about 2 months ago
JSON representation

dft instructions parser

Awesome Lists containing this project

README

          

dft.p
--------------------------------------------------------------------------------
dft instructions file parser

description
--------------------------------------------------------------------------------
this lib/bin project is the official tool to parse, lint and fix .dft files

why
--------------------------------------------------------------------------------
while working in the dft project I realized 2 things:

- the dft tool itself shouldn't be responsible of parsing the instructions
file, but rather the execution itself

- haven't made a parser yet, so... here's one

grammar (BNF)
--------------------------------------------------------------------------------
:=
|
;

:=
;
;

:=
;

:= SET
| ADD
| ALIAS
| MERGE
| IGNORE
| RENAME
| FILTER
| COERCE
| DISTINCT
| VALIDATE
;

:=
| ,
;

:= String
;

:=
|

;

:=
;

:= OR
| TO
| TYPED
| RESCUE
| DEFAULT
| MATCHING
;

:=
|
|
|
|
;

:= f64
| String
| bool
| isize
;

:= FLOAT
| STRING
| INTEGER
| BOOLEAN
;

:= URI
| UUID
| DATE
| TIME
| EMAIL
| DATETIME
;

:= HALT
| NOTIFY
| DISCARD
;

:= EQUALS
| LESSER
| DIFFERS
| GREATER
| EQLESSER
| EQGREATER
;

TODO
--------------------------------------------------------------------------------
[] Improve combinators that return lists
[] Improve error verbosity