Download A Specification Language for Program Auralization

Transcript
| term
212.
term
→
term mulop factor
| factor
214.
factor
→
( expression )
| unop factor
| id
| id(actual-par-list)
| id( )
| const
220.
condition
→
condition relop cterm
| cterm
222.
cterm
→
cterm logop cfactor
| cfactor
224.
cfactor
→
expression
| (condition)
| not cfactor
227.
addop
→
+|−
229.
mulop
→
∗|/
231.
unop
→
−
232.
relop
→
< | > | <= | = | >= | <>
238.
logop
→
&& | k
10
Lexical Conventions
Using regular expressions[1] we define the lexical elements of LSL.
1. Comments are enclosed inside /* and */. Comments may not appear within a token.
A comment within another comment is not allowed.
2. char denotes any ASCII character.
3. One or more spaces separates tokens. Spaces may not appear within tokens.
50