Initial commit
This commit is contained in:
commit
894d342115
9
deterministic.md
Normal file
9
deterministic.md
Normal file
@ -0,0 +1,9 @@
|
||||
# Deterministic
|
||||
|
||||
- No comments
|
||||
- No whitespace
|
||||
- No multiline text
|
||||
- No reals in form 3
|
||||
- No trailing commas
|
||||
- Dict keys ordered byte wise
|
||||
- Natural numbers with more than two trailing zero characters use real form 2
|
35
examples/basic.sehn
Normal file
35
examples/basic.sehn
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"foo": "bar",
|
||||
"pi5": 3.1415,
|
||||
"flag": false,
|
||||
"googol": 1e100,
|
||||
"items": [
|
||||
"one",
|
||||
"two"
|
||||
],
|
||||
"person": {
|
||||
"name": "John Doe",
|
||||
"age": 42,
|
||||
"social": [
|
||||
# User extended types
|
||||
Github/user("johndoe")
|
||||
],
|
||||
"bio": [`
|
||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
||||
" Phasellus at velit ultricies, luctus dolor eu, rhoncus elit."
|
||||
" Nulla pulvinar pretium enim non tincidunt. Duis nec malesuada"
|
||||
" ante. Maecenas semper congue vehicula. Vestibulum in libero in"
|
||||
" lacus porta tristique."
|
||||
`, `
|
||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
||||
" Phasellus at velit ultricies, luctus dolor eu, rhoncus elit."
|
||||
" Nulla pulvinar pretium enim non tincidunt. Duis nec malesuada"
|
||||
" ante. Maecenas semper congue vehicula. Vestibulum in libero in"
|
||||
" lacus porta tristique."
|
||||
`]
|
||||
},
|
||||
"payload": enc/b64(`
|
||||
"KJLSUI876IJSO9Yslo8SILUDkuyd89SO9JDSiuh98ASO9Us09ISO"
|
||||
"JK9F0LKI9ko8udsff9oih23klj9OIJH0ij099OIUOjFFFKj8D==="
|
||||
`)
|
||||
}
|
72
index.md
Normal file
72
index.md
Normal file
@ -0,0 +1,72 @@
|
||||
# Simple Extensible Human Notation (.sehn)
|
||||
|
||||
## Base Kinds
|
||||
|
||||
| name | description |
|
||||
| ------ | -------------------------- |
|
||||
| `none` | Represents nothing |
|
||||
| `bool` | Represents a boolean value |
|
||||
| `real` | Represents a real number |
|
||||
| `text` | Represents text |
|
||||
| `dict` | A key-value structure |
|
||||
| `list` | A collection structure |
|
||||
| `kind` | A reflective kind |
|
||||
|
||||
### `none`
|
||||
|
||||
A `none` represents the absence of any value.
|
||||
|
||||
### `bool`
|
||||
|
||||
1. `true`
|
||||
2. `false`
|
||||
|
||||
### `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.
|
||||
|
||||
### `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\]*` |
|
Loading…
Reference in New Issue
Block a user