Extend readme
This commit is contained in:
parent
4ffe1f0ad9
commit
7f4ad62c10
1 changed files with 42 additions and 6 deletions
48
readme.md
48
readme.md
|
@ -1,6 +1,10 @@
|
||||||
# OATS
|
# OATS
|
||||||
|
|
||||||
**O**utput **A**gnostic **T**agging **S**ystem aka. OATS implemented in Lua.
|
**O**utput **A**gnostic **T**agging **S**ystem aka. OATS reference
|
||||||
|
implementation in Lua.
|
||||||
|
|
||||||
|
This repository serves both as a description of the OATS language and the Lua
|
||||||
|
implementation.
|
||||||
|
|
||||||
## Format
|
## Format
|
||||||
|
|
||||||
|
@ -49,10 +53,46 @@ evaluates to the same as
|
||||||
Plain text with some [bold tagged] text [emphasis in between]
|
Plain text with some [bold tagged] text [emphasis in between]
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: Consumers may have a better understanding of whether and how to join text
|
(NOT YET IMPLEMENTED)
|
||||||
|
|
||||||
|
Any special or non-special character inside a line can be escaped with a single
|
||||||
|
backslash, including the backslash itself. A backslash at the end of a line will
|
||||||
|
be ignored. This works both in text nodes and inside tag names.
|
||||||
|
|
||||||
|
A backslash character followed by a space will be replaced by an ASCII newline
|
||||||
|
character.
|
||||||
|
|
||||||
|
### Out of scope
|
||||||
|
|
||||||
|
Several features are intentionally left to the consuming application, with OATS
|
||||||
|
only providing suggestions to avoid bikeshedding.
|
||||||
|
|
||||||
|
#### String joining
|
||||||
|
|
||||||
|
Consumers may have a better understanding of whether and how to join text
|
||||||
elements together, while the interpreter would have to decide on a joining
|
elements together, while the interpreter would have to decide on a joining
|
||||||
strategy (most likely concatenation with a space character in between).
|
strategy (most likely concatenation with a space character in between).
|
||||||
|
|
||||||
|
#### Comments
|
||||||
|
|
||||||
|
Comments could be implemented either as a node type or a string prefix or both.
|
||||||
|
|
||||||
|
The preferred node names for comments are `comment`, while the preferred text
|
||||||
|
node prefix is a double dash `--`.
|
||||||
|
|
||||||
|
#### Namespacing
|
||||||
|
|
||||||
|
The recommended namespace separator in namespaces is the single colon `:` with
|
||||||
|
nesting going from left (outermost namespace) to right (node name).
|
||||||
|
|
||||||
|
Specific namespacing semantics have proven to be a cause of both bikeshedding
|
||||||
|
and reasonable disagreements in other languages like XML.
|
||||||
|
|
||||||
|
#### Encoding
|
||||||
|
|
||||||
|
OATS is designed and described in terms of ASCII characters, but in a technical
|
||||||
|
sense, only reserves a small number of 8-bit characters for control purposes.
|
||||||
|
|
||||||
### Data Type
|
### Data Type
|
||||||
|
|
||||||
OATS makes no attempts to interpret text.
|
OATS makes no attempts to interpret text.
|
||||||
|
@ -70,8 +110,4 @@ generally ignore case.
|
||||||
|
|
||||||
Tag names should use lowercase kebab-case.
|
Tag names should use lowercase kebab-case.
|
||||||
|
|
||||||
Applications that interpret parts of a tag name as a namespace should use a
|
|
||||||
single colon `:` as the namespace separator, with namespaces preceding the tag
|
|
||||||
name.
|
|
||||||
|
|
||||||
## Interface
|
## Interface
|
||||||
|
|
Loading…
Reference in a new issue