X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogramparser.h;h=4c2d7b7ea5bc1049ddacede49a9f6a1cb280d3e7;hb=a29cc14162e911b36d18d1d1896216697c7dc0c1;hp=1ca1a44c564d7aa8e6e65ed5f37e465b6a3f2340;hpb=fd103d76d7546f7e22aefc18c090a844fc67409f;p=libs%2Fgl.git diff --git a/source/programparser.h b/source/programparser.h index 1ca1a44c..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::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();