<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/grammar_no_schema.ebnf
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.com>2021-10-03 16:40:08 +0100
committerCharlie Stanton <charlie@shtanton.com>2021-10-03 16:40:08 +0100
commitcc219d714960ed68d2a822cd98bb428c32b71e1f (patch)
treec5b1e7424fccb99183881a99cb53c230fa646b20 /grammar_no_schema.ebnf
parentaffb5ee5b9fac8a88daa766960602802e35484b8 (diff)
downloadcudl-cc219d714960ed68d2a822cd98bb428c32b71e1f.tar
Add CUDL definition documents
Diffstat (limited to 'grammar_no_schema.ebnf')
-rw-r--r--grammar_no_schema.ebnf14
1 files changed, 14 insertions, 0 deletions
diff --git a/grammar_no_schema.ebnf b/grammar_no_schema.ebnf
new file mode 100644
index 0000000..629c59a
--- /dev/null
+++ b/grammar_no_schema.ebnf
@@ -0,0 +1,14 @@
+value = map | array | string | multiline_string | number | boolean | null ;
+map = "{", {field}, "}" ;
+field = key, ":", value ;
+key = '"', {-'"' | '""'}, '"' | (alphanumeric | "_" | "-"), {alphanumeric | "_" | "-"} ;
+array = "[", {value}, "]" ;
+string = '"', {-'"' | '\"'}, -("\" | '"'), '"' | '"\""' | '""' ;
+inline_end = "\r" | "\n" | "]" | "}" | ";" | EOF ;
+multiline_string = "|", end_sequence, "\n", ?any character?, "\n", end_sequence ;
+end_sequence = {-("\r" | "\n")} ;
+integer = ["-"], {digit}, ["e", {digit}] ;
+float = ["-"], {digit}, [".", {digit}], ["e", {digit}] ;
+number = (integer | float), "," | (integer | float) >> (inline_end | whitespace) ;
+boolean = "%true" | "%false" ;
+null = "%null" ;