Assignment-1/example_output/p4.out

83 lines
876 B
Plaintext

DEF def
IDENTIFIER fib
LPAREN (
IDENTIFIER n
RPAREN )
COLON :
NEWLINE
INDENT
IDENTIFIER f0
ASSIGN =
INTEGER 0
NEWLINE
IDENTIFIER f1
ASSIGN =
INTEGER 1
NEWLINE
IDENTIFIER i
ASSIGN =
INTEGER 0
NEWLINE
WHILE while
IDENTIFIER i
LT <
IDENTIFIER n
COLON :
NEWLINE
INDENT
IDENTIFIER fi
ASSIGN =
IDENTIFIER f0
PLUS +
IDENTIFIER f1
NEWLINE
IDENTIFIER f0
ASSIGN =
IDENTIFIER f1
NEWLINE
IDENTIFIER f1
ASSIGN =
IDENTIFIER fi
NEWLINE
IDENTIFIER i
ASSIGN =
IDENTIFIER i
PLUS +
INTEGER 1
NEWLINE
DEDENT
RETURN return
IDENTIFIER f0
NEWLINE
DEDENT
IDENTIFIER fib
LPAREN (
INTEGER 0
RPAREN )
NEWLINE
IDENTIFIER fib
LPAREN (
INTEGER 1
RPAREN )
NEWLINE
IDENTIFIER fib
LPAREN (
INTEGER 2
RPAREN )
NEWLINE
IDENTIFIER fib
LPAREN (
INTEGER 3
RPAREN )
NEWLINE
IDENTIFIER fib
LPAREN (
INTEGER 4
RPAREN )
NEWLINE
IDENTIFIER fib
LPAREN (
INTEGER 5
RPAREN )
NEWLINE