•
•
•
SuperBASIC syntax
IS
defined
uSing
a non·rigorous 'meta language' type notation. Four
types
of
construction are used:
I I Select one
of
[ ] Enclosed
item(s)
are
optional
**
Enclosed items
are
repeated
..
Range
II
Comment
eg
IAIBI
AorB
[ A ] A
is
optional
* A * A
is
repeated
A..Z
A,
B,
C,
etc
[this
IS
a comment]
Consider a SuperBASIC identifier:
A sequence
of
numbers,
digitS,
underscores, starting
with
a letter and finishing
with
an
optional % or $
Jetter.=
I
A.Z
laz
[a
letter
is
one
of:
ABCDEFGHIJKLMNOPQRSTUVWXYZ]
or abcdefghijklmnopqrstuvwxyz
digit=
I 0 I 1 I 2 I 3 I 4 I 5 I 6 I 7 I 8 I 9 I
[a
digit
is
0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or
9]
underscore: = _
[an underscore
is
_]
identifier =letter
~
[Jetter
I digit I underscore
J,*
I % I $ I
must
start~
]
with
a letter
a sequence
of
letters
digits and underscores
i.e.
repeat something
which
is
optional
12/84
syntax
definitions
53