-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa5a330
commit 693df79
Showing
1 changed file
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,35 @@ | ||
# anseml  | ||
ANother S-Expression Markup Language | ||
ANSEML is ANother S-Expression Markup Language inspired by XML format. | ||
|
||
The library provides a simple API to work with documents and a tool to convert the document to HTML format. | ||
|
||
The document format is pretty straightforward. | ||
- Each ANSEML document has exactly one single root element, which encloses all the other elements. | ||
- Each element may or may not have a set of attributes. | ||
|
||
More specifically, the format is following: | ||
|
||
``` | ||
(:tag-name | ||
attr-map? | ||
body) | ||
``` | ||
|
||
Where `attr-map?` is an associative array of `{ key value }` pairs, | ||
where `key` is `keyword` and `value` is one of the following _primitives_: `string, integer, float`; and `body` contains zero or more _primitives_ or enclosed elements. | ||
|
||
Here are few examples: | ||
|
||
``` | ||
(:root | ||
{ :id "Root" } | ||
"Here is a number:" 123 | ||
"And here is the text:" | ||
(:text | ||
"Some text") | ||
:br | ||
(:text | ||
"Another text")) | ||
``` | ||
|
||
Note that you don't need to put parenthesis around the element consisting only of a tag-name. |