summaryrefslogtreecommitdiff
path: root/spec/parser.bnf
diff options
context:
space:
mode:
Diffstat (limited to 'spec/parser.bnf')
-rw-r--r--spec/parser.bnf70
1 files changed, 0 insertions, 70 deletions
diff --git a/spec/parser.bnf b/spec/parser.bnf
deleted file mode 100644
index 338dc10..0000000
--- a/spec/parser.bnf
+++ /dev/null
@@ -1,70 +0,0 @@
-unit : blank* ( datum blank? | EOF ) ;
-
-
-blank : 9...13 | comment ;
-
-datum : one_datum ( join_char? one_datum )* ;
-
-join_char : '.' | ':' ;
-
-
-comment : ';' ( skip_unit | skip_line ) ;
-
-skip_unit : '~' unit ;
-
-skip_line : ( ~LF )* LF? ;
-
-
-one_datum : bare_string | clad_datum ;
-
-bare_string : ( '.' | '+' | '-' | DIGIT ) ( bare_char | '.' )*
- | bare_char+
- ;
-
-clad_datum : '\' bare_string
- | '|' pipe_str_elt* '|'
- | '"' quot_str_elt* '"'
- | '#' hash_expr
- | '(' list ')'
- | '[' list ']'
- | '{' list '}'
- | quote_expr
- ;
-
-
-bare_char : ALPHA | DIGIT | bare_punct ;
-
-bare_punct : '!' | '$' | '%' | '&' | '*' | '+' | '-' | '/'
- | '<' | '=' | '>' | '?' | '@' | '^' | '_' | '~'
- ;
-
-
-pipe_str_elt : ~( '|' | '\' ) | '\' pipe_esc ;
-
-quot_str_elt : ~( '"' | '\' ) | '\' quot_esc ;
-
-hash_expr : rune clad_datum?
- | rune '\' bare_string
- | '\' bare_string
- | '%' label ( '%' | '=' datum )
- | clad_datum
- ;
-
-list : unit* ( '.' unit )? blank* ;
-
-quote_expr : ( "'" | "`" | "," ) datum ;
-
-
-pipe_esc : string_esc | '|' ;
-
-quot_esc : string_esc | '"' ;
-
-string_esc : '\' | 'a' | 'b' | 'e' | 'f' | 'n' | 'r' | 't' | 'v'
- | 'x' HEXDIG{2}
- | 'u' '{' HEXDIG+ '}'
- ;
-
-
-rune : ALPHA ( ALPHA | DIGIT ){0,5} ;
-
-label : HEXDIG{1,12} ;