This commit is contained in:
avitex 2019-06-10 13:46:27 +10:00
parent 894d342115
commit 2c4382f2f1
Signed by: avitex
GPG Key ID: 38C76CBF3749D62C
2 changed files with 60 additions and 58 deletions

45
human.md Normal file
View File

@ -0,0 +1,45 @@
# Simple Extensible Human Notation (.sehn)
## Formats
### `atom`
1. `todo`
### `real`
1. `<int>`
2. `<sig>e<exp>`
3. `<int>.<frac>`
| part | allowed value |
| ------ | --------------- |
| `int` | `-?[1-9][0-9]*` |
| `frac` | `[0-9]*` |
| `sig` | `<int>` |
| `exp` | `<int>` |
### `text`
1. `"<text>"`
2. Multiline:
```
`
"<text>"
"<text>"
`
```
A `text` value holds low and behold, text.
### `map`
1. `{ <any>: <any>, ...}`
A dictionary is a structure with `text` keys mapping to any value.
### `seq`
1. `[<any>, ...]`
A list is a structure with a sequence of any value.

View File

@ -1,72 +1,29 @@
# Simple Extensible Human Notation (.sehn) # Simple Extensible Notation (SEN)
## Base Kinds ## Primitive Types
| name | description | | name | description |
| ------ | -------------------------- | | ------ | -------------------------- |
| `none` | Represents nothing | | `atom` | Represents a literal thing |
| `bool` | Represents a boolean value |
| `real` | Represents a real number | | `real` | Represents a real number |
| `text` | Represents text | | `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` ## Structured Types
2. `false`
### `real` | name | description |
| ----- | --------------------- |
| `tag` | A tagged structure |
| `seq` | A sequence structure |
| `map` | A key-value structure |
1. `<int>` ### Tag Type
2. `<sig>e<exp>`
3. `<int>.<frac>`
| part | allowed value | ### Seq Type
| ------ | --------------- |
| `int` | `-?[1-9][0-9]*` |
| `frac` | `[0-9]*` |
| `sig` | `<int>` |
| `exp` | `<int>` |
### `text` ### Map Type
1. `"<text>"`
2. Multiline:
```
`
"<text>"
"<text>"
`
```
A `text` value holds low and behold, text.
### `dict`
1. `{"<text>": <any>, ...}`
A dictionary is a structure with `text` keys mapping to any value.
### `list`
1. `[<any>, ...]`
A list is a structure with a sequence of any value.
### `kind`
1. `<base-kind>`
2. `<standard-kind>`
2. `<app-kind>`
| kind | allowed value |
| ----------------- | ------------------------------------------ |
| `<base-kind>` | `none\|bool\|real\|text\|dict\|list\|kind` |
| `<standard-kind>` | `(?!(<base-kind>))[a-z][a-z0-9/]*` |
| `<app-kind>` | `[A-Z][a-zA-Z0-9\]*` |