diff options
Diffstat (limited to 'docs/c1/grammar.abnf.txt')
| -rw-r--r-- | docs/c1/grammar.abnf.txt | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/docs/c1/grammar.abnf.txt b/docs/c1/grammar.abnf.txt index ad68a16..9279210 100644 --- a/docs/c1/grammar.abnf.txt +++ b/docs/c1/grammar.abnf.txt @@ -14,7 +14,7 @@ Unit = *Blank Datum Blank = HTAB / LF / %x0b / %x0c / CR / SP / Comment -Trail = SkipLine / SkipUnit / ';' '~' *Blank +Trail = SkipLine / SkipUnit / ";" "~" *Blank Datum = BareString / DottedStr / CladDatum / Rune / RuneStr @@ -23,71 +23,72 @@ Datum = BareString / DottedStr / CladDatum / Rune / RuneStr Comment = SkipLine LF / SkipUnit Blank -SkipLine = ';' [ SkipLStart *AnyButLF ] +SkipLine = ";" [ SkipLStart *AnyButLF ] -SkipUnit = ';' '~' Unit +SkipUnit = ";" "~" Unit -SkipLStart = %x00-09 / %x0b-7d / %x7f-ff ; any but LF or '~' +SkipLStart = %x00-09 / %x0b-7d / %x7f-ff ; any but LF or "~" AnyButLF = %x00-09 / %x0b-ff BareString = BareChar *( BareChar / Numeric ) -DottedStr = ( '.' / Numeric ) *( '.' / Numeric / BareChar ) +DottedStr = ( "." / Numeric ) *( "." / Numeric / BareChar ) -CladDatum = '|' *( PipeStrChar / '\' StringEsc ) '|' - / '"' *( QuotStrChar / '\' StringEsc ) '"' - / '(' List ')' - / '[' List ']' - / '{' List '}' +CladDatum = "|" *( PipeStrChar / "\" StringEsc ) "|" + / DQUOTE *( QuotStrChar / "\" StringEsc ) DQUOTE + / "(" List ")" + / "[" List "]" + / "{" List "}" -Rune = '#' RuneName +Rune = "#" RuneName -RuneStr = '#' RuneName '\' BareString +RuneStr = "#" RuneName "\" BareString -RuneDotStr = '#' RuneName '\' DottedStr +RuneDotStr = "#" RuneName "\" DottedStr -RuneClad = '#' RuneName CladDatum +RuneClad = "#" RuneName CladDatum -LabelRef = '#' '%' Label '%' +LabelRef = "#" "%" Label "%" -LabelDef = '#' '%' Label '=' Datum +LabelDef = "#" "%" Label "=" Datum -HashStr = '#' '\' BareString +HashStr = "#" "\" BareString -HashDotStr = '#' '\' DottedStr +HashDotStr = "#" "\" DottedStr -HashClad = '#' CladDatum +HashClad = "#" CladDatum QuoteExpr = "'" Datum - / '`' Datum - / ',' Datum + / "`" Datum + / "," Datum JoinExpr = Datum RJoinDatum / LJoinDatum NoStartDot - / Datum ':' Datum - / NoEndDot '.' Datum + / Datum ":" Datum + / NoEndDot "." Datum -BareChar = '!' / '$' / '%' / '*' / '/' / '<' / '=' / '>' - / '?' / '@' / '^' / '_' / '~' / ALPHA +BareChar = "!" / "$" / "%" / "*" / "/" / "<" / "=" / ">" + / "?" / "@" / "^" / "_" / "~" / ALPHA -Numeric = '+' / '-' / DIGIT +Numeric = "+" / "-" / DIGIT -PipeStrChar = %x00-5b / %x5d-7b / %x7d-ff ; any but '|' or '\' +PipeStrChar = %x00-5b / %x5d-7b / %x7d-ff ; any but "|" or "\" -QuotStrChar = %x00-21 / %x23-5b / %x5d-ff ; any but '"' or '\' +QuotStrChar = %x00-21 / %x23-5b / %x5d-ff ; any but DQUOTE or "\" -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 ';' +StringEsc = "\" / "|" / DQUOTE / *( HTAB / SP ) LF *( HTAB / SP ) + / %s"a" / %s"b" / %s"t" / %s"n" + / %s"v" / %s"f" / %s"r" / %s"e" + / %s"x" 1*( 2HEXDIG ) ";" + / %s"u" ["0"] 1*5HEXDIG ";" + / %s"u" "1" "0" 4HEXDIG ";" List = [ Unit *( Blank Unit ) ] *Blank [Tail] [SkipUnit] -Tail = '&' Unit *Blank +Tail = "&" Unit *Blank RuneName = ALPHA *5( ALPHA / DIGIT ) |
