dlvhex  2.5.0
HexGrammarSemantics Class Reference

Grammar for parsing HEX using boost::spirit. More...

#include <include/dlvhex2/HexGrammar.h>

Inheritance diagram for HexGrammarSemantics:
Collaboration diagram for HexGrammarSemantics:

Public Member Functions

void markExternalPropertyIfExternalBody (RegistryPtr registry, Rule &r)
 Checks if r contains external atoms and sets the kind flag appropriately.
void markModulePropertyIfModuleBody (RegistryPtr registry, Rule &r)
 Checks if r contains module atoms and sets the kind flag appropriately.
 HexGrammarSemantics (ProgramCtx &ctx)
 Constructor.
 DLVHEX_DEFINE_SEMANTIC_ACTION (termId, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (termFromCIdent, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (termFromFunctionTerm, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (termFromRange, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (termFromInteger, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (termFromString, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (termFromVariable, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (predFromPredDecl, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (predFromNameOnly, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (predFromString, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (classicalAtomFromPrefix, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (classicalAtomFromTuple, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (builtinTernaryInfix, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (builtinBinaryInfix, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (builtinUnaryPrefix, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (builtinBinaryPrefix, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (builtinTernaryPrefix, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (aggregateAtom, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (externalAtom, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (extSourceProperty, std::vector< std::string >)
 DLVHEX_DEFINE_SEMANTIC_ACTION (mlpModuleAtom, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (bodyLiteral, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (rule, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (ruleVariableDisjunction, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (constraint, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (weakconstraint, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (weakconstraintaspcore2, ID)
 DLVHEX_DEFINE_SEMANTIC_ACTION (add, const boost::spirit::unused_type)
 DLVHEX_DEFINE_SEMANTIC_ACTION (addMLPModuleName, std::string)
 DLVHEX_DEFINE_SEMANTIC_ACTION (addMLPModuleHeader, const boost::spirit::unused_type)
 DLVHEX_DEFINE_SEMANTIC_ACTION (ignoreAndWarnIfNotFail, const boost::spirit::unused_type)
 DLVHEX_DEFINE_SEMANTIC_ACTION (maxint, const boost::spirit::unused_type)

Data Fields

ProgramCtxctx
 ProgramCtx.
std::string currentModuleName
 Stores module name to prefix pred_decl.
int mlpMode
 Parse also modules.

Detailed Description

Grammar for parsing HEX using boost::spirit.

Definition at line 169 of file HexGrammar.h.


Constructor & Destructor Documentation

Constructor.

Parameters:
ctxProgramCtx.

Definition at line 61 of file HexGrammar.cpp.

References mlpMode.


Member Function Documentation

HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( termFromFunctionTerm  ,
ID   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( classicalAtomFromPrefix  ,
ID   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( classicalAtomFromTuple  ,
ID   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( builtinTernaryInfix  ,
ID   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( builtinBinaryInfix  ,
ID   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( builtinUnaryPrefix  ,
ID   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( builtinBinaryPrefix  ,
ID   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( builtinTernaryPrefix  ,
ID   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( extSourceProperty  ,
std::vector< std::string >   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( ruleVariableDisjunction  ,
ID   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( weakconstraintaspcore2  ,
ID   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( add  ,
const boost::spirit::unused_type   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( addMLPModuleName  ,
std::string   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( addMLPModuleHeader  ,
const boost::spirit::unused_type   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( ignoreAndWarnIfNotFail  ,
const boost::spirit::unused_type   
)
HexGrammarSemantics::DLVHEX_DEFINE_SEMANTIC_ACTION ( maxint  ,
const boost::spirit::unused_type   
)

Field Documentation

ProgramCtx.

Definition at line 173 of file HexGrammar.h.

Referenced by sem< HexGrammarSemantics::termFromCIdent >::operator()(), sem< HexGrammarSemantics::termFromFunctionTerm >::operator()(), sem< HexGrammarSemantics::termFromRange >::operator()(), sem< HexGrammarSemantics::termFromInteger >::operator()(), sem< HexGrammarSemantics::termFromString >::operator()(), sem< HexGrammarSemantics::termFromVariable >::operator()(), sem< ConditionalParserModuleSemantics::conditionalLieral >::operator()(), sem< HigherOrderParserModuleSemantics::higherOrderAtom >::operator()(), sem< ChoiceParserModuleSemantics::choiceRule >::operator()(), sem< StrongNegationParserModuleSemantics::stronglyNegatedPrefixAtom >::operator()(), sem< QueryParserModuleSemantics::queryBody >::operator()(), sem< HexGrammarSemantics::predFromPredDecl >::operator()(), sem< ChoiceParserModuleSemantics::choiceHead >::operator()(), sem< HexGrammarSemantics::predFromNameOnly >::operator()(), sem< HexGrammarSemantics::predFromString >::operator()(), sem< HexGrammarSemantics::classicalAtomFromPrefix >::operator()(), sem< ChoiceParserModuleSemantics::choiceElement >::operator()(), sem< HexGrammarSemantics::classicalAtomFromTuple >::operator()(), sem< HexGrammarSemantics::builtinTernaryInfix >::operator()(), sem< HexGrammarSemantics::builtinBinaryInfix >::operator()(), sem< HexGrammarSemantics::builtinUnaryPrefix >::operator()(), sem< HexGrammarSemantics::builtinBinaryPrefix >::operator()(), sem< HexGrammarSemantics::builtinTernaryPrefix >::operator()(), sem< HexGrammarSemantics::aggregateAtom >::operator()(), sem< HexGrammarSemantics::externalAtom >::operator()(), sem< FunctionParserModuleTermSemantics::functionTermConstruct >::operator()(), sem< ManualEvalHeuristicsParserModuleSemantics::evalUnit >::operator()(), sem< HexGrammarSemantics::mlpModuleAtom >::operator()(), sem< FunctionParserModuleAtomSemantics::functionTermEval >::operator()(), sem< HexGrammarSemantics::rule >::operator()(), sem< HexGrammarSemantics::ruleVariableDisjunction >::operator()(), sem< HexGrammarSemantics::constraint >::operator()(), sem< HexGrammarSemantics::weakconstraint >::operator()(), sem< HexGrammarSemantics::weakconstraintaspcore2 >::operator()(), sem< HexGrammarSemantics::addMLPModuleHeader >::operator()(), sem< HexGrammarSemantics::add >::operator()(), sem< HexGrammarSemantics::maxint >::operator()(), and storePredicate().


The documentation for this class was generated from the following files: