This document describes how to use the sid
parser
generator. It was written for sid
version 1.9. The
main features of each version of sid
are listed
below:
sid
1.0 - this was the first version of
sid
to support attribute grammars. The output
language was C.
sid
1.1 - this was a bug fix version of
sid
1.0.
sid
1.2 - this version of sid
added
predicates, exception handling, improved inlining options, and a
grammar test pseudo-language.
sid
1.3 - this version of sid
added
anonymous rules, and a better syntax for the C specific
information.
sid
1.4 - this was a bug fix version of
sid
1.3.
sid
1.5 - this was a bug fix version of
sid
1.4. The command line option syntax changed in
this release as well.
sid
1.6 - this version of sid
changed the input syntax, added scoped rules, and removed basics
(replacing them with terminal symbols). It also added a stricter
ISO C language.
sid
1.7 - The syntax of the actions file changed
slightly in this version. The error messages and recovery from
syntax errors were also improved in this version. This version
also added explicit call by reference support (rather than the
inconsistent function call semantics of earlier versions). The
command line options changed in this version, to support language
specific options, and the strict-ansi-c
language was
dropped. Non-local variables were also added.
sid
1.8 - Initialisers were added for non-local
variables. Assignment was added.
sid
1.9 - this was a bug fix version of
sid
1.8.
sid
turns specifications of languages into
programs that recognise those languages. One of the aims of
sid
was to separate the specification of the
language to be recognised from the language that the recogniser
program is written in. For this reason, input to sid
is split into two components: output language independent
information, and output language dependent information.
At present, sid
will only output programs in C
(either ISO or pre-ISO), but it is designed so that adding new
output languages should be fairly simple. There is one other
pseudo-language: the test language. This is used for testing
grammars and the transforms, but will not output a parser.