From dbc3779c552f616437574e04c8673c6f5d8382a6 Mon Sep 17 00:00:00 2001 From: Taylan Kammer Date: Sun, 11 Jan 2026 13:02:29 +0100 Subject: Docs. --- docs/c1/1-parse.md | 16 +++++++++++----- docs/c1/index.md | 2 ++ docs/index.md | 6 +++--- 3 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 docs/c1/index.md (limited to 'docs') diff --git a/docs/c1/1-parse.md b/docs/c1/1-parse.md index e04240b..b01d759 100644 --- a/docs/c1/1-parse.md +++ b/docs/c1/1-parse.md @@ -1,5 +1,7 @@ # Parser for Code & Data +*For an exact specification of the grammar, see [grammar](grammar.html).* + Zisp S-Expressions represent an extremely minimal set of data types; only that which is necessary to strategically construct more complex code and data: @@ -52,9 +54,13 @@ Further notes about the syntax sugar table and examples above: hash sign, or a pipe-quoted string (see next). A bare string can follow the hash sign by separating the two with a backslash: `#\string` -* Strings can be quoted with pipes, like symbols in Scheme: +* Strings can be quoted with pipes, like symbols in Scheme. This is the "real" + string literal syntax, whereas using double quotes is syntax sugar for a + quoted string literal. + + |foo bar baz| -> |foo bar baz| - |foo bar baz| + "foo bar baz" -> (#QUOTE & |foo bar baz|) * Though not represented in the table due to notational difficulty, the form `#rune(...)` doesn't require a list in the second position; any datum that @@ -73,7 +79,9 @@ Further notes about the syntax sugar table and examples above: #abcdefgh ;Could be (#abcdef & gh) or (#abcde & fgh) or ... -* Syntax sugar can combine arbitrarily; some examples follow: +* Syntax sugar can combine arbitrarily. Some examples follow. Any of these may + or may not actually have a meaning in code; many could simply end up producing + a syntax error at the macro-expand stage. #{...} -> (#HASH #BRACE ...) @@ -105,8 +113,6 @@ Further notes about the syntax sugar table and examples above: Zisp's internal use and standard library; users can use lowercase runes with custom meaning without worrying about clashes. -For an exact specification of the grammar, see [grammar](grammar.html). -