summaryrefslogtreecommitdiff
path: root/spec/syntax.zbnf
diff options
context:
space:
mode:
authorTaylan Kammer <taylan.kammer@gmail.com>2026-01-06 04:36:46 +0100
committerTaylan Kammer <taylan.kammer@gmail.com>2026-01-06 04:36:46 +0100
commitd2f3a2351271e22248d7c2f11c8f69bbe244e56a (patch)
tree004a15be4b96a8a50ef915e66951124ef8037fb0 /spec/syntax.zbnf
parent94521a2cf4dfe82bc67a2998013cf6bed7c86869 (diff)
Update syntax spec.
Diffstat (limited to 'spec/syntax.zbnf')
-rw-r--r--spec/syntax.zbnf19
1 files changed, 9 insertions, 10 deletions
diff --git a/spec/syntax.zbnf b/spec/syntax.zbnf
index 5656864..d920845 100644
--- a/spec/syntax.zbnf
+++ b/spec/syntax.zbnf
@@ -8,40 +8,39 @@ Datum : OneDatum ( [JoinChar] OneDatum )*
JoinChar : '.' | ':'
-Comment : ';' ( SkipUnit | SkipLine )
+Comment : ';' ( SkipUnit | SkipLine [LF] )
SkipUnit : '~' Unit
-SkipLine : ( ~LF )* [LF]
+SkipLine : ( ~LF )*
OneDatum : BareString | CladDatum
-BareString : ( '.' | '+' | '-' | DIGIT ) ( BareChar | '.' )*
- | BareChar+
+BareString : BareChar+
-CladDatum : '|' PipeStrElt* '|'
- | '"' QuotStrElt* '"'
+CladDatum : '|' ( PipeStrChar | '\' StringEsc )* '|'
+ | '"' ( QuotStrChar | '\' StringEsc )* '"'
| '#' HashExpr
| '(' List ')' | '[' List ']' | '{' List '}'
| "'" Datum | '`' Datum | ',' Datum
BareChar : ALPHA | DIGIT
- | '!' | '$' | '%' | '&' | '*' | '+' | '-' | '/'
+ | '!' | '$' | '%' | '*' | '+' | '-' | '.' | '/'
| '<' | '=' | '>' | '?' | '@' | '^' | '_' | '~'
-PipeStrElt : ~( '|' | '\' ) | '\' StringEsc
+PipeStrChar : ~( '|' | '\' )
-QuotStrElt : ~( '"' | '\' ) | '\' StringEsc
+QuotStrChar : ~( '"' | '\' )
HashExpr : Rune [ '\' BareString | CladDatum ]
| '\' BareString
| '%' Label ( '%' | '=' Datum )
| CladDatum
-List : Unit* [ '.' Unit ] Blank*
+List : Unit* [ '&' Unit ] Blank*
StringEsc : '\' | '|' | '"' | ( HTAB | SP )* LF ( HTAB | SP )*