|
 |
CS 3723
Programming Languages
|
Tiny® Syntax |
Grammar for the language of the recitation. Note that metasymbols
[] enclose and optional item, while metasymbols {} mean zero or more
occurrences of the item enclosed.
red = terminal, green = non-termnial, black = metasymbol.
M ---> { S }
S ---> I | W | A | P | C | G
I ---> '[' E '?' { S } ':' { S } ']' | '[' E '?' { S } ']'
W ---> '{' E '?' { S } '}'
A ---> id '=' E ';'
P ---> '<' E ';'
G ---> '>' id ';'
C ---> '<' ( 'B' | 'T' | 'N' ) ';'
E ---> T { ('+' | '-') T }
T ---> U { ('*' | '/' | '%') U }
U ---> F '^' U | F
F ---> '(' E ')' | id | num
id ---> lower-case
num ---> digit
|
red = terminal, green = non-termnial, black = metasymbol.
M ---> { S }
S ---> I | W | A | P | C | G
I ---> [ E ? { S } : { S } ] | [ E ? { S } ]
W ---> { E ? { S } }
A ---> id = E ;
P ---> < E ;
G ---> > id ;
C ---> < ( B | T | N ) ;
E ---> T { (+ | -) T }
T ---> U { (* | / | %) U }
U ---> F ^ U | F
F ---> ( E ) | id | num
id ---> lower-case
num ---> digit
|
Revision date: 2013-02-10.
(Please use ISO 8601,
the International Standard Date and Time Notation.)
|