Lexical Conventions
- Comments are surrounded
by { and }. The body of a comment may contain any characters except the
end-of-comment character, so { this } } is not allowed. Comments can
appear after any token.
- Comments should be treated as white space,
along with spaces, tabs, carriage returns, and newlines.
- Keywords
and identifiers must be surrounded by white space, non-alphanumeric
tokens, or the beginning or end of the file.
- The class of lexemes
for the token identifier is described by the regular expression l(l|d)*,
where l stands for the set of uppercase and lowercase letters and d
stands for the set of digits 0 through 9.
- Case is
not significant.
- The regular expression for
the token constant is d+(.d+|e)(E(+|-|e)d+|e) (notice the difference
between the letter E and the symbol e; the latter is meant to stand for
epsilon)
- The lexemes for relop are =, <>, <, >, <=, and >=. The
lexemes for addop are +, -, and OR. The lexemes for mulop are *, /, DIV,
MOD, and AND.