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