- <name> -> any string of alphanumeric symbols that begins with a letter
- <statement> -> <name> = <expression> ;
- <statement> -> <name> = new <class>(<arguments>) ;
- <statement> -> <name>.<method>(<arguments>)|<method>(<arguments>);
- <arguments> -> possibly empty list of <expression>s separated by commas
- <expression> -> <string-expression> | <int-expression> | <oth-expression>
- <string-expression> -> <string-expression> + <string-expression>
- <string-expression> -> <string>
- <string> -> " any sequence of characters "
- <string> -> <name>
Compound statement requires more:
11. <method> -> setText | getText | getInt | setInt | add |
actionPerformed | init
12. <compound-statement> -> {
list of <statement>s
}
13. <statement> -> if (<bool-expression>)
<compound-statement>
14. <statement> -> if (<bool-expression>)
<compound-statement>
else
<compound-statement>