Open Symbolic Notation, abbreviated OSN,
is an easy and flexible data-interchange text format
intended for the lightweight representation of
- generic abstract syntax trees in the domain of formal systems.
- In order to meet theese design goals, OSN pursues the following features.
+ generic abstract syntax trees in the domain of formal languages.
+ In order to meet these design goals, OSN pursues the following features.
</body>
- <list><style class="red-mark"><item><style class="alpha">
+ <list><item class="red-mark"><style class="alpha">
<link to="https://en.wikipedia.org/wiki/S-expression">Symbolic expressions</link>
based on widely accepted syntactical conventions
provide for a <notice text="lightweight"/> and <notice text="generic"/> grammar,
contrary to <link to="http://www.w3.org/TR/2008/REC-xml-20081126/#sec-origin-goals">XML design goal 10</link>.
Compared to other data-interchange formats based on symbolic expressions,
like <link to="http://people.csail.mit.edu/rivest/Sexp.txt">canonical symbolic expressions</link>,
- representing arbitrary data in binary format is a secondary concern in the designn of OSN,
+ representing arbitrary data in binary format is a secondary concern in the design of OSN,
as well as the support for canonicalization.
- Apparently, theese features fall outside the scope of OSN,
- which targets the data structures of <notice text="formal systems"/>.
- </style></item></style>
- <newline/>
- <style class="blue-mark"><item><style class="alpha">
+ Apparently, these features fall outside the scope of OSN,
+ which targets the data structures of <notice text="formal languages"/>.
+ </style></item></list>
+ <list><item class="blue-mark"><style class="alpha">
Optionally <link to="https://en.wikipedia.org/wiki/Namespace">qualified</link> symbolic expressions
-
- </style></item></style>
- <newline/>
- <style class="green-mark"><item><style class="alpha">
+ allow OSN texts to mix data from different domains preserving their own semantics
+ because name conflicts can be avoided.
+ As a consequence OSN documents are <notice text="easy to extend"/> in that
+ domain-specific OSN applications can work as expected even if
+ data from different domains is added to the text they process.
+ </style></item></list>
+ <list><item class="green-mark"><style class="alpha">
The <link to="https://en.wikipedia.org/wiki/ASCII">US-ASCII</link> character set,
extended to <link to="http://www.utf-8.com/">UTF-8</link> in
free-form text strings for the convenience of human readers,
makes OSN documents <notice text="easy to visualize and transport"/> over communication media.
OSN design aims at supporting <notice text="application-independent"/> standard encodings.
- </style></item></style></list>
- <body>
-
- </body>
-<!--
- flexibility: S-expressions should make it relatively simple to
- modify and extend data structures.
- OSN is completely language independent but uses .
--->
+ </style></item></list>
-
- <section6 name="syntax">Syntax</section6>
+ <section6 name="grammar">Grammar</section6>
<body>
An OSN text uses the <link to="http://www.utf-8.com/">UTF-8</link> character set
and are available for extensions of OSN.
</body>
<list><item>
- <ebnf>
+ This token can represent the identifiers and the numerical constants of most programming languages:
+ <newline/><ebnf>
<prod of="symbol"/> <def/>
<plus/> <prod of="symbol-char"/>
<stop/> <newline/>
<str2 of="_"/> <or/> <str2 of="`"/> <or/>
<str2 of="a"/> <etc/> <str2 of="z"/>
<stop/>
- </ebnf><newline/>
- this token can represent the identifiers and the numerical constants of most programming languages;
- </item><newline/><item>
- <ebnf>
+ </ebnf>
+ </item></list>
+ <list><item>
+ This token contains free-form text with commonly accepted escape sequences:
+ <newline/><ebnf>
<prod of="string"/> <def/>
<str2 of="""/> <and/>
<star/> <open/>
<str2 of="A"/> <etc/> <str2 of="F"/> <or/>
<str2 of="a"/> <etc/> <str2 of="f"/>
<stop/>
- </ebnf><newline/>
- this token contains free-form text with commonly accepted escape sequences;
- </item><newline/><item>
- <ebnf>
+ </ebnf>
+ </item></list>
+ <list><item>
+ This token is a widely used alternative of the former token:
+ <newline/><ebnf>
<prod of="string-alt"/> <def/>
<str1 of="'"/> <and/>
<star/> <open/>
<close/> <and/>
<str1 of="'"/>
<stop/>
- </ebnf><newline/>
- this token is a widely used alternative of the former;
- </item><newline/><item>
- <ebnf>
+ </ebnf>
+ </item></list>
+ <list><item>
+ This token separates the qualifiers of a symbolic expression:
+ <newline/><ebnf>
<prod of="sep"/> <def/> <str2 of=":"/> <stop/>
- </ebnf><newline/>
- this token separates the qualifiers of a symbolic expression;
- </item><newline/><item>
- <ebnf>
+ </ebnf>
+ </item></list>
+ <list><item>
+ This token starts a compound symbolic expression:
+ <newline/><ebnf>
<prod of="open"/> <def/>
<str2 of="("/> <or/> <str2 of="<"/> <or/> <str2 of="["/> <or/> <str2 of="{"/>
<stop/>
- </ebnf><newline/>
- this token starts a compound symbolic expression;
- </item><newline/><item>
- <ebnf>
+ </ebnf>
+ </item></list>
+ <list><item>
+ This token ends a compound symbolic expression:
+ <newline/><ebnf>
<prod of="close"/> <def/>
<str2 of=")"/> <or/> <str2 of=">"/> <or/> <str2 of="]"/> <or/> <str2 of="}"/>
<stop/>
- </ebnf><newline/>
- this token ends a compound symbolic expression;
- </item><newline/><item>
- <ebnf>
+ </ebnf>
+ </item></list>
+ <list><item>
+ This token is ignored and separates the other tokens:
+ <newline/><ebnf>
<prod of="gap"/> <def/>
<prod of="space"/> <or/>
<str2 of=","/> <or/> <str2 of=";"/> <or/> <str2 of="="/>
<stop/>
- </ebnf><newline/>
- this token is ignored and separates the other tokens.
+ </ebnf>
</item></list>
<body>
+ The grammar of OSN is very liberal by design.
+ Spaces of the form <ebnf><plus/> <prod of="gap"/></ebnf> can appear between any pair of tokens.
</body>
+ <list><item>
+ An OSN text:
+ <newline/><ebnf>
+ <prod of="text"/> <def/>
+ <star/> <prod of="q-expr"/>
+ <stop/>
+ </ebnf>
+ </item></list>
+ <list><item>
+ A qualified symbolic expression:
+ <newline/><ebnf>
+ <prod of="q-expr"/> <def/>
+ <star/> <open/>
+ <prod of="symbol"/> <and/> <plus/> <prod of="sep"/>
+ <close/> <and/>
+ <prod of="expr"/>
+ <stop/>
+ </ebnf>
+ </item></list>
+ <list><item>
+ An unqualified symbolic expression:
+ <newline/><ebnf>
+ <prod of="expr"/> <def/>
+ <prod of="symbol"/> <or/>
+ <prod of="string"/> <or/>
+ <prod of="string-alt"/> <or/>
+ <open/>
+ <prod of="open"/> <and/>
+ <prod of="text"/> <and/>
+ <prod of="close"/>
+ <close/>
+ <stop/>
+ </ebnf>
+ </item></list>
+
+ <section1 name="semantics">Semantics</section1>
+ <body>
+ Forthcoming ...
+ </body>
<!--
morover, the escape sequences \x <two hexadecimal digits> and \u <four hexadecimal digits>
allow to specify a character by its code point <newline/>
finally the escape sequences \( for U+0002 and \) for U+0003 are available
-->
+ <section5 name="implementation">Implementation</section5>
+
+ <body>
+ Forthcoming ...
+ </body>
+
<footer/>
</page>