From d4068eff9f11f0dca87e83b8522c86256312e258 Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Sun, 24 May 2015 18:50:51 -0400 Subject: [PATCH] booleans are values --- grammar.ebnf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/grammar.ebnf b/grammar.ebnf index 028f5e4..f034fed 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -5,7 +5,7 @@ Variable ::= "@" Identifier Bare_String ::= (GraphicChar | ("\" Char)) + Quoted_String ::= '"' ([^"\] | "\" Char) * '"' | "'" ([^'\] | "\" Char) * "'" -Comment ::= '#' GraphicChar + +Comment ::= "#" GraphicChar + Integer ::= [+-] ? ([1-9] Digit + | [0]) Hex ::= [+-] ? "0" [xX] (Digit | [a-fA-F]) + @@ -13,10 +13,11 @@ Octal ::= [+-] ? "0" [0-7] + Float ::= [+-]? Digit+ ("." Digit +)? ([eE] [+-] ? Digit +)? Complex ::= ((Float | Integer) [+-])? (Float | Integer) "i" Duration ::= [+-] ? (Digit + ("." Digit +) ("ns" | "us" | "µs" | "ms" | "s" | "m" | "h")) + +Boolean ::= "true" | "false" Numer ::= Integer | Hex | Octal | Float Object ::= "{" (Identifier ":" Value) + "}" List ::= "[" Value + "]" -Value ::= String | Number | Duration | Variable | Object | List +Value ::= String | Number | Boolean | Duration | Variable | Object | List Heredoc ::= "<<" Identifier "\n" (Char | "\n") + "\n" "Identifier (same as opening identifier)" "\n" Letter ::= "a Unicode letter, category L" @@ -28,4 +29,4 @@ Punct ::= "a Unicode punctuation glyph, category P, excluding those described as Terminal ::= "[" | "]" | ";" | ":" | "{" | "}" | "\" | "#" | "\n" PrintChar ::= Letter | Mark | Number | Symbol | Punct GraphicChar ::= PrintChar | Space -Char ::= GraphicChar | Terminal +Char ::= GraphicChar | Terminal \ No newline at end of file