From c81fa4d252b77a15f2dcf7e9409e5001cf137141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Wed, 27 Nov 2024 17:27:03 -0800 Subject: [PATCH] update readme and add/remove related tests --- README.md | 16 ++++++++-------- .../expected_kdl/unicode_equals_signs.kdl | 1 - tests/test_cases/expected_kdl/unicode_silly.kdl | 1 + tests/test_cases/input/unicode_equals_signs.kdl | 4 ---- tests/test_cases/input/unicode_silly.kd | 1 + 5 files changed, 10 insertions(+), 13 deletions(-) delete mode 100644 tests/test_cases/expected_kdl/unicode_equals_signs.kdl create mode 100644 tests/test_cases/expected_kdl/unicode_silly.kdl delete mode 100644 tests/test_cases/input/unicode_equals_signs.kdl create mode 100644 tests/test_cases/input/unicode_silly.kd diff --git a/README.md b/README.md index ed3d9ab..8782d1d 100644 --- a/README.md +++ b/README.md @@ -159,10 +159,10 @@ node3 #"C:\Users\zkat\raw\string"# You don't have to quote strings unless any the following apply: * The string contains whitespace. * The string contains any of `[]{}()\/#";`. - * The string is one of `true`, `false`, or `null`. + * The string is one of `true`, `false`, `null`, `inf`, `-inf`, or `nan`. * The strings starts with a digit, or `+`/`-`/`.`/`-.`,`+.` and a digit. - * The string contains an equals sign (including unicode equals signs `﹦`, - `=`, and `🟰`). + (aka "looks like a number") + * The string contains an equals sign. In essence, if it can get confused for other KDL or KQL syntax, it needs quotes. @@ -296,8 +296,8 @@ smile 😁 // Identifiers are very flexible. The following is a legal bare identifier: <@foo123~!$%^&*.:'|?+> -// And you can also use unicode, even for the equals sign! -ノード お名前=☜(゚ヮ゚☜) +// And you can also use unicode! +ノード お名前=ฅ^•ﻌ•^ฅ // kdl specifically allows properties and values to be // interspersed with each other, much like CLI commands. @@ -335,9 +335,9 @@ SDLang, but that had some design choices I disagreed with. #### Ok, then, why not SDLang? -SDLang is designed for use cases that are not interesting to me, but are very -relevant to the D-lang community. KDL is very similar in many ways, but is -different in the following ways: +SDLang is an excellent base, but I wanted some details ironed out, and some +things removed that only really made sense for SDLang's current use-cases, including +some restrictions about data representation. KDL is very similar in many ways, except: * The grammar and expected semantics are [well-defined and specified](SPEC.md). * There is only one "number" type. KDL does not prescribe representations. diff --git a/tests/test_cases/expected_kdl/unicode_equals_signs.kdl b/tests/test_cases/expected_kdl/unicode_equals_signs.kdl deleted file mode 100644 index 4ab6443..0000000 --- a/tests/test_cases/expected_kdl/unicode_equals_signs.kdl +++ /dev/null @@ -1 +0,0 @@ -node p1=val1 p2=val2 p3=val3 diff --git a/tests/test_cases/expected_kdl/unicode_silly.kdl b/tests/test_cases/expected_kdl/unicode_silly.kdl new file mode 100644 index 0000000..5fa566d --- /dev/null +++ b/tests/test_cases/expected_kdl/unicode_silly.kdl @@ -0,0 +1 @@ +ノード お名前=ฅ^•ﻌ•^ฅ diff --git a/tests/test_cases/input/unicode_equals_signs.kdl b/tests/test_cases/input/unicode_equals_signs.kdl deleted file mode 100644 index 37d8e02..0000000 --- a/tests/test_cases/input/unicode_equals_signs.kdl +++ /dev/null @@ -1,4 +0,0 @@ -node \ - p1﹦val1 \ // U+FE66 - p2=val2 \ // U+FF1D - p3🟰val3 // U+1F7F0 diff --git a/tests/test_cases/input/unicode_silly.kd b/tests/test_cases/input/unicode_silly.kd new file mode 100644 index 0000000..5fa566d --- /dev/null +++ b/tests/test_cases/input/unicode_silly.kd @@ -0,0 +1 @@ +ノード お名前=ฅ^•ﻌ•^ฅ