X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogramparser.h;h=4c2d7b7ea5bc1049ddacede49a9f6a1cb280d3e7;hb=a29cc14162e911b36d18d1d1896216697c7dc0c1;hp=390f19cbdf921a24ca6c2a6f00adcb76d7c9cce9;hpb=a36992487d018d8801ead6980b362b00a2f5f5c5;p=libs%2Fgl.git diff --git a/source/programparser.h b/source/programparser.h index 390f19cb..4c2d7b7e 100644 --- a/source/programparser.h +++ b/source/programparser.h @@ -39,18 +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(); @@ -85,6 +88,7 @@ private: ProgramSyntax::InterfaceBlock *parse_interface_block(); ProgramSyntax::Conditional *parse_conditional(); ProgramSyntax::Iteration *parse_iteration(); + ProgramSyntax::Passthrough *parse_passthrough(); ProgramSyntax::Return *parse_return(); };