Compiler Star if you like! Thx! Scanner Use the Lex tool to complete scanner. Parser Use the Yacc tool to complete parser. Cooperate with scanner. Code Generator Extend the code in parser to generate Java assembly code. Only need to program the .l (for scanner) and .y (parser and code generator) files, the others are auto generated files. The three black boxes in the below image are the parts I implemented.