+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-us">
+ <head>
+ <meta http-equiv="Content-Language" content="en-us" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <meta name="author" content="Ferruccio Guidi" />
+ <meta name="description" content="\lambda\delta home page: Open Symbolic Notation" />
+ <title>\lambda\delta home page: Open Symbolic Notation</title>
+ <link rel="stylesheet" type="text/css" href="http://lambdadelta.info/css/ld_web.css" />
+ <link rel="stylesheet" type="text/css" href="http://lambdadelta.info/css/lddl.css" />
+ <link rel="stylesheet" type="text/css" href="http://lambdadelta.info/css/xhtbl.css" />
+ <link rel="shortcut icon" href="http://lambdadelta.info/images/crux_16.ico" />
+ </head>
+ <body lang="en-US">
+ <div class="spacer">
+ <a href="http://lambdadelta.info/osn.html">
+ <img class="w3c" alt="[Open Symbolic Notation logo]" title="OSN: Open Symbolic Notation" src="http://lambdadelta.info/images/osn_label.png" />
+ </a>
+ </div>
+ <div class="head1">Open Symbolic Notation</div>
+ <div class="spacer">
+ <img class="rule" alt="[Spacer]" title="\lambda\delta rainbow rule" src="http://lambdadelta.info/images/rainbow.png" />
+ </div>
+ <div xmlns:ld="http://lambdadelta.info/" class="text">
+ 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.
+ </div>
+ <ul xmlns:ld="http://lambdadelta.info/">
+ <span class="red-mark">
+ <li>
+ <span class="alpha">
+ <a href="https://en.wikipedia.org/wiki/S-expression">Symbolic expressions</a>
+ based on widely accepted syntactical conventions
+ provide for a <span class="emph ">lightweight</span> and <span class="emph ">generic</span> grammar,
+ which is both <span class="emph ">easy for machines to process</span>,
+ and <span class="emph ">easy for humans to understand</span>.
+ As a mean to support <span class="emph ">efficient</span> information processing,
+ OSN aims at an economic representation of data
+ contrary to <a href="http://www.w3.org/TR/2008/REC-xml-20081126/#sec-origin-goals">XML design goal 10</a>.
+ Compared to other data-interchange formats based on symbolic expressions,
+ like <a href="http://people.csail.mit.edu/rivest/Sexp.txt">canonical symbolic expressions</a>,
+ representing arbitrary data in binary format is a secondary concern in the design of OSN,
+ as well as the support for canonicalization.
+ Apparently, these features fall outside the scope of OSN,
+ which targets the data structures of <span class="emph ">formal languages</span>.
+ </span>
+ </li>
+ </span>
+ <br />
+ <span class="blue-mark">
+ <li>
+ <span class="alpha">
+ Optionally <a href="https://en.wikipedia.org/wiki/Namespace">qualified</a> 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 <span class="emph ">easy to extend</span> in that
+ domain-specific OSN applications can work as expected even if
+ data from different domains is added to the text they process.
+ </span>
+ </li>
+ </span>
+ <br />
+ <span class="green-mark">
+ <li>
+ <span class="alpha">
+ The <a href="https://en.wikipedia.org/wiki/ASCII">US-ASCII</a> character set,
+ extended to <a href="http://www.utf-8.com/">UTF-8</a> in
+ free-form text strings for the convenience of human readers,
+ makes OSN documents <span class="emph ">easy to visualize and transport</span> over communication media.
+ OSN design aims at supporting <span class="emph ">application-independent</span> standard encodings.
+ </span>
+ </li>
+ </span>
+ </ul>
+ <div xmlns:ld="http://lambdadelta.info/" class="head2dx" id="grammar">Grammar <img class="icon37" alt="[butterfly]" title="\lambda\delta butterfly" src="http://lambdadelta.info/images/b6.png" />
+ </div>
+ <div xmlns:ld="http://lambdadelta.info/" class="text">
+ An OSN text uses the <a href="http://www.utf-8.com/">UTF-8</a> 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.
+ </div>
+ <ul xmlns:ld="http://lambdadelta.info/">
+ <li>
+ This token can represent the identifiers and the numerical constants of most programming languages:
+ <br />
+ <span class="emph ebnf">symbol = 1 * symbol-char ; <br />symbol-char = '+' | '-' | '.' | '0' | ... | '9' | 'A' | ... | 'Z' | '_' | '`' | 'a' | ... | 'z' ; </span>
+ </li>
+ <br />
+ <li>
+ This token contains free-form text with commonly accepted escape sequences:
+ <br />
+ <span class="emph ebnf">string = '"' , * ( string-char | "'" | '\' escape ) , '"' ; <br />string-char = ( #0 | ... | #10FFFF ) - ( #0 | ... | #1F | "'" | '\' | '"' | #7F ) ; <br />escape = 1 * space | '"' | "'" | '(' | ')' | '0' | '\' | 'a' | 'b' | 'e' | 'f' | 'n' | 'r' | 't' | ( 'u' , 4 * 4 hex ) | 'v' | ( 'x' , 2 * 2 hex ) ; <br />space = #9 | ... | #D | #20 ; <br />hex = '0' | ... | '9' | 'A' | ... | 'F' | 'a' | ... | 'f' ; </span>
+ </li>
+ <br />
+ <li>
+ This token is a widely used alternative of the former token:
+ <br />
+ <span class="emph ebnf">string-alt = "'" , * ( string-char | '"' | '\' escape ) , "'" ; </span>
+ </li>
+ <br />
+ <li>
+ This token separates the qualifiers of a symbolic expression:
+ <br />
+ <span class="emph ebnf">sep = ':' ; </span>
+ </li>
+ <br />
+ <li>
+ This token starts a compound symbolic expression:
+ <br />
+ <span class="emph ebnf">open = '(' | '<' | '[' | '{' ; </span>
+ </li>
+ <br />
+ <li>
+ This token ends a compound symbolic expression:
+ <br />
+ <span class="emph ebnf">close = ')' | '>' | ']' | '}' ; </span>
+ </li>
+ <br />
+ <li>
+ This token is ignored and separates the other tokens:
+ <br />
+ <span class="emph ebnf">gap = space | ',' | ';' | '=' ; </span>
+ </li>
+ </ul>
+ <div xmlns:ld="http://lambdadelta.info/" class="text">
+ The grammar of OSN is very liberal by design.
+ Spaces of the form <span class="emph ebnf">1 * gap </span> can appear between any pair of tokens.
+ </div>
+ <ul xmlns:ld="http://lambdadelta.info/">
+ <li>
+ An OSN text:
+ <br />
+ <span class="emph ebnf">text = * q-expr ; </span>
+ </li>
+ <br />
+ <li>
+ A qualified symbolic expression:
+ <br />
+ <span class="emph ebnf">q-expr = * ( symbol , 1 * sep ) , expr ; </span>
+ </li>
+ <br />
+ <li>
+ An unqualified symbolic expression:
+ <br />
+ <span class="emph ebnf">expr = symbol | string | string-alt | ( open , text , close ) ; </span>
+ </li>
+ </ul>
+ <div xmlns:ld="http://lambdadelta.info/" class="head2dx" id="semantics">Semantics <img class="icon37" alt="[butterfly]" title="\lambda\delta butterfly" src="http://lambdadelta.info/images/b1.png" />
+ </div>
+ <div xmlns:ld="http://lambdadelta.info/" class="text">
+ Forthcoming ...
+ </div>
+ <!--
+ 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
+-->
+ <div xmlns:ld="http://lambdadelta.info/" class="head2dx" id="implementation">Implementation <img class="icon37" alt="[butterfly]" title="\lambda\delta butterfly" src="http://lambdadelta.info/images/b5.png" />
+ </div>
+ <div xmlns:ld="http://lambdadelta.info/" class="text">
+ Forthcoming ...
+ </div>
+ <div class="spacer">
+ <img class="rule" alt="[Spacer]" title="\lambda\delta rainbow rule" src="http://lambdadelta.info/images/rainbow.png" />
+ </div>
+ <div xmlns:ld="http://lambdadelta.info/" class="spacer">
+ <br />
+ </div>
+ <div xmlns:ld="http://lambdadelta.info/" class="spacer">
+ <a href="http://validator.w3.org/check?uri=referer">
+ <img class="w3c" alt="[Valid XHTML 1.1]" title="Valid XHTML 1.1" src="http://www.w3.org/Icons/valid-xhtml11-blue" />
+ </a>
+ <a href="http://jigsaw.w3.org/css-validator/check/referer">
+ <img class="w3c" alt="[Valid CSS level 2]" title="Valid CSS level 2" src="http://www.w3.org/Icons/valid-css2-blue" />
+ </a>
+ <a href="http://www.w3.org/XML/">
+ <img class="w3c" alt="[Generated from XML via XSL]" title="Generated from XML via XSL" src="http://lambdadelta.info/images/xml_xsl2.png" />
+ </a>
+ <a href="http://www.w3.org/Graphics/PNG/">
+ <img class="w3c" alt="[PNG used here]" title="PNG used here" src="http://lambdadelta.info/images/PNGnow2.png" />
+ </a>
+ <a href="http://www.anybrowser.org/campaign/">
+ <img class="w3c" alt="[Viewable with any browser]" title="Viewable with any browser" src="http://www.anybrowser.org/campaign/bvgraphics/abtfile.png" />
+ </a>
+ </div>
+ <div xmlns:ld="http://lambdadelta.info/" class="spacer">
+ <br />
+ </div>
+ <div xmlns:ld="http://lambdadelta.info/" class="spacer">Last update: Thu, 21 Jul 2016 16:50:49 +0200</div>
+ </body>
+</html>