This homepage is just my homework of compiler course. I use the gimp, vim, c2html, gmake, and some other utils under FreeBSD to produce this homepage. All file end with .c.html is produced by a C file with the same major name. For more detial, please see the page 38 to 47 of "Crafting A Compiler with C" written by Charles N. Fischer and Richard J. LeBlanc, Jr.

The Figure 2.9 Grammar for Micro with Action Aymbols
<program> -> #start begin <statement list> end
<statement list> -> <statement> { <statement> }
<statement> -> <ident> := <expression> #assign;
<statement> -> read (<id list> );
<statement> -> write( <expr list> );
<id list> -> <ident> #read_id {, <ident> #read_id }
<expr list> -> <expression> #write_expr {, <expression> #write_expr }
<expression> -> <primary> { <add op> <primary> #gen_infix }
<primary> -> ( <expression> )
<primary> -> <ident>
<primary> -> INTLITERAL #process_op
<add op> -> PLUSOP #process_op
<add op> -> MINUSOP #process_op
<ident> -> ID #process_id
<system goal> -> <program> SCANEOF #finish

Author: Ming-I Hsieh (Powered by FreeBSD, c2html, gimp, vim, gmake)