Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 60 lines (47 sloc) 902 Bytes
FunctionDeclaration: INT fact (
Variable: x
)
CompoundStatement: {
SelectionStmt: if (
BinaryExpression:
VariableExpression: x
GREATER_THAN
LiteralExpression: 1
)
ReturnStmt:
BinaryExpression:
VariableExpression: x
MULTIPLY
CallExpression: fact (
BinaryExpression:
VariableExpression: x
SUBTRACT
LiteralExpression: 1
)
else
ReturnStmt:
LiteralExpression: 1
}
FunctionDeclaration: VOID main (
)
CompoundStatement: {
VariableDeclaration: x
ExpressionStmt:
AssignExpression:
VariableExpression: x
=
CallExpression: read (
)
SelectionStmt: if (
BinaryExpression:
VariableExpression: x
GREATER_THAN
LiteralExpression: 0
)
ExpressionStmt:
CallExpression: write (
CallExpression: fact (
VariableExpression: x
)
)
}