Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/spec.txt
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2021-10-04 14:11:29 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2021-10-04 14:11:29 +0100
commit14e929a7596baa7ee9da401975c521aa0e93c3b4 (patch)
tree90459c8dd3b5756d2da409e8dbfdd19420e7e882 /spec.txt
parentd973b4b8eaaa5e7f1d10f9f02069c6d7bde25dcc (diff)
downloadcudl-14e929a7596baa7ee9da401975c521aa0e93c3b4.tar
Add string and map parsing. Currently no support for the schema variants of the syntax for these types
Diffstat (limited to 'spec.txt')
-rw-r--r--spec.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec.txt b/spec.txt
index 6070415..b144485 100644
--- a/spec.txt
+++ b/spec.txt
@@ -1,4 +1,4 @@
-# Spec attempt 5
+# CUDL - Clear and Unmistakable Data Language
* Every file contains 1 value, which may have other values nested inside it.
* A schema can be provided when a file is parsed which gives it's value a type.
@@ -17,7 +17,8 @@ An inline-end character is one of the following:
## Map
A sequence of key:value pairs. No delimeter is needed as every value will have a ending marker.
-If a key starts with a quote then it continues until another quote ends it. Quotes can be escaped by using 2 of them.
+The first key may be preceeded by whitespace and whitespace can occur before or after the : between the key and value.
+If a key starts with a quote then it obeys the same rules as a quoted string.
Otherwise a key must match [A-Za-z0-9_-]+
A map can be preceeded by a { and succeeded by a }
@@ -45,6 +46,7 @@ The following escape sequences are available for quoted strings and keys:
\" - quote
\\ - backslash
\uXXXX - unicode XXXX
+\UXXXXXXXX - unicode XXXXXXXX
```
### Multiline string