Once there were many different character sets that were unified by Unicode. Today we have many different programming languages, each with a slightly different syntax from all the others. The multiplicity of such syntaxes imposes unnecessary burdens on users and language designers. UniSyn is proposed as a common syntax that is easy to understand yet general enough to be used by many different programming languages.
The advantages of having one uniform language syntax:
less of a burden on users to recall which of the many syntax schemes in current use is the relevant one for the programming language they are currently programming in. Rather like having all your electrical appliances work from the same voltage electricity rather than different voltages.
programming effort can be applied globally to optimize the parsing process to produce the fastest possible parser with the best diagnostics.
Expressions in Unisyn can be parsed in situ - it is not necessary to reparse the entire source file to syntax check changes made to the file. Instead changes can be checked locally at the point of modification.
Dyadic operator priorities
Even three levels of priority are enough to parse subroutine declarations, for loops and if statements with nested expressions:
v1 v2 plus then
v3 v4 == else
v5 v6 minus times
v7 v8 v9 +
The priority of a dyadic operator is determined by the Unicode Mathematical Alphanumeric Symbols that is used to encode it.
The new operators provided by the Unicode standard allows us to offer users a wider range of operators and brackets with which to express their intentions clearly within the three levels of operator precedence provided.
Minimalism through Unicode
This module is part of the Earl Zero project: using Perl 5 to create a minimal, modern Unicode based scripting language: Earl Zero. Earl Zero generates x86 assembler code directly from a program consisting of a single Unisyn expression with no keywords; only expressions constructed from user defined unary and binary operators are used to construct Unisyn programs.
Minimalism is an important part of Earl Zero; for example, the "Hello World" program is:
Please feel free to join in with this interesting project - we need all the help we can get.
For documentation see: CPAN