1 #ifndef CONCEPT_HPP
2 #define CONCEPT_HPP
3 #include <sngcm/cmparser/ParserApi.hpp>
4 #include <sngcm/ast/Concept.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 ConceptParser
15 {
16 static soulng::parser::Match Concept(CmajorLexer& lexer, ParsingContext* ctx);
17 static soulng::parser::Match Refinement(CmajorLexer& lexer);
18 static soulng::parser::Match ConceptBody(CmajorLexer& lexer, ParsingContext* ctx, sngcm::ast::ConceptNode* conceptNode);
19 static soulng::parser::Match ConceptBodyConstraint(CmajorLexer& lexer, ParsingContext* ctx, sngcm::ast::ConceptNode* conceptNode);
20 static soulng::parser::Match TypeNameConstraint(CmajorLexer& lexer, ParsingContext* ctx);
21 static soulng::parser::Match SignatureConstraint(CmajorLexer& lexer, ParsingContext* ctx, sngcm::ast::IdentifierNode* firstTypeParameter);
22 static soulng::parser::Match ConstructorConstraint(CmajorLexer& lexer, ParsingContext* ctx, sngcm::ast::IdentifierNode* firstTypeParameter);
23 static soulng::parser::Match DestructorConstraint(CmajorLexer& lexer, ParsingContext* ctx, sngcm::ast::IdentifierNode* firstTypeParameter);
24 static soulng::parser::Match MemberFunctionConstraint(CmajorLexer& lexer, ParsingContext* ctx);
25 static soulng::parser::Match FunctionConstraint(CmajorLexer& lexer, ParsingContext* ctx);
26 static soulng::parser::Match EmbeddedConstraint(CmajorLexer& lexer, ParsingContext* ctx);
27 static soulng::parser::Match WhereConstraint(CmajorLexer& lexer, ParsingContext* ctx);
28 static soulng::parser::Match ConstraintExpr(CmajorLexer& lexer, ParsingContext* ctx);
29 static soulng::parser::Match DisjunctiveConstraintExpr(CmajorLexer& lexer, ParsingContext* ctx);
30 static soulng::parser::Match ConjunctiveConstraintExpr(CmajorLexer& lexer, ParsingContext* ctx);
31 static soulng::parser::Match PrimaryConstraintExpr(CmajorLexer& lexer, ParsingContext* ctx);
32 static soulng::parser::Match AtomicConstraintExpr(CmajorLexer& lexer, ParsingContext* ctx);
33 static soulng::parser::Match PredicateConstraint(CmajorLexer& lexer, ParsingContext* ctx);
34 static soulng::parser::Match IsConstraint(CmajorLexer& lexer, ParsingContext* ctx);
35 static soulng::parser::Match ConceptOrTypeName(CmajorLexer& lexer, ParsingContext* ctx);
36 static soulng::parser::Match MultiParamConstraint(CmajorLexer& lexer, ParsingContext* ctx);
37 static soulng::parser::Match Axiom(CmajorLexer& lexer, ParsingContext* ctx, sngcm::ast::ConceptNode* conceptNode);
38 static soulng::parser::Match AxiomBody(CmajorLexer& lexer, ParsingContext* ctx, sngcm::ast::AxiomNode* axiom);
39 static soulng::parser::Match AxiomStatement(CmajorLexer& lexer, ParsingContext* ctx);
40 };
41
42 #endif // CONCEPT_HPP