#include <iostream>
#include <string>
using namespace std;
//
class CScanner
{
public:
void Scan() { cout<<"词法分析"<<endl; }
};
class CParse
{
public:
void Parse() { cout<<"语法分析"<<endl; }
};
class CGenMidCode
{
public:
void GenMidCode() { cout<<"生成中间代码"<<endl; }
};
class CGenMachineCode
{
public:
void GenMachineCode() { cout<<"生成机器代码"<<endl; }
};
class CCompile
{
public:
void Compile()
{
CScanner scanner;
scanner.Scan();
CParse parse;
parse.Parse();
CGenMidCode genMidCode;
genMidCode.GenMidCode();
CGenMachineCode genMachineCode;
genMachineCode.GenMachineCode();
}
};
//
void main()
{
CCompile compile;
compile.Compile();
}