Higher and higher, baby. It's a livin' thing, its a terrible thing to lose. Its a given thing. What a terrible thing to lose ELO
The folder /syntagma/doc/ will contain documentation for the syntagma language
The folder /syntagma/eg/ contains a few examples of syntagma scripts
such as:
/syntagma/eg/json.sga parse a json text data file and check it’s syntax
/syntagma/eg/json.lex.numbers.sga how to lex the json number format
/syntagma/eg/nested.sga check whether braces/brackets
are properly nested and balanced within a text file.
/syntagma/eg/plzero.sga a slightly buggy syntax checker for Wirths PL/0
/tr/syntagma.pss and also in the interpreters
and /tr/engine.perl.sh These are shell scripts which
compile a syntagma script into nom, and then run it either using
the pep interpreter or a translated translation script, such as
/tr/nom.tolua.lua or /tr/nom.toperl.pl
Syntagma is a higher-level language compared to nom, which reads more like and intermediate format language. Below is the code to create some literal tokens and a parse rule in syntagma and also nom.
lit: [.,=+-]; # syntagma
[.,=+-] { add "*"; push; .reparse } # nom
a = b c; # a parse reduction rule in syntagma
pop; "b*c*" { clear; add "a*"; .reparse } push; # the same in nom
The nom version is more verbose and potentially more cryptic. Syntagma uses the same model and text-register virtual machine as nom, but it provides a simpler syntax.