1 #ifndef STATEMENT_HPP
2 #define STATEMENT_HPP
3 #include <sngcm/cmparser/ParserApi.hpp>
4 #include <sngcm/ast/Statement.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 StatementParser
15 {
16 static soulng::parser::Match Statement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
17 static soulng::parser::Match Label(CmajorLexer& lexer, boost::uuids::uuid* moduleId);
18 static soulng::parser::Match LabeledStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
19 static soulng::parser::Match ControlStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
20 static soulng::parser::Match CompoundStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
21 static soulng::parser::Match ReturnStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
22 static soulng::parser::Match IfStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
23 static soulng::parser::Match WhileStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
24 static soulng::parser::Match DoStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
25 static soulng::parser::Match ForStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
26 static soulng::parser::Match ForInitStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
27 static soulng::parser::Match ForLoopStatementExpr(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
28 static soulng::parser::Match RangeForStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
29 static soulng::parser::Match BreakStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
30 static soulng::parser::Match ContinueStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
31 static soulng::parser::Match GotoStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
32 static soulng::parser::Match SwitchStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
33 static soulng::parser::Match CaseStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
34 static soulng::parser::Match DefaultStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
35 static soulng::parser::Match GotoCaseStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
36 static soulng::parser::Match GotoDefaultStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
37 static soulng::parser::Match AssignmentStatementExpr(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
38 static soulng::parser::Match AssignmentStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
39 static soulng::parser::Match ConstructionStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
40 static soulng::parser::Match DeleteStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
41 static soulng::parser::Match DestroyStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
42 static soulng::parser::Match ExpressionStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
43 static soulng::parser::Match EmptyStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
44 static soulng::parser::Match ThrowStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
45 static soulng::parser::Match TryStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
46 static soulng::parser::Match Catch(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
47 static soulng::parser::Match AssertStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
48 static soulng::parser::Match ConditionalCompilationStatement(CmajorLexer& lexer, boost::uuids::uuid* moduleId, ParsingContext* ctx);
49 static soulng::parser::Match ConditionalCompilationExpression(CmajorLexer& lexer, boost::uuids::uuid* moduleId);
50 static soulng::parser::Match ConditionalCompilationDisjunction(CmajorLexer& lexer, boost::uuids::uuid* moduleId);
51 static soulng::parser::Match ConditionalCompilationConjunction(CmajorLexer& lexer, boost::uuids::uuid* moduleId);
52 static soulng::parser::Match ConditionalCompilationPrefix(CmajorLexer& lexer, boost::uuids::uuid* moduleId);
53 static soulng::parser::Match ConditionalCompilationPrimary(CmajorLexer& lexer, boost::uuids::uuid* moduleId);
54 };
55
56 #endif // STATEMENT_HPP