]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programparser.h
Check the flat qualifier from the correct member
[libs/gl.git] / source / programparser.h
diff --git a/source/programparser.h b/source/programparser.h
deleted file mode 100644 (file)
index 4c2d7b7..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifndef MSP_GL_PROGRAMPARSER_H_
-#define MSP_GL_PROGRAMPARSER_H_
-
-#include <deque>
-#include <map>
-#include <set>
-#include <string>
-#include <msp/io/base.h>
-#include "programsyntax.h"
-
-namespace Msp {
-namespace GL {
-
-class ProgramParser
-{
-private:
-       enum OperatorType
-       {
-               NO_OPERATOR,
-               BINARY,
-               PREFIX,
-               POSTFIX
-       };
-
-       enum Associativity
-       {
-               LEFT_TO_RIGHT,
-               RIGHT_TO_LEFT
-       };
-
-       struct Operator
-       {
-               const char token[4];
-               unsigned precedence;
-               OperatorType type;
-               Associativity assoc;
-       };
-
-       std::string source;
-       std::string::const_iterator iter;
-       std::deque<std::string> next_tokens;
-       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();
-
-       const std::string &peek_token(unsigned = 0);
-       std::string parse_token();
-       std::string parse_token_();
-       std::string parse_identifier();
-       std::string parse_number();
-       std::string parse_other();
-       bool skip_comment_and_whitespace();
-       void expect(const std::string &);
-       std::string expect_type();
-       std::string expect_identifier();
-       bool check(const std::string &);
-
-       static bool is_interface_qualifier(const std::string &);
-       static bool is_sampling_qualifier(const std::string &);
-       static bool is_qualifier(const std::string &);
-       static bool is_builtin_type(const std::string &);
-       bool is_type(const std::string &);
-       bool is_identifier(const std::string &);
-
-       ProgramSyntax::Node *parse_global_declaration();
-       ProgramSyntax::Node *parse_statement();
-       ProgramSyntax::Layout *parse_layout();
-       void parse_block(ProgramSyntax::Block &, bool);
-       ProgramSyntax::Expression *parse_expression(unsigned = 0);
-       ProgramSyntax::BinaryExpression *parse_binary(ProgramSyntax::Expression *, const Operator *);
-       ProgramSyntax::FunctionCall *parse_function_call(ProgramSyntax::VariableReference *);
-       ProgramSyntax::StructDeclaration *parse_struct_declaration();
-       ProgramSyntax::VariableDeclaration *parse_variable_declaration();
-       ProgramSyntax::FunctionDeclaration *parse_function_declaration();
-       void parse_function_parameter_list(ProgramSyntax::FunctionDeclaration &);
-       ProgramSyntax::InterfaceBlock *parse_interface_block();
-       ProgramSyntax::Conditional *parse_conditional();
-       ProgramSyntax::Iteration *parse_iteration();
-       ProgramSyntax::Passthrough *parse_passthrough();
-       ProgramSyntax::Return *parse_return();
-};
-
-} // namespace GL
-} // namespace Msp
-
-#endif