src/Parser.h

changeset 91
427eb377d53e
parent 88
5def6ff8b466
child 92
3a00d396bce2
equal deleted inserted replaced
90:90ab2f2b3dc0 91:427eb377d53e
169 public: 169 public:
170 // ==================================================================== 170 // ====================================================================
171 // METHODS 171 // METHODS
172 BotscriptParser(); 172 BotscriptParser();
173 ~BotscriptParser(); 173 ~BotscriptParser();
174 ConstantInfo* FindConstant (const String& tok);
174 void ParseBotscript (String fileName); 175 void ParseBotscript (String fileName);
175 DataBuffer* ParseCommand (CommandInfo* comm); 176 DataBuffer* ParseCommand (CommandInfo* comm);
176 DataBuffer* ParseExpression (EType reqtype);
177 DataBuffer* ParseAssignment (ScriptVariable* var); 177 DataBuffer* ParseAssignment (ScriptVariable* var);
178 int ParseOperator (bool peek = false); 178 int ParseOperator (bool peek = false);
179 DataBuffer* ParseExprValue (EType reqtype);
180 String ParseFloat(); 179 String ParseFloat();
181 void PushScope(); 180 void PushScope();
182 DataBuffer* ParseStatement(); 181 DataBuffer* ParseStatement();
183 void AddSwitchCase (DataBuffer* b); 182 void AddSwitchCase (DataBuffer* b);
184 void CheckToplevel(); 183 void CheckToplevel();
234 // Scope data 233 // Scope data
235 // TODO: make a List 234 // TODO: make a List
236 ScopeInfo mScopeStack[MAX_SCOPE]; 235 ScopeInfo mScopeStack[MAX_SCOPE];
237 236
238 DataBuffer* buffer(); 237 DataBuffer* buffer();
239 ConstantInfo* FindConstant (const String& tok);
240 void ParseStateBlock(); 238 void ParseStateBlock();
241 void ParseEventBlock(); 239 void ParseEventBlock();
242 void ParseMainloop(); 240 void ParseMainloop();
243 void ParseOnEnterExit(); 241 void ParseOnEnterExit();
244 void ParseVariableDeclaration(); 242 void ParseVariableDeclaration();
258 void ParseLabel(); 256 void ParseLabel();
259 void ParseEventdef(); 257 void ParseEventdef();
260 void ParseFuncdef(); 258 void ParseFuncdef();
261 void writeMemberBuffers(); 259 void writeMemberBuffers();
262 void WriteStringTable(); 260 void WriteStringTable();
261 void ParseExpression (EType reqtype);
263 }; 262 };
264 263
265 #endif // BOTC_PARSER_H 264 #endif // BOTC_PARSER_H

mercurial