Unit home
Project 1
help2002
Lecture & Workshop recordings on LMS
Schedule
FAQ
Unit outline
C textbooks
OS textbooks
Information resources
Extra reading
Past projects
Recent feedback
Working effectively
Look after yourself!
| means a choice [...] means zero or one (...)* means zero or more Program lines commence at the left-hand margin (no indentation). Statements forming the body of a function are indented with a single tab.
program: ( program-item )* program-item: statement | function identifier ( identifier )* ←–tab–→ statement1 ←–tab–→ statement2 .... statement: identifier "<-" expression | print expression | return expression | functioncall expression: term [ ("+" | "-") expression ] term: factor [ ("*" | "/") term ] factor: realconstant | identifier | functioncall | "(" expression ")" functioncall: identifier "(" [ expression ( "," expression )* ] ")"