From 14e929a7596baa7ee9da401975c521aa0e93c3b4 Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Mon, 4 Oct 2021 14:11:29 +0100 Subject: Add string and map parsing. Currently no support for the schema variants of the syntax for these types --- spec.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'spec.txt') 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 -- cgit v1.2.3