From b737130c059e8e5566caa7aa3144f910d43999ae Mon Sep 17 00:00:00 2001 From: Taylan Kammer Date: Sat, 10 Jan 2026 17:33:14 +0100 Subject: More grammar shite. --- docs/c1/1-parse.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'docs/c1/1-parse.md') diff --git a/docs/c1/1-parse.md b/docs/c1/1-parse.md index a23ebbc..e04240b 100644 --- a/docs/c1/1-parse.md +++ b/docs/c1/1-parse.md @@ -1,8 +1,7 @@ # Parser for Code & Data -Zisp s-expressions are defined in terms of an extremely minimal set of data -types; only that which is necessary to build representations of more complex -expressions and data types: +Zisp S-Expressions represent an extremely minimal set of data types; only that +which is necessary to strategically construct more complex code and data: +--------+-----------------+--------+----------+------+ | TYPE | String | Rune | Pair | Nil | @@ -10,12 +9,8 @@ expressions and data types: | E.G. | foo, |foo bar| | #name | (X & Y) | () | +--------+-----------------+--------+----------+------+ -Note that the ampersand replaces the period in pair notation. This simplifies -the grammar: periods are a regular constituent of strings, while the ampersand -cannot appear in unquoted strings. - The parser can also output non-negative integers, but this is only used for -datum labels; number literals are handled by the *decoder*. +datum labels; number literals are handled by the *decoder* (see next). The parser recognizes various "syntax sugar" and transforms it into uses of the above data types. The most ubiquitous example is of course the list: @@ -110,6 +105,8 @@ 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). +