From 2c4382f2f141cb725465736bba0e1c9128f3dd79 Mon Sep 17 00:00:00 2001 From: avitex Date: Mon, 10 Jun 2019 13:46:27 +1000 Subject: [PATCH] Simplify --- human.md | 45 ++++++++++++++++++++++++++++++++++ index.md | 73 ++++++++++++-------------------------------------------- 2 files changed, 60 insertions(+), 58 deletions(-) create mode 100644 human.md diff --git a/human.md b/human.md new file mode 100644 index 0000000..a884edc --- /dev/null +++ b/human.md @@ -0,0 +1,45 @@ +# Simple Extensible Human Notation (.sehn) + +## Formats + +### `atom` + +1. `todo` + +### `real` + +1. `` +2. `e` +3. `.` + +| part | allowed value | +| ------ | --------------- | +| `int` | `-?[1-9][0-9]*` | +| `frac` | `[0-9]*` | +| `sig` | `` | +| `exp` | `` | + +### `text` + +1. `""` +2. Multiline: + ``` + ` + "" + "" + ` + ``` + +A `text` value holds low and behold, text. + +### `map` + +1. `{ : , ...}` + +A dictionary is a structure with `text` keys mapping to any value. + +### `seq` + +1. `[, ...]` + +A list is a structure with a sequence of any value. diff --git a/index.md b/index.md index d2c315e..9cb3b6b 100644 --- a/index.md +++ b/index.md @@ -1,72 +1,29 @@ -# Simple Extensible Human Notation (.sehn) +# Simple Extensible Notation (SEN) -## Base Kinds +## Primitive Types | name | description | | ------ | -------------------------- | -| `none` | Represents nothing | -| `bool` | Represents a boolean value | +| `atom` | Represents a literal thing | | `real` | Represents a real number | | `text` | Represents text | -| `dict` | A key-value structure | -| `list` | A collection structure | -| `kind` | A reflective kind | -### `none` +### Atom Type -A `none` represents the absence of any value. +### Real Type -### `bool` +### Text Type -1. `true` -2. `false` +## Structured Types -### `real` +| name | description | +| ----- | --------------------- | +| `tag` | A tagged structure | +| `seq` | A sequence structure | +| `map` | A key-value structure | -1. `` -2. `e` -3. `.` +### Tag Type -| part | allowed value | -| ------ | --------------- | -| `int` | `-?[1-9][0-9]*` | -| `frac` | `[0-9]*` | -| `sig` | `` | -| `exp` | `` | +### Seq Type -### `text` - -1. `""` -2. Multiline: - ``` - ` - "" - "" - ` - ``` - -A `text` value holds low and behold, text. - -### `dict` - -1. `{"": , ...}` - -A dictionary is a structure with `text` keys mapping to any value. - -### `list` - -1. `[, ...]` - -A list is a structure with a sequence of any value. - -### `kind` - -1. `` -2. `` -2. `` - -| kind | allowed value | -| ----------------- | ------------------------------------------ | -| `` | `none\|bool\|real\|text\|dict\|list\|kind` | -| `` | `(?!())[a-z][a-z0-9/]*` | -| `` | `[A-Z][a-zA-Z0-9\]*` | +### Map Type