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
- Host: GitHub
- URL: https://github.com/jaimecgomezz/dft.p
- Owner: jaimecgomezz
- License: mit
- Created: 2022-01-10T01:30:15.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-24T03:26:36.000Z (over 4 years ago)
- Last Synced: 2025-10-18T06:45:24.753Z (8 months ago)
- Topics: parser
- Language: Rust
- Homepage: https://crates.io/crates/dftp
- Size: 55.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
- License: LICENSE
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