1 #ifndef EXPRESSION_HPP
2 #define EXPRESSION_HPP
3 #include <sngcm/cmparser/ParserApi.hpp>
4 #include <sngcm/ast/Expression.hpp>
5 #include <sngcm/cmparser/ParsingContext.hpp>
6 #include <soulng/lexer/Token.hpp>
7 #include <soulng/parser/Match.hpp>
8 #include <soulng/parser/Value.hpp>
9
10
11
12 class CmajorLexer;
13
14 struct ExpressionParser
15 {
16 static soulng::parser::Match Expression(CmajorLexer& lexer, ParsingContext* ctx);
17 static soulng::parser::Match Equivalence(CmajorLexer& lexer, ParsingContext* ctx);
18 static soulng::parser::Match Implication(CmajorLexer& lexer, ParsingContext* ctx);
19 static soulng::parser::Match Disjunction(CmajorLexer& lexer, ParsingContext* ctx);
20 static soulng::parser::Match Conjunction(CmajorLexer& lexer, ParsingContext* ctx);
21 static soulng::parser::Match BitOr(CmajorLexer& lexer, ParsingContext* ctx);
22 static soulng::parser::Match BitXor(CmajorLexer& lexer, ParsingContext* ctx);
23 static soulng::parser::Match BitAnd(CmajorLexer& lexer, ParsingContext* ctx);
24 static soulng::parser::Match Equality(CmajorLexer& lexer, ParsingContext* ctx);
25 static soulng::parser::Match Relational(CmajorLexer& lexer, ParsingContext* ctx);
26 static soulng::parser::Match Shift(CmajorLexer& lexer, ParsingContext* ctx);
27 static soulng::parser::Match Additive(CmajorLexer& lexer, ParsingContext* ctx);
28 static soulng::parser::Match Multiplicative(CmajorLexer& lexer, ParsingContext* ctx);
29 static soulng::parser::Match Prefix(CmajorLexer& lexer, ParsingContext* ctx);
30 static soulng::parser::Match Postfix(CmajorLexer& lexer, ParsingContext* ctx);
31 static soulng::parser::Match Primary(CmajorLexer& lexer, ParsingContext* ctx);
32 static soulng::parser::Match SizeOfExpr(CmajorLexer& lexer, ParsingContext* ctx);
33 static soulng::parser::Match TypeNameExpr(CmajorLexer& lexer, ParsingContext* ctx);
34 static soulng::parser::Match TypeIdExpr(CmajorLexer& lexer, ParsingContext* ctx);
35 static soulng::parser::Match CastExpr(CmajorLexer& lexer, ParsingContext* ctx);
36 static soulng::parser::Match ConstructExpr(CmajorLexer& lexer, ParsingContext* ctx);
37 static soulng::parser::Match NewExpr(CmajorLexer& lexer, ParsingContext* ctx);
38 static soulng::parser::Match ArgumentList(CmajorLexer& lexer, ParsingContext* ctx, sngcm::ast::Node* node);
39 static soulng::parser::Match ExpressionList(CmajorLexer& lexer, ParsingContext* ctx, sngcm::ast::Node* node);
40 static soulng::parser::Match InvokeExpr(CmajorLexer& lexer, ParsingContext* ctx);
41 };
42
43 #endif // EXPRESSION_HPP