X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogramparser.h;h=4c2d7b7ea5bc1049ddacede49a9f6a1cb280d3e7;hb=a29cc14162e911b36d18d1d1896216697c7dc0c1;hp=40fdcd89264e60230e019df3f7522303f2028467;hpb=961715848c111907b5f443c5b545a429b40583e6;p=libs%2Fgl.git diff --git a/source/programparser.h b/source/programparser.h index 40fdcd89..4c2d7b7e 100644 --- a/source/programparser.h +++ b/source/programparser.h @@ -39,19 +39,21 @@ private: std::string source; std::string::const_iterator iter; std::deque next_tokens; - ProgramSyntax::Module main_module; - ProgramSyntax::Module *cur_module; - ProgramSyntax::Context *cur_context; + ProgramSyntax::Module *module; + ProgramSyntax::Stage *cur_stage; std::set declared_types; static Operator operators[]; public: + ProgramParser(); + ~ProgramParser(); + ProgramSyntax::Module &parse(const std::string &); ProgramSyntax::Module &parse(IO::Base &); private: - void parse_source(ProgramSyntax::Module &); + void parse_source(); const std::string &peek_token(unsigned = 0); std::string parse_token();