diff options
| author | Taylan Kammer <taylan.kammer@gmail.com> | 2026-01-12 08:03:38 +0100 |
|---|---|---|
| committer | Taylan Kammer <taylan.kammer@gmail.com> | 2026-01-12 08:03:38 +0100 |
| commit | 2f77b3ceaa2989d944296c572a07b2caee39d9d4 (patch) | |
| tree | 93b5838d5d49e7f7f23796c1accc089a5b78eacd /docs/c1/grammar/zbnf.txt | |
| parent | b7a386f1da020cb4dde8d37e96170ea4299def30 (diff) | |
Update HTML stuff.
Diffstat (limited to 'docs/c1/grammar/zbnf.txt')
| -rw-r--r-- | docs/c1/grammar/zbnf.txt | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/docs/c1/grammar/zbnf.txt b/docs/c1/grammar/zbnf.txt new file mode 100644 index 0000000..551c319 --- /dev/null +++ b/docs/c1/grammar/zbnf.txt @@ -0,0 +1,63 @@ +# Custom notation with PEG semantics + +Stream : Unit ( Blank Unit )* + +Unit : Blank* [Datum] + + +Blank : '\t'...'\r' | SP | Comment + +Datum : OneDatum ( [JoinChar] OneDatum )* + +JoinChar : '.' | ':' + + +Comment : ';' ( SkipUnit | SkipLine ) + +SkipUnit : '~' Unit + +SkipLine : ( ~LF )* [LF] + + +OneDatum : BareString | CladDatum + + +BareString : ( '.' | '+' | '-' | DIGIT ) ( BareChar | '.' )* + | BareChar+ + +CladDatum : PipeStr | QuoteStr | HashExpr | QuoteExpr | List + +PipeStr : '|' ( PipeStrChar | '\' StringEsc )* '|' +QuoteStr : '"' ( QuotStrChar | '\' StringEsc )* '"' +HashExpr : '#' ( RuneExpr | LabelExpr | HashDatum ) +QuoteExpr : "'" Datum | '`' Datum | ',' Datum +List : ParenList | SquareList | BraceList + +BareChar : ALPHA | DIGIT + | '!' | '$' | '%' | '*' | '+' + | '-' | '/' | '<' | '=' | '>' + | '?' | '@' | '^' | '_' | '~' + +PipeStrChar : ~( '|' | '\' ) +QuotStrChar : ~( '"' | '\' ) + +StringEsc : '\' | '|' | '"' | ( HTAB | SP )* LF ( HTAB | SP )* + | 'a' | 'b' | 't' | 'n' | 'v' | 'f' | 'r' | 'e' + | 'x' HexByte+ ';' + | 'u' UnicodeSV ';' + +HexByte : HEXDIG HEXDIG +UnicodeSV : HEXDIG+ + +RuneExpr : Rune [ '\' BareString | CladDatum ] +LabelExpr : '%' Label ( '%' | '=' Datum ) +HashDatum : '\' BareString | CladDatum + +Rune : ALPHA ( ALPHA | DIGIT )* +Label : HEXDIG+ + +ParenList : '(' ListBody ')' +SquareList : '[' ListBody ']' +BraceList : '{' ListBody '}' + +ListBody : Unit* [ Blank* '&' Unit ] Blank* |
