------------------------------------------------------------------------------
MC logo
ECFG for Tucker and Noonan's Clite Language
[^] Syntax
------------------------------------------------------------------------------
[Ch. 1: Overview and History] [Syntax] [Names and Scope] [Types and Type Systems] [Semantics] [Functions] [Memory Management] [Imperitive Programs and Functional Abstraction] [Modular and Class Abstraction] [Functional Programming] [Logic Programming]
[ECFG for Tucker and Noonan's Clite Language] [Plain C CFG] [Abstract Syntax for for Tucker and Noonan's Clite Language] [Derivation Problem] [Regular Expression Problems]
Programint main () { Declarations Statements }
DeclarationsDeclaration }
DeclarationType Identifier [ [ Integer ] ] { , Identifier [ [ Integer ] ] } ;
Typeint | bool | float | char
StatementsStatement }
Statement; | Block | Assignment | IfStatement | WhileStatement
Block{ Statements }
AssignmentIdentifier [ [ Expression ] ] = Expression 
IfStatementif ( Expression ) Statment [ else Statement ]
WhileStatementwhile ( Expression ) Statement
ExpressionConjunction { || Conjuction }
ConjunctionEquality { && Equality }
EqualityRelation [ EquOp Relation ]
EquOp== | !=
RelationAddition [ RelOp Addition ]
RelOp< | <= | > | >=
AdditionTerm { AddOp Term }
AddOp+ | -
TermFactor { MulOp Factor }
MulOp* | / | %
FactorUnaryOp ] Primary
UnaryOp- | !
PrimaryIdentifier [ [ Expression ] ] | Literal  | ( Expression )Type ( Expression )
IdentifierLetter { Letter | Digit }
Lettera | b | … | z | A | B | … | Z
Digit0 | 1 | … | 9
LiteralInteger | Boolean | Float | Char
IntegerDigit { Digit }
Booleantrue | false
FloatInteger . Integer
CharASCIIChar '