\input default.mac
\symbol{}\leftline{ }
\comment{}\leftline{ 1:\ \ \ /************************************************************************** }
\leftline{ 2:\ \ \ c2tex\ -\ Konverze\ C++\ do\ TeXu }
\leftline{ 3:\ \ \ Jiri\ Bittner,\ Cerven\ 1996 }
\leftline{ 4:\ \ \ **************************************************************************/\symbol{} }
\leftline{ 5:\ \ \  }
\keyb{}\leftline{ 6:\ \ \ \#include\symbol{}\ <\normal{}stdlib.h\symbol{}> }
\keyb{}\leftline{ 7:\ \ \ \#include\symbol{}\ <\normal{}stdio.h\symbol{}> }
\keyb{}\leftline{ 8:\ \ \ \#include\symbol{}\ <\normal{}string.h\symbol{}> }
\keyb{}\leftline{ 9:\ \ \ \#include\symbol{}\ <\normal{}iostream.h\symbol{}> }
\keyb{}\leftline{10:\ \ \ \#include\symbol{}\ <\normal{}fstream.h\symbol{}> }
\leftline{11:\ \ \  }
\leftline{12:\ \ \  }
\keyb{}\leftline{13:\ \ \ \#define\symbol{}\ \ \ \ \ \ \ \ \normal{}KEYWORD1\symbol{}\ \ \ \ \ \ \ \normal{}1\symbol{}\ \ \ \ \ \comment{}//\ kody\ pro\ jednotlive\ znacky }
\keyb{}\leftline{14:\ \ \ \#define\symbol{}\ \ \ \ \ \ \ \ \normal{}KEYWORD2\symbol{}\ \ \ \ \ \ \ \normal{}2\symbol{} }
\keyb{}\leftline{15:\ \ \ \#define\symbol{}\ \ \ \ \ \ \ \ \normal{}SYMBOL\symbol{}\ \ \ \ \ \ \ \ \ \normal{}3\symbol{} }
\keyb{}\leftline{16:\ \ \ \#define\symbol{}\ \ \ \ \ \ \ \ \normal{}COMMENT\symbol{}\ \ \ \ \ \ \ \ \normal{}4\symbol{} }
\keyb{}\leftline{17:\ \ \ \#define\symbol{}\ \ \ \ \ \ \ \ \normal{}NORMAL\symbol{}\ \ \ \ \ \ \ \ \ \normal{}5\symbol{} }
\leftline{18:\ \ \  }
\keyb{}\leftline{19:\ \ \ \#define\symbol{}\ \ \ \ \ \ \ \ \normal{}WORD\symbol{}\ \ \ \normal{}10\symbol{} }
\leftline{20:\ \ \  }
\keyb{}\leftline{21:\ \ \ \#define\symbol{}\ \ \ \ \ \ \ \ \normal{}S_LEN\symbol{}\ \ \normal{}256\symbol{} }
\leftline{22:\ \ \  }
\keya{}\leftline{23:\ \ \ int\symbol{}\ \keya{}pascal\symbol{}=\normal{}0\symbol{}; }
\leftline{24:\ \ \  }
\keya{}\leftline{25:\ \ \ char\symbol{}\ \normal{}comment_1b\symbol{}='/',\normal{}comment_2b\symbol{}='*',\normal{}comment_1e\symbol{}='*',\normal{}comment_2e\symbol{}='/'; }
\leftline{26:\ \ \  }
\keya{}\leftline{27:\ \ \ class\symbol{}\ \normal{}BaseC\symbol{} }
\leftline{28:\ \ \ $\{$ }
\leftline{29:\ \ \  }
\leftline{30:\ \ \ $\}$; }
\leftline{31:\ \ \  }
\leftline{32:\ \ \  }
\keya{}\leftline{33:\ \ \ typedef\symbol{}\ \keya{}double\symbol{}\ \normal{}Real\symbol{}; }
\leftline{34:\ \ \  }
\leftline{35:\ \ \  }
\keya{}\leftline{36:\ \ \ class\symbol{}\ \normal{}OptionsC\symbol{}\ :\ \keya{}public\symbol{}\ \normal{}BaseC\symbol{} }
\leftline{37:\ \ \ $\{$ }
\keya{}\leftline{38:\ \ \ public\symbol{}: }
\leftline{39:\ \ \  }
\leftline{40:\ \ \ \ \ \keya{}int\symbol{}\ \ \ \ \normal{}number\symbol{}; }
\leftline{41:\ \ \ \ \ \keya{}char\symbol{}\ **\normal{}strings\symbol{}; }
\leftline{42:\ \ \ \ \  }
\comment{}\leftline{43:\ \ \ //\ \ OptionsC()\ $\{$\ number=0;\ $\}$ }
\symbol{}\leftline{44:\ \ \ \ \ \normal{}OptionsC\symbol{}(\keya{}int\symbol{}\ \normal{}n\symbol{},\keya{}char\symbol{}\ **\normal{}a\symbol{})\ $\{$\ \normal{}init\symbol{}(\normal{}n\symbol{},\normal{}a\symbol{});\ $\}$ }
\leftline{45:\ \ \  }
\leftline{46:\ \ \ \ \ \keya{}void\symbol{}\ \normal{}init\symbol{}(\keya{}int\symbol{}\ \normal{}n\symbol{},\keya{}char\symbol{}\ **\normal{}s\symbol{})\ $\{$\ \normal{}number\symbol{}=\normal{}n\symbol{};\ \normal{}strings\symbol{}=\normal{}s\symbol{};\ $\}$ }
\leftline{47:\ \ \ \ \ \keya{}int\symbol{}\ \normal{}isOption\symbol{}(\keya{}char\symbol{}\ *\normal{}string\symbol{}); }
\leftline{48:\ \ \ \ \ \keya{}int\symbol{}\ \normal{}isOption\symbol{}(\keya{}char\symbol{}\ *\normal{}string\symbol{},\keya{}int\symbol{}\ *\normal{}number\symbol{}); }
\leftline{49:\ \ \ \ \ \keya{}int\symbol{}\ \normal{}getParam\symbol{}(\keya{}char\symbol{}\ *\normal{}s\symbol{},\keya{}int\symbol{}\ \normal{}n\symbol{}=\normal{}1\symbol{}); }
\leftline{50:\ \ \  }
\leftline{51:\ \ \ \ \ \keya{}int\symbol{}\ \normal{}getOptionValue\symbol{}(\keya{}char\symbol{}\ *\normal{}string\symbol{},\keya{}int\symbol{}\ *\normal{}result\symbol{}); }
\leftline{52:\ \ \ \ \ \keya{}int\symbol{}\ \normal{}getOptionValue\symbol{}(\keya{}char\symbol{}\ *\normal{}string\symbol{},\normal{}Real\symbol{}\ *\normal{}r\symbol{}); }
\leftline{53:\ \ \ \ \ \keya{}int\symbol{}\ \normal{}getOptionValue\symbol{}(\keya{}char\symbol{}\ *\normal{}string\symbol{},\keya{}char\symbol{}\ *\normal{}result\symbol{}); }
\leftline{54:\ \ \  }
\leftline{55:\ \ \ $\}$; }
\leftline{56:\ \ \  }
\leftline{57:\ \ \  }
\keya{}\leftline{58:\ \ \ class\symbol{}\ \normal{}LexanC\symbol{}:\ \keya{}public\symbol{}\ \normal{}BaseC\symbol{} }
\leftline{59:\ \ \ $\{$ }
\keya{}\leftline{60:\ \ \ public\symbol{}: }
\normal{}\leftline{61:\ \ \ FILE\symbol{}\ *\normal{}file\symbol{}; }
\leftline{62:\ \ \  }
\keya{}\leftline{63:\ \ \ int\symbol{}\ \ \ \ \normal{}nsep\symbol{},\normal{}nkey\symbol{}[\normal{}2\symbol{}]; }
\keya{}\leftline{64:\ \ \ char\symbol{}\ \ \ *\normal{}separators\symbol{}; }
\keya{}\leftline{65:\ \ \ char\symbol{}\ \ \ **\normal{}key\symbol{}[\normal{}2\symbol{}]; }
\leftline{66:\ \ \  }
\normal{}\leftline{67:\ \ \ LexanC\symbol{}()$\{$\normal{}init\symbol{}("\normal{}default.lex\symbol{}");$\}$ }
\leftline{68:\ \ \  }
\keya{}\leftline{69:\ \ \ int\symbol{}\ \ \ \ \normal{}isSeparator\symbol{}(\keya{}int\symbol{}\ \normal{}c\symbol{})$\{$\ \keya{}return\symbol{}\ \normal{}strchr\symbol{}(\normal{}separators\symbol{},\normal{}c\symbol{})!=\normal{}NULL\symbol{};\ $\}$ }
\keya{}\leftline{70:\ \ \ int\symbol{}\ \ \ \ \normal{}isKey\symbol{}(\keya{}char\symbol{}\ *\normal{}s\symbol{}); }
\leftline{71:\ \ \  }
\keya{}\leftline{72:\ \ \ int\symbol{}\ \ \ \ \normal{}init\symbol{}(\keya{}const\symbol{}\ \keya{}char\symbol{}\ *\normal{}lexname\symbol{}); }
\keya{}\leftline{73:\ \ \ int\symbol{}\ \ \ \ \normal{}open\symbol{}(\keya{}const\symbol{}\ \keya{}char\symbol{}\ *\normal{}filename\symbol{}); }
\leftline{74:\ \ \  }
\keya{}\leftline{75:\ \ \ int\symbol{}\ \ \ \ \normal{}readWord\symbol{}(\normal{}FILE\symbol{}\ *\normal{}f\symbol{},\keya{}char\symbol{}\ *\normal{}string\symbol{}); }
\leftline{76:\ \ \  }
\keya{}\leftline{77:\ \ \ int\symbol{}\ \ \ \ \normal{}read\symbol{}(\keya{}char\symbol{}\ *\normal{}string\symbol{}); }
\keya{}\leftline{78:\ \ \ void\symbol{}\ \ \ \normal{}close\symbol{}()$\{$\normal{}fclose\symbol{}(\normal{}file\symbol{});$\}$ }
\leftline{79:\ \ \  }
\keya{}\leftline{80:\ \ \ virtual\symbol{}\ \ \ \ \ \ \ \ \normal{}ostream\symbol{}\&\ \keya{}operator\symbol{}>>(\normal{}ostream\symbol{}\ \&\normal{}s\symbol{})\ $\{$\  }
\leftline{81:\ \ \ \ \ \ \ \ \ \ \normal{}s\symbol{}<<\normal{}nsep\symbol{}<<"\\normal{}n\symbol{}"<<\normal{}nkey\symbol{}[\normal{}0\symbol{}]<<"\\normal{}n\symbol{}"<<\normal{}nkey\symbol{}[\normal{}1\symbol{}]<<"\\normal{}n\symbol{}"; }
\leftline{82:\ \ \ \ \ \ \ \ \ \ \keya{}return\symbol{}\ \normal{}s\symbol{}; }
\leftline{83:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\}$ }
\leftline{84:\ \ \ \~{}\normal{}LexanC\symbol{}()$\{$\normal{}fclose\symbol{}(\normal{}file\symbol{});$\}$ }
\leftline{85:\ \ \ $\}$; }
\leftline{86:\ \ \  }
\keya{}\leftline{87:\ \ \ class\symbol{}\ \normal{}TexC\symbol{}:\ \keya{}public\symbol{}\ \normal{}BaseC\symbol{} }
\leftline{88:\ \ \ $\{$ }
\keya{}\leftline{89:\ \ \ public\symbol{}: }
\leftline{90:\ \ \ \ \ \normal{}FILE\symbol{}\ *\normal{}file\symbol{}; }
\leftline{91:\ \ \ \ \ \keya{}int\symbol{}\ \normal{}numbers\symbol{}; }
\leftline{92:\ \ \ \ \ \keya{}int\symbol{}\ \normal{}lnumber\symbol{}; }
\leftline{93:\ \ \ \ \  }
\leftline{94:\ \ \ \ \ \normal{}TexC\symbol{}()$\{$\normal{}numbers\symbol{}=\normal{}0\symbol{};\ \normal{}init\symbol{}("\normal{}output.tex\symbol{}");$\}$ }
\leftline{95:\ \ \ \ \ \normal{}TexC\symbol{}(\keya{}int\symbol{}\ \normal{}n\symbol{},\ \keya{}const\symbol{}\ \keya{}char\symbol{}\ *\normal{}s\symbol{})$\{$ }
\leftline{96:\ \ \ \ \ \ \ \normal{}lnumber\symbol{}=\normal{}0\symbol{}; }
\leftline{97:\ \ \ \ \ \ \ \normal{}numbers\symbol{}=\normal{}n\symbol{};\ \normal{}init\symbol{}(\normal{}s\symbol{});$\}$ }
\leftline{98:\ \ \ \ \  }
\leftline{99:\ \ \ \ \ \keya{}int\symbol{}\ \normal{}init\symbol{}(\keya{}const\symbol{}\ \keya{}char\symbol{}\ *\normal{}filename\symbol{}); }
\leftline{100:\ \ \ \ \ \keya{}int\symbol{}\ \normal{}write\symbol{}(\keya{}const\symbol{}\ \keya{}int\symbol{}\ \normal{}code\symbol{},\keya{}const\symbol{}\ \keya{}char\symbol{}\ *\normal{}string\symbol{}); }
\leftline{101:\ \ \ \ \ \~{}\normal{}TexC\symbol{}()\ $\{$\ \comment{}/*\ fprintf(file,"\n\\bye\n");\ */\symbol{}\ \normal{}fclose\symbol{}(\normal{}file\symbol{});$\}$ }
\leftline{102:\ \ \  }
\leftline{103:\ \ \ $\}$; }
\leftline{104:\ \ \  }
\leftline{105:\ \ \  }
\leftline{106:\ \ \  }
\leftline{107:\ \ \  }
\leftline{108:\ \ \  }
\leftline{109:\ \ \  }
\leftline{110:\ \ \  }
\leftline{111:\ \ \  }
\keya{}\leftline{112:\ \ \ int\symbol{}\ \normal{}OptionsC\symbol{}::\normal{}isOption\symbol{}(\keya{}char\symbol{}\ *\normal{}s\symbol{}) }
\leftline{113:\ \ \ $\{$ }
\keya{}\leftline{114:\ \ \ int\symbol{}\ \normal{}found\symbol{}=\normal{}0\symbol{}; }
\leftline{115:\ \ \ \  }
\leftline{116:\ \ \ \ \keya{}for\symbol{}\ (\keya{}int\symbol{}\ \normal{}i\symbol{}=\normal{}1\symbol{};\normal{}i\symbol{}<\normal{}number\symbol{};\normal{}i\symbol{}++) }
\leftline{117:\ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}strcmp\symbol{}(\normal{}s\symbol{},\normal{}strings\symbol{}[\normal{}i\symbol{}])==\normal{}0\symbol{})\ $\{$\ \normal{}found\symbol{}\ =\ \normal{}i\symbol{};\ \keya{}break\symbol{};$\}$ }
\leftline{118:\ \ \  }
\leftline{119:\ \ \ \ \keya{}return\symbol{}\ \normal{}found\symbol{}; }
\leftline{120:\ \ \ $\}$ }
\leftline{121:\ \ \  }
\keya{}\leftline{122:\ \ \ int\symbol{}\ \normal{}OptionsC\symbol{}::\normal{}isOption\symbol{}(\keya{}char\symbol{}\ *\normal{}s\symbol{},\keya{}int\symbol{}\ *\normal{}n\symbol{}) }
\leftline{123:\ \ \ $\{$ }
\keya{}\leftline{124:\ \ \ int\symbol{}\ \normal{}found\symbol{}=\normal{}0\symbol{}; }
\leftline{125:\ \ \  }
\keya{}\leftline{126:\ \ \ for\symbol{}\ (\keya{}int\symbol{}\ \normal{}i\symbol{}=\normal{}1\symbol{};\normal{}i\symbol{}<\normal{}number\symbol{};\normal{}i\symbol{}++) }
\leftline{127:\ \ \ \ \ \keya{}if\symbol{}\ (\normal{}strcmp\symbol{}(\normal{}s\symbol{},\normal{}strings\symbol{}[\normal{}i\symbol{}])==\normal{}0\symbol{}) }
\leftline{128:\ \ \ \ \ \ \ $\{$ }
\leftline{129:\ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}i\symbol{}+\normal{}1\symbol{}<\normal{}number\symbol{}) }
\leftline{130:\ \ \ \ \ \ \ \ \ \ $\{$ }
\leftline{131:\ \ \ \ \ \ \ \ \ \ \ \ *\normal{}n\symbol{}=\normal{}atoi\symbol{}(\normal{}strings\symbol{}[\normal{}i\symbol{}+\normal{}1\symbol{}]); }
\leftline{132:\ \ \ \ \ \ \ \ \ \ \ \ \normal{}found\symbol{}\ =\ \normal{}i\symbol{}; }
\leftline{133:\ \ \ \ \ \ \ \ \ \ \ \ \keya{}break\symbol{}; }
\leftline{134:\ \ \ \ \ \ \ \ \ \ $\}$ }
\leftline{135:\ \ \ \ \ \ \ $\}$ }
\leftline{136:\ \ \  }
\keya{}\leftline{137:\ \ \ return\symbol{}\ \normal{}found\symbol{}; }
\leftline{138:\ \ \ $\}$ }
\leftline{139:\ \ \  }
\leftline{140:\ \ \  }
\comment{}\leftline{141:\ \ \ //\ search\ for\ occurence\ of\ non-option }
\keya{}\leftline{142:\ \ \ int\symbol{}\ \normal{}OptionsC\symbol{}::\normal{}getParam\symbol{}(\keya{}char\symbol{}\ *\normal{}s\symbol{},\keya{}int\symbol{}\ \normal{}n\symbol{}) }
\leftline{143:\ \ \ $\{$ }
\keya{}\leftline{144:\ \ \ int\symbol{}\ \normal{}i\symbol{},\normal{}k\symbol{}=\normal{}1\symbol{},\normal{}found\symbol{}=\normal{}0\symbol{}; }
\leftline{145:\ \ \  }
\keya{}\leftline{146:\ \ \ for\symbol{}\ (\normal{}i\symbol{}=\normal{}1\symbol{};\normal{}i\symbol{}<\normal{}number\symbol{};\normal{}i\symbol{}++) }
\leftline{147:\ \ \ \ \ \keya{}if\symbol{}\ (\normal{}strings\symbol{}[\normal{}i\symbol{}][\normal{}0\symbol{}]!='-') }
\leftline{148:\ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}k\symbol{}==\normal{}n\symbol{})\ $\{$\ \normal{}found\symbol{}=\normal{}1\symbol{};\ \keya{}break\symbol{};$\}$ }
\leftline{149:\ \ \ \ \ \ \ \ \ \ \keya{}else\symbol{} }
\leftline{150:\ \ \ \ \ \ \ \ \ \ \ \normal{}k\symbol{}++; }
\leftline{151:\ \ \  }
\keya{}\leftline{152:\ \ \ if\symbol{}\ (\normal{}found\symbol{})\ \normal{}strcpy\symbol{}(\normal{}s\symbol{},\normal{}strings\symbol{}[\normal{}i\symbol{}]); }
\leftline{153:\ \ \  }
\keya{}\leftline{154:\ \ \ return\symbol{}\ \normal{}found\symbol{}; }
\leftline{155:\ \ \ $\}$ }
\leftline{156:\ \ \  }
\leftline{157:\ \ \  }
\leftline{158:\ \ \  }
\keya{}\leftline{159:\ \ \ int\symbol{}\ \normal{}OptionsC\symbol{}::\normal{}getOptionValue\symbol{}(\keya{}char\symbol{}\ *\normal{}s\symbol{},\keya{}int\symbol{}\ *\normal{}result\symbol{}) }
\leftline{160:\ \ \ $\{$ }
\keya{}\leftline{161:\ \ \ int\symbol{}\ \normal{}found\symbol{}=\normal{}0\symbol{}; }
\keya{}\leftline{162:\ \ \ char\symbol{}\ *\normal{}pp\symbol{}; }
\leftline{163:\ \ \  }
\keya{}\leftline{164:\ \ \ for\symbol{}\ (\keya{}int\symbol{}\ \normal{}i\symbol{}=\normal{}1\symbol{};\normal{}i\symbol{}<\normal{}number\symbol{};\normal{}i\symbol{}++) }
\leftline{165:\ \ \ \ \ $\{$ }
\leftline{166:\ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}strstr\symbol{}(\normal{}strings\symbol{}[\normal{}i\symbol{}],\normal{}s\symbol{})) }
\leftline{167:\ \ \ \ \ \ \ $\{$ }
\leftline{168:\ \ \ \ \ \ \ \ \ \normal{}pp\symbol{}=\normal{}strings\symbol{}[\normal{}i\symbol{}]+\normal{}strlen\symbol{}(\normal{}s\symbol{}); }
\leftline{169:\ \ \ \ \ \ \ \ \ *\normal{}result\symbol{}=\normal{}atoi\symbol{}(\normal{}pp\symbol{}); }
\leftline{170:\ \ \ \ \ \ \ \ \ \normal{}found\symbol{}\ =\ \normal{}i\symbol{}; }
\leftline{171:\ \ \ \ \ \ \ \ \ \keya{}break\symbol{}; }
\leftline{172:\ \ \ \ \ \ \ $\}$ }
\leftline{173:\ \ \ \ \ $\}$ }
\keya{}\leftline{174:\ \ \ return\symbol{}\ \normal{}found\symbol{}; }
\leftline{175:\ \ \ $\}$ }
\leftline{176:\ \ \  }
\keya{}\leftline{177:\ \ \ int\symbol{} }
\normal{}\leftline{178:\ \ \ OptionsC\symbol{}::\normal{}getOptionValue\symbol{}(\keya{}char\symbol{}\ *\normal{}s\symbol{},\normal{}Real\symbol{}\ *\normal{}result\symbol{}) }
\leftline{179:\ \ \ $\{$ }
\keya{}\leftline{180:\ \ \ int\symbol{}\ \normal{}found\symbol{}=\normal{}0\symbol{}; }
\keya{}\leftline{181:\ \ \ char\symbol{}\ *\normal{}pp\symbol{}; }
\leftline{182:\ \ \  }
\keya{}\leftline{183:\ \ \ for\symbol{}\ (\keya{}int\symbol{}\ \normal{}i\symbol{}=\normal{}1\symbol{};\normal{}i\symbol{}<\normal{}number\symbol{};\normal{}i\symbol{}++) }
\leftline{184:\ \ \ \ \ $\{$ }
\leftline{185:\ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}strstr\symbol{}(\normal{}strings\symbol{}[\normal{}i\symbol{}],\normal{}s\symbol{})) }
\leftline{186:\ \ \ \ \ \ \ $\{$ }
\leftline{187:\ \ \ \ \ \ \ \ \ \normal{}pp\symbol{}=\normal{}strings\symbol{}[\normal{}i\symbol{}]+\normal{}strlen\symbol{}(\normal{}s\symbol{}); }
\leftline{188:\ \ \ \ \ \ \ \ \ *\normal{}result\symbol{}=\normal{}atof\symbol{}(\normal{}pp\symbol{}); }
\leftline{189:\ \ \ \ \ \ \ \ \ \normal{}found\symbol{}\ =\ \normal{}i\symbol{}; }
\leftline{190:\ \ \ \ \ \ \ \ \ \keya{}break\symbol{}; }
\leftline{191:\ \ \ \ \ \ \ $\}$ }
\leftline{192:\ \ \ \ \ $\}$ }
\keya{}\leftline{193:\ \ \ return\symbol{}\ \normal{}found\symbol{}; }
\leftline{194:\ \ \ $\}$ }
\leftline{195:\ \ \  }
\keya{}\leftline{196:\ \ \ int\symbol{}\ \normal{}OptionsC\symbol{}::\normal{}getOptionValue\symbol{}(\keya{}char\symbol{}\ *\normal{}s\symbol{},\keya{}char\symbol{}\ *\normal{}result\symbol{}) }
\leftline{197:\ \ \ $\{$ }
\keya{}\leftline{198:\ \ \ int\symbol{}\ \normal{}found\symbol{}=\normal{}0\symbol{}; }
\keya{}\leftline{199:\ \ \ char\symbol{}\ *\normal{}pp\symbol{}; }
\leftline{200:\ \ \  }
\keya{}\leftline{201:\ \ \ for\symbol{}\ (\keya{}int\symbol{}\ \normal{}i\symbol{}=\normal{}1\symbol{};\normal{}i\symbol{}<\normal{}number\symbol{};\normal{}i\symbol{}++) }
\leftline{202:\ \ \ \ \ $\{$ }
\leftline{203:\ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}strstr\symbol{}(\normal{}strings\symbol{}[\normal{}i\symbol{}],\normal{}s\symbol{})) }
\leftline{204:\ \ \ \ \ \ \ $\{$ }
\leftline{205:\ \ \ \ \ \ \ \ \ \normal{}pp\symbol{}=\normal{}strings\symbol{}[\normal{}i\symbol{}]+\normal{}strlen\symbol{}(\normal{}s\symbol{}); }
\leftline{206:\ \ \ \ \ \ \ \ \ \normal{}strcpy\symbol{}(\normal{}result\symbol{},\normal{}pp\symbol{}); }
\leftline{207:\ \ \ \ \ \ \ \ \ \normal{}found\symbol{}\ =\ \normal{}i\symbol{}; }
\leftline{208:\ \ \ \ \ \ \ \ \ \keya{}break\symbol{}; }
\leftline{209:\ \ \ \ \ \ \ $\}$ }
\leftline{210:\ \ \ \ \ $\}$ }
\keya{}\leftline{211:\ \ \ return\symbol{}\ \normal{}found\symbol{}; }
\leftline{212:\ \ \ $\}$ }
\leftline{213:\ \ \  }
\leftline{214:\ \ \  }
\keya{}\leftline{215:\ \ \ int\symbol{}\ \normal{}TexC\symbol{}::\normal{}write\symbol{}(\keya{}const\symbol{}\ \keya{}int\symbol{}\ \normal{}code\symbol{},\keya{}const\symbol{}\ \keya{}char\symbol{}\ *\normal{}string\symbol{}) }
\leftline{216:\ \ \ $\{$ }
\keya{}\leftline{217:\ \ \ static\symbol{}\ \keya{}int\symbol{}\ \normal{}line\symbol{}=\normal{}1\symbol{}; }
\keya{}\leftline{218:\ \ \ static\symbol{}\ \keya{}int\symbol{}\ \normal{}i\symbol{}=\normal{}0\symbol{}; }
\keya{}\leftline{219:\ \ \ const\symbol{}\ \keya{}char\symbol{}\ *\normal{}sp\symbol{}; }
\leftline{220:\ \ \  }
\keya{}\leftline{221:\ \ \ switch\symbol{}(\normal{}code\symbol{})\ $\{$ }
\leftline{222:\ \ \ \ \  }
\leftline{223:\ \ \ \ \keya{}case\symbol{}\ \normal{}KEYWORD1\symbol{}\ :\ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\normal{}keya\symbol{}$\{$$\}$");\ \keya{}break\symbol{}; }
\leftline{224:\ \ \ \ \keya{}case\symbol{}\ \normal{}KEYWORD2\symbol{}\ :\ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\normal{}keyb\symbol{}$\{$$\}$");\ \keya{}break\symbol{}; }
\leftline{225:\ \ \ \ \keya{}case\symbol{}\ \normal{}COMMENT\symbol{}\ \ :\ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\normal{}comment\symbol{}$\{$$\}$");\ \keya{}break\symbol{}; }
\leftline{226:\ \ \ \ \keya{}case\symbol{}\ \normal{}SYMBOL\symbol{}\ \ \ :\ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\normal{}symbol\symbol{}$\{$$\}$");\ \keya{}break\symbol{}; }
\leftline{227:\ \ \ \ \keya{}case\symbol{}\ \normal{}NORMAL\symbol{}\ \ \ :\ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\normal{}normal\symbol{}$\{$$\}$");\ \keya{}break\symbol{}; }
\leftline{228:\ \ \ $\}$ }
\leftline{229:\ \ \ \  }
\leftline{230:\ \ \ \ \keya{}for\symbol{}(\normal{}sp\symbol{}=\normal{}string\symbol{};*\normal{}sp\symbol{}!=\normal{}0\symbol{};\normal{}sp\symbol{}++,\normal{}i\symbol{}++) }
\leftline{231:\ \ \ \ \ \ $\{$ }
\leftline{232:\ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}line\symbol{})\ $\{$ }
\leftline{233:\ \ \ \ \ \ \ \ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\normal{}leftline\symbol{}$\{$");\ \normal{}line\symbol{}=\normal{}0\symbol{}; }
\leftline{234:\ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}strstr\symbol{}(\normal{}string\symbol{},\ "\keya{}Algorithm\symbol{}")\ ==\ \normal{}string\symbol{}) }
\leftline{235:\ \ \ \ \ \ \ \ \ \ \ \normal{}lnumber\symbol{}\ =\ \normal{}0\symbol{}; }
\leftline{236:\ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}numbers\symbol{}\ \&\&\ \normal{}lnumber\symbol{}) }
\leftline{237:\ \ \ \ \ \ \ \ \ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\normal{}\%2d\symbol{}:\\\ \\\ \\\ ",\normal{}lnumber\symbol{}); }
\leftline{238:\ \ \ \ \ \ \ \ \ \ \normal{}lnumber\symbol{}++; }
\leftline{239:\ \ \ \ \ \ \ \ $\}$ }
\leftline{240:\ \ \ \ \ \ \ \  }
\leftline{241:\ \ \ \ \ \ \ \ \keya{}switch\symbol{}(*\normal{}sp\symbol{})\ $\{$ }
\leftline{242:\ \ \ \ \ \ \ \ \ \  }
\keyb{}\leftline{243:\ \ \ \#define\symbol{}\ \normal{}TAB_SIZE\symbol{}\ \ \ \ \ \ \ \normal{}8\symbol{} }
\leftline{244:\ \ \ \ \ \ \ \ \keya{}case\symbol{}\ '\\normal{}t\symbol{}'\ :\ \ \ \ \ \ \  }
\leftline{245:\ \ \ \ \ \ \ \ \ \ \comment{}//\ \ \ \ \ \ \ \ \ \ \ fprintf(file,"\\tab");\ break; }
\symbol{}\leftline{246:\ \ \ \ \ \ \ \ \ \ \keya{}int\symbol{}\ \normal{}n\symbol{},\normal{}j\symbol{}; }
\leftline{247:\ \ \ \ \ \ \ \ \ \ \normal{}n\symbol{}=((\normal{}i\symbol{}/\normal{}TAB_SIZE\symbol{})+\normal{}1\symbol{})*\normal{}TAB_SIZE\symbol{}-\normal{}i\symbol{}; }
\leftline{248:\ \ \ \ \ \ \ \ \ \ \keya{}for\symbol{}(\normal{}j\symbol{}=\normal{}0\symbol{};\normal{}j\symbol{}<\normal{}n\symbol{};\normal{}j\symbol{}++)\ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\ "); }
\leftline{249:\ \ \ \ \ \ \ \ \ \ \keya{}break\symbol{}; }
\leftline{250:\ \ \ \ \ \ \ \ \ \  }
\leftline{251:\ \ \ \ \ \ \ \ \ \  }
\leftline{252:\ \ \ \ \ \ \ \ \keya{}case\symbol{}\ '\\normal{}n\symbol{}':\ \ \ \ \ \ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\ $\}$\\normal{}n\symbol{}"); }
\leftline{253:\ \ \ \ \ \ \ \ \ \ \normal{}line\symbol{}=\normal{}1\symbol{};\ \normal{}i\symbol{}=\normal{}0\symbol{}; }
\leftline{254:\ \ \ \ \ \ \ \ \ \ \keya{}break\symbol{}; }
\leftline{255:\ \ \ \ \ \ \ \ \keya{}case\symbol{}\ '\ '\ :\ \ \ \ \ \ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\ "); }
\leftline{256:\ \ \ \ \ \ \ \ \ \keya{}break\symbol{}; }
\leftline{257:\ \ \ \ \ \ \ \ \ \keya{}case\symbol{}\ '\&'\ :\ \ \ \ \ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\&");\ \keya{}break\symbol{}; }
\leftline{258:\ \ \ \ \ \ \ \ \ \keya{}case\symbol{}\ '\normal{}\#\symbol{}'\ :\ \ \ \ \ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\normal{}\#\symbol{}");\ \keya{}break\symbol{}; }
\leftline{259:\ \ \ \ \ \ \ \ \ \ \comment{}//\ \ \ \ \ \ case\ '_'\ :\ \ \ \ fprintf(file,"\\_$\{$$\}$");\ break; }
\symbol{}\leftline{260:\ \ \ \ \ \ \ \ \ \keya{}case\symbol{}\ '\normal{}_\symbol{}'\ :\ \ \ \ \ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\normal{}_\symbol{}");\ \keya{}break\symbol{}; }
\leftline{261:\ \ \ \ \ \ \ \ \ \keya{}case\symbol{}\ '\^{}'\ :\ \ \ \ \ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\^{}$\{$$\}$");\ \keya{}break\symbol{}; }
\leftline{262:\ \ \ \ \ \ \ \ \ \keya{}case\symbol{}\ '\normal{}\%\symbol{}'\ :\ \ \ \ \ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\normal{}\%\%\symbol{}");\ \keya{}break\symbol{}; }
\leftline{263:\ \ \ \ \ \ \ \ \ \keya{}case\symbol{}\ '$\{$'\ :\ \ \ \ \ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\normal{}$\symbol{}\\$\{$\normal{}$\symbol{}");\ \keya{}break\symbol{}; }
\leftline{264:\ \ \ \ \ \ \ \ \ \keya{}case\symbol{}\ '$\}$'\ :\ \ \ \ \ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\normal{}$\symbol{}\\$\}$\normal{}$\symbol{}");\ \keya{}break\symbol{}; }
\leftline{265:\ \ \ \ \ \ \ \ \ \ \comment{}//\ \ case\ '\\'\ :\ \ \ \ \ \ \ fprintf(file,"$\\backslash$");\ break; }
\symbol{}\leftline{266:\ \ \ \ \ \ \ \ \ \ \comment{}//\ \ case\ '$'\ :\ \ \ \ \ \ \ \ fprintf(file,"\\$");\ break; }
\symbol{}\leftline{267:\ \ \ \ \ \ \ \comment{}//\ \ case\ '<'\ :\ \ \ \ \ fprintf(file,"\\<");\ break; }
\symbol{}\leftline{268:\ \ \ \ \ \ \ \comment{}//\ \ case\ '>'\ :\ \ \ \ \ fprintf(file,"\\>");\ break; }
\symbol{}\leftline{269:\ \ \  }
\leftline{270:\ \ \ \ \ \keya{}case\symbol{}\ '\~{}'\ :\ \ \ \normal{}fprintf\symbol{}(\normal{}file\symbol{},"\\\~{}$\{$$\}$");\ \keya{}break\symbol{}; }
\leftline{271:\ \ \ \ \ \ \ \ \  }
\leftline{272:\ \ \ \ \ \ \  }
\leftline{273:\ \ \ \ \ \keya{}default\symbol{}\ \ :\ \ \ \normal{}fputc\symbol{}(*\normal{}sp\symbol{},\normal{}file\symbol{}); }
\leftline{274:\ \ \ \ \ $\}$ }
\leftline{275:\ \ \ $\}$ }
\keya{}\leftline{276:\ \ \ return\symbol{}\ \normal{}1\symbol{}; }
\leftline{277:\ \ \ $\}$ }
\leftline{278:\ \ \  }
\leftline{279:\ \ \  }
\keya{}\leftline{280:\ \ \ int\symbol{}\ \ \ \ \normal{}LexanC\symbol{}::\normal{}isKey\symbol{}(\keya{}char\symbol{}\ *\normal{}s\symbol{}) }
\leftline{281:\ \ \ $\{$ }
\keya{}\leftline{282:\ \ \ int\symbol{}\ \normal{}i\symbol{},\normal{}j\symbol{}; }
\leftline{283:\ \ \  }
\keya{}\leftline{284:\ \ \ for\symbol{}\ (\normal{}i\symbol{}=\normal{}0\symbol{};\normal{}i\symbol{}<\normal{}2\symbol{};\normal{}i\symbol{}++) }
\leftline{285:\ \ \ \ \keya{}for\symbol{}(\normal{}j\symbol{}=\normal{}0\symbol{};\normal{}j\symbol{}<\normal{}nkey\symbol{}[\normal{}i\symbol{}];\normal{}j\symbol{}++) }
\leftline{286:\ \ \ \ \ \keya{}if\symbol{}(\normal{}strcmp\symbol{}(\normal{}s\symbol{},\normal{}key\symbol{}[\normal{}i\symbol{}][\normal{}j\symbol{}])==\normal{}0\symbol{})\ \keya{}return\symbol{}\ \normal{}i\symbol{}+\normal{}1\symbol{}; }
\leftline{287:\ \ \  }
\keya{}\leftline{288:\ \ \ return\symbol{}\ \normal{}0\symbol{}; }
\leftline{289:\ \ \ $\}$ }
\leftline{290:\ \ \  }
\leftline{291:\ \ \  }
\keya{}\leftline{292:\ \ \ int\symbol{}\ \ \ \ \normal{}LexanC\symbol{}::\normal{}readWord\symbol{}(\normal{}FILE\symbol{}\ *\normal{}f\symbol{},\keya{}char\symbol{}\ *\normal{}s\symbol{}) }
\leftline{293:\ \ \ $\{$ }
\keya{}\leftline{294:\ \ \ int\symbol{}\ \ \ \ \normal{}i\symbol{}=\normal{}0\symbol{}; }
\keya{}\leftline{295:\ \ \ int\symbol{}\ \ \ \ \normal{}c\symbol{}; }
\leftline{296:\ \ \  }
\keya{}\leftline{297:\ \ \ do\symbol{} }
\leftline{298:\ \ \ $\{$ }
\leftline{299:\ \ \ \ \ \ \ \ \ \ \normal{}c\symbol{}=\normal{}fgetc\symbol{}(\normal{}f\symbol{}); }
\leftline{300:\ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}c\symbol{}==\normal{}EOF\symbol{})\ \keya{}return\symbol{}\ \normal{}0\symbol{}; }
\leftline{301:\ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (!\normal{}isSeparator\symbol{}(\normal{}c\symbol{}))\ \keya{}break\symbol{}; }
\leftline{302:\ \ \ $\}$\ \keya{}while\symbol{}(\normal{}1\symbol{}); }
\leftline{303:\ \ \  }
\leftline{304:\ \ \  }
\keya{}\leftline{305:\ \ \ do\symbol{} }
\leftline{306:\ \ \ $\{$ }
\leftline{307:\ \ \ \ \ \ \ \ \ \ \normal{}s\symbol{}[\normal{}i\symbol{}++]=\normal{}c\symbol{}; }
\leftline{308:\ \ \ \ \ \ \ \ \ \ \normal{}c\symbol{}=\normal{}fgetc\symbol{}(\normal{}f\symbol{}); }
\leftline{309:\ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}c\symbol{}==\normal{}EOF\symbol{})\ \keya{}break\symbol{}; }
\leftline{310:\ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}isSeparator\symbol{}(\normal{}c\symbol{}))\ \keya{}break\symbol{}; }
\leftline{311:\ \ \ $\}$\ \keya{}while\symbol{}(\normal{}1\symbol{}); }
\leftline{312:\ \ \  }
\normal{}\leftline{313:\ \ \ s\symbol{}[\normal{}i\symbol{}]=\normal{}0\symbol{}; }
\keya{}\leftline{314:\ \ \ return\symbol{}\ \normal{}1\symbol{}; }
\leftline{315:\ \ \ $\}$ }
\leftline{316:\ \ \  }
\leftline{317:\ \ \  }
\keya{}\leftline{318:\ \ \ int\symbol{}\ \ \ \ \normal{}LexanC\symbol{}::\normal{}init\symbol{}(\keya{}const\symbol{}\ \keya{}char\symbol{}\ *\normal{}lexname\symbol{}) }
\leftline{319:\ \ \ $\{$ }
\normal{}\leftline{320:\ \ \ FILE\symbol{}\ *\normal{}f\symbol{}; }
\leftline{321:\ \ \  }
\keya{}\leftline{322:\ \ \ if\symbol{}\ ((\normal{}f\symbol{}=\normal{}fopen\symbol{}(\normal{}lexname\symbol{},"\normal{}rt\symbol{}"))==\normal{}NULL\symbol{})\ \keya{}return\symbol{}\ \normal{}0\symbol{}; }
\leftline{323:\ \ \  }
\leftline{324:\ \ \  }
\keyb{}\leftline{325:\ \ \ \#define\symbol{}\ \ \ \ \ \ \ \ \normal{}NKEY\symbol{}\ \ \normal{}512\symbol{} }
\leftline{326:\ \ \  }
\normal{}\leftline{327:\ \ \ separators\symbol{}\ =\ \keya{}new\symbol{}\ \keya{}char\symbol{}[\normal{}256\symbol{}]; }
\normal{}\leftline{328:\ \ \ key\symbol{}[\normal{}0\symbol{}]\ \ \ =\ \keya{}new\symbol{}\ \keya{}char\symbol{}*[\normal{}NKEY\symbol{}]; }
\normal{}\leftline{329:\ \ \ key\symbol{}[\normal{}1\symbol{}]\ \ \ =\ \keya{}new\symbol{}\ \keya{}char\symbol{}*[\normal{}NKEY\symbol{}]; }
\leftline{330:\ \ \  }
\normal{}\leftline{331:\ \ \ nsep\symbol{}=\normal{}0\symbol{}; }
\normal{}\leftline{332:\ \ \ separators\symbol{}[\normal{}nsep\symbol{}++]='\ '; }
\normal{}\leftline{333:\ \ \ separators\symbol{}[\normal{}nsep\symbol{}++]='\\normal{}n\symbol{}'; }
\normal{}\leftline{334:\ \ \ separators\symbol{}[\normal{}nsep\symbol{}++]='\\normal{}t\symbol{}'; }
\leftline{335:\ \ \  }
\normal{}\leftline{336:\ \ \ fgets\symbol{}(\normal{}separators\symbol{}+\normal{}nsep\symbol{},\normal{}100\symbol{},\normal{}f\symbol{}); }
\normal{}\leftline{337:\ \ \ nsep\symbol{}=\normal{}strlen\symbol{}(\normal{}separators\symbol{}); }
\leftline{338:\ \ \  }
\keya{}\leftline{339:\ \ \ int\symbol{}\ \normal{}i\symbol{}=\normal{}0\symbol{},\normal{}type\symbol{}=\normal{}0\symbol{}; }
\keya{}\leftline{340:\ \ \ char\symbol{}\ \normal{}s\symbol{}[\normal{}64\symbol{}]; }
\leftline{341:\ \ \  }
\keya{}\leftline{342:\ \ \ while\symbol{}(\normal{}readWord\symbol{}(\normal{}f\symbol{},\normal{}s\symbol{})) }
\leftline{343:\ \ \ \ \ \ \ \ \ \ $\{$ }
\leftline{344:\ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}strcmp\symbol{}(\normal{}s\symbol{},"\normal{}KEYWORDS2\symbol{}")==\normal{}0\symbol{})\  }
\leftline{345:\ \ \ \ \ \ \ \ \ \ $\{$ }
\leftline{346:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}printf\symbol{}("\normal{}KEYWORDS2\symbol{}\\normal{}n\symbol{}"); }
\leftline{347:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}nkey\symbol{}[\normal{}type\symbol{}]=\normal{}i\symbol{};\  }
\leftline{348:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}type\symbol{}++;\  }
\leftline{349:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}i\symbol{}=\normal{}0\symbol{};\ \  }
\leftline{350:\ \ \ \ \ \ \ \ \ \ $\}$ }
\leftline{351:\ \ \ \ \ \ \ \ \ \ \keya{}else\symbol{} }
\leftline{352:\ \ \ \ \ \ \ \ \ \ $\{$ }
\leftline{353:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}printf\symbol{}("\normal{}\%s\symbol{}\\normal{}n\symbol{}",\normal{}s\symbol{});\ \ \ \  }
\leftline{354:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}key\symbol{}[\normal{}type\symbol{}][\normal{}i\symbol{}]=\keya{}new\symbol{}\ \keya{}char\symbol{}[\normal{}strlen\symbol{}(\normal{}s\symbol{})+\normal{}1\symbol{}]; }
\leftline{355:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}strcpy\symbol{}(\normal{}key\symbol{}[\normal{}type\symbol{}][\normal{}i\symbol{}],\normal{}s\symbol{}); }
\leftline{356:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}i\symbol{}++; }
\leftline{357:\ \ \ \ \ \ \ \ \ \ $\}$ }
\leftline{358:\ \ \ \ \ \ \ \ \ \ $\}$ }
\leftline{359:\ \ \  }
\normal{}\leftline{360:\ \ \ nkey\symbol{}[\normal{}type\symbol{}]=\normal{}i\symbol{};\  }
\leftline{361:\ \ \  }
\normal{}\leftline{362:\ \ \ fclose\symbol{}(\normal{}f\symbol{}); }
\leftline{363:\ \ \  }
\leftline{364:\ \ \ \  }
\keya{}\leftline{365:\ \ \ return\symbol{}\ \normal{}1\symbol{}; }
\leftline{366:\ \ \ $\}$ }
\leftline{367:\ \ \  }
\keya{}\leftline{368:\ \ \ int\symbol{}\ \ \ \ \normal{}LexanC\symbol{}::\normal{}open\symbol{}(\keya{}const\symbol{}\ \keya{}char\symbol{}\ *\normal{}filename\symbol{}) }
\leftline{369:\ \ \ $\{$ }
\normal{}\leftline{370:\ \ \ file\symbol{}=\normal{}fopen\symbol{}(\normal{}filename\symbol{},"\normal{}rt\symbol{}"); }
\keya{}\leftline{371:\ \ \ return\symbol{}\ \normal{}file\symbol{}!=\normal{}NULL\symbol{}; }
\leftline{372:\ \ \ $\}$ }
\leftline{373:\ \ \  }
\keya{}\leftline{374:\ \ \ int\symbol{}\ \ \ \ \normal{}LexanC\symbol{}::\normal{}read\symbol{}(\keya{}char\symbol{}\ *\normal{}s\symbol{}) }
\leftline{375:\ \ \ $\{$ }
\keya{}\leftline{376:\ \ \ int\symbol{}\ \ \ \ \normal{}i\symbol{}=\normal{}0\symbol{}; }
\keya{}\leftline{377:\ \ \ int\symbol{}\ \ \ \ \normal{}type\symbol{}=\normal{}EOF\symbol{}; }
\keya{}\leftline{378:\ \ \ int\symbol{}\ \ \ \ \normal{}wasSlash\symbol{}=\normal{}0\symbol{}; }
\keya{}\leftline{379:\ \ \ static\symbol{}\ \keya{}int\symbol{}\ \ \ \ \ \normal{}c\symbol{}=-\normal{}2\symbol{}; }
\leftline{380:\ \ \  }
\keya{}\leftline{381:\ \ \ if\symbol{}\ (\normal{}c\symbol{}==-\normal{}2\symbol{})\ \ \normal{}c\symbol{}=\normal{}fgetc\symbol{}(\normal{}file\symbol{}); }
\leftline{382:\ \ \  }
\keya{}\leftline{383:\ \ \ if\symbol{}\ (\normal{}c\symbol{}==\normal{}EOF\symbol{})\ \keya{}return\symbol{}\ \normal{}c\symbol{}; }
\leftline{384:\ \ \  }
\keya{}\leftline{385:\ \ \ do\symbol{}$\{$ }
\keya{}\leftline{386:\ \ \ if\symbol{}\ (\normal{}isSeparator\symbol{}(\normal{}c\symbol{}))\ $\{$ }
\leftline{387:\ \ \ \ \ \ \ \ \ \ \normal{}type\symbol{}=\normal{}SYMBOL\symbol{}; }
\leftline{388:\ \ \ \ \ \ \ \ \ \ \normal{}s\symbol{}[\normal{}i\symbol{}++]=\normal{}c\symbol{}; }
\leftline{389:\ \ \  }
\leftline{390:\ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}(\normal{}wasSlash\symbol{})\ $\{$ }
\leftline{391:\ \ \ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}(\normal{}c\symbol{}==\normal{}comment_1b\symbol{})\ \ \comment{}//\ line\ comment }
\symbol{}\leftline{392:\ \ \ \ \ \ \ \ \ \ \ \ \ \ $\{$\  }
\leftline{393:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}i\symbol{}>\normal{}2\symbol{})\ $\{$\ \normal{}c\symbol{}=\normal{}s\symbol{}[\normal{}i\symbol{}-\normal{}2\symbol{}];\ \normal{}fseek\symbol{}(\normal{}file\symbol{},-\normal{}1\symbol{},\normal{}SEEK_CUR\symbol{});\ \normal{}s\symbol{}[\normal{}i\symbol{}-\normal{}2\symbol{}]=\normal{}0\symbol{};\  }
\leftline{394:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}return\symbol{}\ \normal{}type\symbol{};\ $\}$ }
\leftline{395:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}fgets\symbol{}(\normal{}s\symbol{}+\normal{}i\symbol{},\normal{}S_LEN\symbol{},\normal{}file\symbol{});\  }
\leftline{396:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}c\symbol{}=\normal{}fgetc\symbol{}(\normal{}file\symbol{}); }
\leftline{397:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}return\symbol{}\ \normal{}COMMENT\symbol{}; }
\leftline{398:\ \ \ \ \ \ \ \ \ \ \ \ \ \ $\}$ }
\leftline{399:\ \ \ \ \ \ \ \ \ \ \ \ \keya{}else\symbol{} }
\leftline{400:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}(\normal{}c\symbol{}==\normal{}comment_2b\symbol{})\ \ \comment{}//\ line\ comment }
\symbol{}\leftline{401:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\{$\  }
\leftline{402:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}i\symbol{}>\normal{}2\symbol{})\ $\{$\ \normal{}c\symbol{}=\normal{}s\symbol{}[\normal{}i\symbol{}-\normal{}2\symbol{}];\ \normal{}fseek\symbol{}(\normal{}file\symbol{},-\normal{}1\symbol{},\normal{}SEEK_CUR\symbol{});\ \normal{}s\symbol{}[\normal{}i\symbol{}-\normal{}2\symbol{}]=\normal{}0\symbol{};\  }
\leftline{403:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}return\symbol{}\ \normal{}type\symbol{};\ $\}$ }
\leftline{404:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}c\symbol{}=\normal{}fgetc\symbol{}(\normal{}file\symbol{}); }
\leftline{405:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}(\normal{}c\symbol{}!=\normal{}EOF\symbol{}) }
\leftline{406:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\{$ }
\leftline{407:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}s\symbol{}[\normal{}i\symbol{}++]=\normal{}c\symbol{}; }
\leftline{408:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}int\symbol{}\ \normal{}count\symbol{}=\normal{}1\symbol{}; }
\leftline{409:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}do\symbol{}$\{$ }
\leftline{410:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}c\symbol{}=\normal{}fgetc\symbol{}(\normal{}file\symbol{}); }
\leftline{411:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}(\normal{}c\symbol{}==\normal{}EOF\symbol{})\ \keya{}break\symbol{}; }
\leftline{412:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}s\symbol{}[\normal{}i\symbol{}++]=\normal{}c\symbol{}; }
\leftline{413:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}s\symbol{}[\normal{}i\symbol{}-\normal{}2\symbol{}]==\normal{}comment_1e\symbol{}\ \&\&\ \normal{}s\symbol{}[\normal{}i\symbol{}-\normal{}1\symbol{}]==\normal{}comment_2e\symbol{})\ \normal{}count\symbol{}--; }
\leftline{414:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}s\symbol{}[\normal{}i\symbol{}-\normal{}2\symbol{}]==\normal{}comment_1b\symbol{}\ \&\&\normal{}s\symbol{}[\normal{}i\symbol{}-\normal{}1\symbol{}]==\normal{}comment_2b\symbol{})\ \normal{}count\symbol{}++; }
\leftline{415:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\}$\ \keya{}while\symbol{}(\normal{}count\symbol{}!=\normal{}0\symbol{}); }
\leftline{416:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\}$ }
\leftline{417:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}s\symbol{}[\normal{}i\symbol{}]=\normal{}0\symbol{}; }
\leftline{418:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}c\symbol{}=\normal{}fgetc\symbol{}(\normal{}file\symbol{}); }
\leftline{419:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \keya{}return\symbol{}\ \normal{}COMMENT\symbol{}; }
\leftline{420:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\}$ }
\leftline{421:\ \ \ \ \ \ \ \ \ \ \ \ \ \ $\}$ }
\leftline{422:\ \ \ \ \ \ \ \ \ \ \ \ \keya{}else\symbol{} }
\leftline{423:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \normal{}wasSlash\symbol{}=(\normal{}c\symbol{}==\normal{}comment_1b\symbol{});\  }
\leftline{424:\ \ \ $\}$\ \keya{}else\symbol{} }
\leftline{425:\ \ \ \ \ \keya{}if\symbol{}\ (\normal{}c\symbol{}=='')\ $\{$ }
\leftline{426:\ \ \ \ \ \ \ if\ (i>=1)\ $\{$ }
\leftline{427:\ \ \ \ \ \ \ \ \ s[i]=0; }
\leftline{428:\ \ \ \ \ \ \ \ \ return\ type; }
\leftline{429:\ \ \ \ \ \ \ $\}$ }
\leftline{430:\ \ \ \ \ \ \ c=fgetc(file); }
\leftline{431:\ \ \ \ \ \ \ while(c!='\symbol{}')\ $\{$ }
\leftline{432:\ \ \ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}c\symbol{}==\normal{}EOF\symbol{})\ \keya{}break\symbol{}; }
\leftline{433:\ \ \ \ \ \ \ \ \ \normal{}s\symbol{}[\normal{}i\symbol{}++]=\normal{}c\symbol{}; }
\leftline{434:\ \ \ \ \ \ \ \ \ \normal{}c\symbol{}=\normal{}fgetc\symbol{}(\normal{}file\symbol{}); }
\leftline{435:\ \ \ \ \ \ \ $\}$ }
\leftline{436:\ \ \ \ \ \ \ \normal{}s\symbol{}[\normal{}i\symbol{}]=\normal{}0\symbol{}; }
\leftline{437:\ \ \ \ \ \ \ \normal{}c\symbol{}=\normal{}fgetc\symbol{}(\normal{}file\symbol{}); }
\leftline{438:\ \ \ \ \ \ \ \keya{}return\symbol{}\ \normal{}WORD\symbol{}; }
\leftline{439:\ \ \ \ \ $\}$\ \keya{}else\symbol{}\ $\{$ }
\leftline{440:\ \ \ \ \ \ \ \keya{}if\symbol{}\ (\normal{}type\symbol{}==\normal{}EOF\symbol{})\ \normal{}type\symbol{}=\normal{}WORD\symbol{}; }
\leftline{441:\ \ \ \ \ \ \ \keya{}break\symbol{}; }
\leftline{442:\ \ \ \ \ $\}$ }
\leftline{443:\ \ \ $\}$\ \keya{}while\symbol{}((\normal{}c\symbol{}=\normal{}fgetc\symbol{}(\normal{}file\symbol{}))!=\normal{}EOF\symbol{}); }
\leftline{444:\ \ \ \  }
\keya{}\leftline{445:\ \ \ if\symbol{}\ (\normal{}c\symbol{}!=\normal{}EOF\symbol{}) }
\keya{}\leftline{446:\ \ \ if\symbol{}\ (\normal{}type\symbol{}==\normal{}WORD\symbol{}) }
\leftline{447:\ \ \ $\{$ }
\keya{}\leftline{448:\ \ \ do\symbol{} }
\leftline{449:\ \ \ $\{$ }
\normal{}\leftline{450:\ \ \ s\symbol{}[\normal{}i\symbol{}++]=\normal{}c\symbol{}; }
\normal{}\leftline{451:\ \ \ c\symbol{}=\normal{}fgetc\symbol{}(\normal{}file\symbol{}); }
\keya{}\leftline{452:\ \ \ if\symbol{}\ (\normal{}c\symbol{}==\normal{}EOF\symbol{})\ \keya{}break\symbol{}; }
\leftline{453:\ \ \ $\}$\ \keya{}while\symbol{}(!\normal{}isSeparator\symbol{}(\normal{}c\symbol{})); }
\leftline{454:\ \ \  }
\normal{}\leftline{455:\ \ \ s\symbol{}[\normal{}i\symbol{}]=\normal{}0\symbol{}; }
\keya{}\leftline{456:\ \ \ int\symbol{}\ \normal{}k\symbol{}=\normal{}isKey\symbol{}(\normal{}s\symbol{}); }
\keya{}\leftline{457:\ \ \ if\symbol{}\ (\normal{}k\symbol{}==\normal{}0\symbol{})\ \keya{}return\symbol{}\ \normal{}NORMAL\symbol{}; }
\keya{}\leftline{458:\ \ \ return\symbol{}\ \normal{}k\symbol{}; }
\leftline{459:\ \ \ $\}$ }
\leftline{460:\ \ \  }
\normal{}\leftline{461:\ \ \ s\symbol{}[\normal{}i\symbol{}]=\normal{}0\symbol{}; }
\keya{}\leftline{462:\ \ \ return\symbol{}\ \normal{}type\symbol{}; }
\leftline{463:\ \ \  }
\leftline{464:\ \ \ $\}$ }
\leftline{465:\ \ \  }
\keya{}\leftline{466:\ \ \ int\symbol{}\ \normal{}TexC\symbol{}::\normal{}init\symbol{}(\keya{}const\symbol{}\ \keya{}char\symbol{}\ *\normal{}filename\symbol{}) }
\leftline{467:\ \ \ $\{$ }
\normal{}\leftline{468:\ \ \ file\symbol{}=\normal{}fopen\symbol{}(\normal{}filename\symbol{},"\normal{}wt\symbol{}"); }
\normal{}\leftline{469:\ \ \ fprintf\symbol{}(\normal{}file\symbol{},"\\\normal{}input\symbol{}\ \normal{}default.mac\symbol{}\\normal{}n\symbol{}"); }
\keya{}\leftline{470:\ \ \ return\symbol{}\ \normal{}file\symbol{}!=\normal{}NULL\symbol{}; }
\leftline{471:\ \ \ $\}$ }
\leftline{472:\ \ \  }
\leftline{473:\ \ \  }
\keya{}\leftline{474:\ \ \ void\symbol{}\ \normal{}Help\symbol{}() }
\leftline{475:\ \ \ $\{$ }
\leftline{476:\ \ \ \ \ \normal{}printf\symbol{}("\normal{}Syntax\symbol{}\ :\ \normal{}c2tex\symbol{}\ \normal{}in_file\symbol{}\ [\normal{}out_file\symbol{}]\ [-\keya{}pascal\symbol{}]\ [-\normal{}numbers\symbol{}]\\normal{}n\symbol{}\\normal{}n\symbol{}"); }
\leftline{477:\ \ \ \ \ \normal{}printf\symbol{}("\normal{}Default\symbol{}\ \normal{}out_file\symbol{}\ \normal{}is\symbol{}\ \normal{}output.tex.\symbol{}\\normal{}n\symbol{}"); }
\leftline{478:\ \ \ \ \ \normal{}printf\symbol{}("-\keya{}pascal\symbol{}\ \ \ \ \ \normal{}use\symbol{}\ \keya{}pascal\symbol{}\ \normal{}comments\symbol{}\ (*\ *)\normal{}.\symbol{}\\normal{}n\symbol{}"); }
\leftline{479:\ \ \ \ \ \normal{}printf\symbol{}("-\normal{}numbers\symbol{}\ \ \ \ \normal{}print\symbol{}\ \normal{}line\symbol{}\ \normal{}numbers.\symbol{}\\normal{}n\symbol{}"); }
\leftline{480:\ \ \ \ \ \normal{}exit\symbol{}(\normal{}1\symbol{}); }
\leftline{481:\ \ \ $\}$ }
\leftline{482:\ \ \  }
\keya{}\leftline{483:\ \ \ int\symbol{}\ \normal{}main\symbol{}(\keya{}int\symbol{}\ \normal{}argc\symbol{},\ \keya{}char\symbol{}\ **\normal{}argv\symbol{}) }
\leftline{484:\ \ \ $\{$ }
\keya{}\leftline{485:\ \ \ char\symbol{}\ \ \ \normal{}s\symbol{}[\normal{}16384\symbol{}];\ \comment{}//\ docasny\ buffer }
\symbol{}\leftline{486:\ \ \  }
\normal{}\leftline{487:\ \ \ OptionsC\symbol{}\ \normal{}options\symbol{}(\normal{}argc\symbol{},\normal{}argv\symbol{}); }
\leftline{488:\ \ \ \  }
\leftline{489:\ \ \ \ \keya{}if\symbol{}\ (\normal{}argc\symbol{}<\normal{}2\symbol{})\ \normal{}Help\symbol{}(); }
\leftline{490:\ \ \ \ \keya{}if\symbol{}\ (\normal{}argc\symbol{}>=\normal{}3\symbol{}\ \&\&\ (*\normal{}argv\symbol{}[\normal{}2\symbol{}]!='-')\ ) }
\leftline{491:\ \ \ \ \ \ \normal{}strcpy\symbol{}(\normal{}s\symbol{},\normal{}argv\symbol{}[\normal{}2\symbol{}]); }
\leftline{492:\ \ \ \ \keya{}else\symbol{} }
\leftline{493:\ \ \ \ \ \ \normal{}strcpy\symbol{}(\normal{}s\symbol{},"\normal{}output.tex\symbol{}"); }
\leftline{494:\ \ \ \  }
\leftline{495:\ \ \ \ \keya{}if\symbol{}\ (\normal{}options.isOption\symbol{}("-\keya{}pascal\symbol{}"))\ $\{$ }
\leftline{496:\ \ \ \ \ \ \ \keya{}pascal\symbol{}=\normal{}1\symbol{}; }
\leftline{497:\ \ \ \ \ \ \ \normal{}comment_1b\symbol{}='('; }
\leftline{498:\ \ \ \ \ \ \ \normal{}comment_2b\symbol{}='*'; }
\leftline{499:\ \ \ \ \ \ \ \normal{}comment_1e\symbol{}='*'; }
\leftline{500:\ \ \ \ \ \ \ \normal{}comment_2e\symbol{}=')'; }
\leftline{501:\ \ \ \ $\}$ }
\leftline{502:\ \ \  }
\leftline{503:\ \ \ \ \keya{}int\symbol{}\ \normal{}numbers\symbol{}; }
\leftline{504:\ \ \ \  }
\leftline{505:\ \ \ \ \normal{}numbers\symbol{}\ =\ \normal{}options.isOption\symbol{}("-\normal{}numbers\symbol{}"); }
\leftline{506:\ \ \ \  }
\leftline{507:\ \ \ \  }
\leftline{508:\ \ \ \ \ \normal{}LexanC\symbol{}\ \ \ \ \ \ \ \normal{}lexan\symbol{}; }
\leftline{509:\ \ \ \ \ \normal{}TexC\symbol{}\ \normal{}tex\symbol{}(\normal{}numbers\symbol{},\ \normal{}s\symbol{}); }
\leftline{510:\ \ \ \ \ \normal{}lexan.open\symbol{}(\normal{}argv\symbol{}[\normal{}1\symbol{}]); }
\leftline{511:\ \ \  }
\leftline{512:\ \ \ \ \ \keya{}int\symbol{}\ \ \normal{}t\symbol{}; }
\leftline{513:\ \ \ \ \ \normal{}cout\symbol{}<<\normal{}tex.numbers\symbol{}; }
\leftline{514:\ \ \  }
\leftline{515:\ \ \ \ \  }
\leftline{516:\ \ \ \ \ \keya{}while\symbol{}((\normal{}t\symbol{}=\normal{}lexan.read\symbol{}(\normal{}s\symbol{}))!=\normal{}EOF\symbol{}) }
\leftline{517:\ \ \ \ \ \ \ $\{$ }
\leftline{518:\ \ \ \ \ \ \ \ \ \comment{}//printf("Type\ :\ \%d\ -\ \%s\n",t,s); }
\symbol{}\leftline{519:\ \ \ \ \ \ \ \ \ \normal{}printf\symbol{}("\normal{}\%s\symbol{}",\normal{}s\symbol{}); }
\leftline{520:\ \ \ \ \ \ \ \ \ \normal{}tex.write\symbol{}(\normal{}t\symbol{},\normal{}s\symbol{}); }
\leftline{521:\ \ \ \ \ \ \ \ \ \comment{}//getchar(); }
\symbol{}\leftline{522:\ \ \ \ \ \ \ $\}$ }
\leftline{523:\ \ \  }
\keya{}\leftline{524:\ \ \ return\symbol{}\ \normal{}0\symbol{}; }
\leftline{525:\ \ \ $\}$ }
\leftline{526:\ \ \  }
\leftline{527:\ \ \  }
\leftline{528:\ \ \  }
\leftline{529:\ \ \  }
\leftline{530:\ \ \  }
