Difference between revisions of "CSE598/440 Compiler Construction I"
From esoterum.org
Line 7: | Line 7: | ||
=== Running Flex and Bison === | === Running Flex and Bison === | ||
<code> | <code> | ||
− | :flex adv4.lex | + | :> flex adv4.lex |
:: [lex.yy.c is created] | :: [lex.yy.c is created] | ||
− | :bison -d -o compile.c adv5.y | + | :> bison -d -o compile.c adv5.y |
:: [compile.c and compile.h are created] | :: [compile.c and compile.h are created] | ||
− | :cc -o compile compile.c lex.yy.c | + | :> cc -o compile compile.c lex.yy.c |
:: [compile (compiler) is created] | :: [compile (compiler) is created] | ||
− | :compile < toy.al | + | :> compile < toy.al |
</code> | </code> | ||
Revision as of 22:41, 29 January 2008
Yacc
Running Flex and Bison
- > flex adv4.lex
- [lex.yy.c is created]
- > bison -d -o compile.c adv5.y
- [compile.c and compile.h are created]
- > cc -o compile compile.c lex.yy.c
- [compile (compiler) is created]
- > compile < toy.al
Course Text:
- Cooper, Engineering a Compiler
- ISBN: 9781558606982