From b737130c059e8e5566caa7aa3144f910d43999ae Mon Sep 17 00:00:00 2001 From: Taylan Kammer Date: Sat, 10 Jan 2026 17:33:14 +0100 Subject: More grammar shite. --- spec/syntax.abnf | 96 -------------------------------------------------------- 1 file changed, 96 deletions(-) delete mode 100644 spec/syntax.abnf (limited to 'spec/syntax.abnf') diff --git a/spec/syntax.abnf b/spec/syntax.abnf deleted file mode 100644 index 132deeb..0000000 --- a/spec/syntax.abnf +++ /dev/null @@ -1,96 +0,0 @@ -;This file follows strict ABNF rules and can be used with abnfgen. - - -File = [Unit] *( Blank Unit ) *Blank [Trail] - - -Unit = *Blank Datum - -Blank = HTAB / LF / %x0b / %x0c / CR / SP / Comment - -Trail = SkipLine / SkipUnit - - -Datum = BareString - / DottedString - / CladDatum - / HashExpr - / HashDotExpr - / QuoteExpr - / JoinExpr - -Comment = SkipLine LF / SkipUnit Blank - -SkipLine = ';' [ SkipLStart *AnyButLF ] - -SkipLStart = %x00-09 / %x0b-7d / %x7f-ff - ; any but LF or '~' - -AnyButLF = %x00-09 / %x0b-ff - -SkipUnit = ';' '~' Unit - - -BareString = BareChar *( BareChar / Numeric ) - -DottedString = ( '.' / Numeric ) *( '.' / Numeric / BareChar ) - -CladDatum = '|' *( PipeStrChar / '\' StringEsc ) '|' - / '"' *( QuotStrChar / '\' StringEsc ) '"' - / '(' List ')' / '[' List ']' / '{' List '}' - -HashExpr = LabelExpr / RuneExpr / HashDatum - -HashDotExpr = RuneDotExpr / HashDotDatum - -QuoteExpr = "'" Datum / '`' Datum / ',' Datum - -JoinExpr = Datum LeftCladDatum - / Datum ':' Datum - / DotlessDatum '.' Datum - -LeftCladDatum = CladDatum / HashExpr / QuoteExpr - -DotlessDatum = BareString / CladDatum / RuneExpr / HashDatum - - -BareChar = '!' / '$' / '%' / '*' / '/' / '<' / '=' / '>' - / '?' / '@' / '^' / '_' / '~' / ALPHA - -Numeric = '+' / '-' / DIGIT - -PipeStrChar = %x00-5b / %x5d-7b / %x7d-ff - ; any but '|' or '\' - -QuotStrChar = %x00-21 / %x23-5b / %x5d-ff - ; any but '"' or '\' - -List = [Unit] *( Blank Unit ) *Blank [Tail] [SkipUnit] - -Tail = '&' Unit *Blank - -LabelExpr = '#' '%' Label ( '%' / '=' Datum ) - -RuneExpr = '#' Rune [ '\' BareString / CladDatum ] - -RuneDotExpr = '#' Rune '\' DottedString - -HashDatum = '#' '\' BareString / CladDatum - -HashDotDatum = '#' '\' DottedString - - -; Unicode escapes must not represent surrogate code points. -; This is difficult to express in ABNF. But we do at least -; disallow code points greater than \u10FFFF which are also -; invalid, since U+10FFFF is the highest allowed. -StringEsc = '\' / '|' / '"' / *( HTAB / SP ) LF *( HTAB / SP ) - / 'a' / 'b' / 't' / 'n' / 'v' / 'f' / 'r' / 'e' - / 'x' 1*( 2HEXDIG ) ';' - / 'u' ['0'] 1*5HEXDIG ';' - / 'u' '1' '0' 4HEXDIG ';' - - -Rune = ALPHA *5( ALPHA / DIGIT ) - -Label = 1*12( HEXDIG ) -- cgit v1.2.3