next up previous
Next: Parsing (II) Up: A detailed example Previous: The Makefile

A session

[moreno@iguanodon yacc]$ ls
bin  Makefile  ps  src  test
[moreno@iguanodon yacc]$ make expressionTree 
------------------------------------------------------------
Building expressionTree in /home/moreno/src/Courses/CS447/yacc/bin
lex.yy.c:1026: warning: `yyunput' defined but not used
/home/moreno/src/Courses/CS447/yacc/src/expressionTree.y: In function `main':
/home/moreno/src/Courses/CS447/yacc/src/expressionTree.y:81: warning: implicit declaration of function `yyparse'
y.tab.c: In function `yyparse':
y.tab.c:341: warning: implicit declaration of function `yylex'
------------------------------------------------------------
[moreno@iguanodon yacc]$ ./bin/expressionTree 
1 + 2
(+ 1 2)
(1 + 2) * (x + y)
(* (+ 1 2) (+ x y))
1 + 2 + 3 + 4
(+ (+ (+ 1 2) 3) 4)
a*b*c + b*c*d + c*d*e
(+ (+ (* a (* b c)) (* b (* c d))) (* c (* d e)))


next up previous
Next: Parsing (II) Up: A detailed example Previous: The Makefile
Marc Moreno Maza
2004-12-02