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 languages.
In order to meet these design goals, OSN pursues the following features.
-
+
+ Symbolic expressions
based on widely accepted syntactical conventions
provide for a lightweight and generic grammar,
which is both easy for machines to process,
@@ -20,54 +47,156 @@
as well as the support for canonicalization.
Apparently, these features fall outside the scope of OSN,
which targets the data structures of formal languages.
-
+
+
+
+
+
+
Optionally qualified symbolic expressions
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 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.
-
+
+
+
+
+
+
The US-ASCII character set,
extended to UTF-8 in
free-form text strings for the convenience of human readers,
makes OSN documents easy to visualize and transport over communication media.
OSN design aims at supporting application-independent standard encodings.
-
Grammar
+
+
+
+
Grammar
+
+
An OSN text uses the UTF-8 character set
and contains the next seven tokens that we define in a very common EBNF variant.
Characters not starting a token are not allowed.
The ones in the range U+0021 ... U+007E are ! # $ % & * / ? @ \ ^ | ~
and are available for extensions of OSN.
-
+
+
+
This token can represent the identifiers and the numerical constants of most programming languages:
- symbol = 1 * symbol-char ; symbol-char = '+' | '-' | '.' | '0' | ... | '9' | 'A' | ... | 'Z' | '_' | '`' | 'a' | ... | 'z' ;