std::string source;
std::string::const_iterator iter;
std::deque<std::string> next_tokens;
- ProgramSyntax::Module main_module;
- ProgramSyntax::Module *cur_module;
+ ProgramSyntax::Module *module;
ProgramSyntax::Stage *cur_stage;
std::set<std::string> 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();