00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <string>
00025 #include <vector>
00026 #include <map>
00027
00028 #include "Token.h"
00029 #include "Statement.h"
00030 #include "dp.h"
00031
00032
00033 Statement::Statement(token_v &tok)
00034 :Sequence(tok)
00035 {
00036 }
00037
00038
00039 Statement::~Statement()
00040 {
00041 }
00042
00043
00044 void Statement::Display()
00045 {
00046 if (IsExtern())
00047 return;
00048 if (config["-xml"] == "true")
00049 {
00050 printf("<statement file=\"%s\" line=\"%d\" value=\"%s\" />\n",
00051 GetFile().c_str(),
00052 GetLine(),
00053 GetExpr().c_str());
00054 return;
00055 }
00056 if (config["-dot"] == "true")
00057 return;
00058 Tab();
00059 printf("%s",GetExpr().c_str());
00060 printf("\n");
00061 }
00062
00063