dlvhex  2.5.0
HexGrammarBase< Iterator, Skipper > Struct Template Reference

Basic HEX Grammar. More...

#include <include/dlvhex2/HexGrammar.h>

Inheritance diagram for HexGrammarBase< Iterator, Skipper >:
Collaboration diagram for HexGrammarBase< Iterator, Skipper >:

Data Structures

struct  Rule
 Helper struct for creating rule types. More...
struct  Rule< void, Dummy >

Public Member Functions

 HexGrammarBase (HexGrammarSemantics &g)
 Copy-constructor.
void registerToplevelModule (HexParserModuleGrammarPtr module)
 Register module for parsing top level elements of input file.
void registerBodyAtomModule (HexParserModuleGrammarPtr module)
 Register module for parsing body elements of rules and constraints.
void registerHeadAtomModule (HexParserModuleGrammarPtr module)
 Register module for parsing head elements of rules.
void registerTermModule (HexParserModuleGrammarPtr module)
 Register module for parsing terms.

Data Fields

HexGrammarSemanticssem
 Handler called when different syntax elements are parsed.
Rule::type start
Rule::type toplevel
Rule::type toplevelBuiltin
Rule::type mlpModuleHeader
Rule< std::string >::type cident
Rule< std::string >::type string
Rule< std::string >::type variable
Rule< std::string >::type externalAtomPropertyString
Rule< std::string >::type mlpModuleName
Rule< uint32_t >::type posinteger
Rule< ID >::type term
Rule< ID >::type primitiveTerm
Rule< ID >::type pred
Rule< ID >::type externalAtom
Rule< ID >::type externalAtomPredicate
Rule< ID >::type mlpModuleAtom
Rule< ID >::type mlpModuleAtomPredicate
Rule< ID >::type predDecl
Rule< ID >::type classicalAtomPredicate
Rule< ID >::type classicalAtom
Rule< ID >::type builtinAtom
Rule< ID >::type aggregateAtom
Rule< ID >::type bodyAtom
Rule< ID >::type bodyLiteral
Rule< ID >::type headAtom
Rule< ID >::type rule
Rule< ID >::type constraint
Rule< ID >::type weakconstraint
Rule< ID >::type weakconstraintaspcore2
Rule< std::vector< ID > >::type terms
Rule< std::vector< ID > >::type preds
Rule< std::vector< ID > >::type predList
Rule< boost::fusion::vector2
< std::vector< ID >
, boost::optional< std::vector
< ID > > > >::type 
symbolicSet
Rule< boost::fusion::vector2
< ID, std::vector
< boost::fusion::vector2
< std::vector< ID >
, boost::optional< std::vector
< ID > > > > > >::type 
aggregateTerm
Rule< ID >::type toplevelExt
Rule< ID >::type bodyAtomExt
Rule< ID >::type headAtomExt
Rule< ID >::type termExt
Rule< std::vector< std::vector
< std::string > > >::type 
externalAtomProperties
Rule< std::vector< std::string >
>::type 
externalAtomProperty
boost::spirit::qi::symbols
< char, ID
builtinOpsUnary
boost::spirit::qi::symbols
< char, ID
builtinOpsBinary
boost::spirit::qi::symbols
< char, ID
builtinOpsTernary
boost::spirit::qi::symbols
< char, ID
builtinOpsAgg

Protected Attributes

std::vector
< HexParserModuleGrammarPtr
modules

Detailed Description

template<typename Iterator, typename Skipper>
struct HexGrammarBase< Iterator, Skipper >

Basic HEX Grammar.

Definition at line 239 of file HexGrammar.h.


Constructor & Destructor Documentation

template<typename Iterator , typename Skipper >
HexGrammarBase< Iterator, Skipper >::HexGrammarBase ( HexGrammarSemantics g)

Copy-constructor.

Parameters:
gGrammar to copy.

Definition at line 965 of file HexGrammar.tcc.

References HexGrammarBase< Iterator, Skipper >::aggregateAtom, HexGrammarBase< Iterator, Skipper >::aggregateTerm, HexGrammarBase< Iterator, Skipper >::bodyAtom, HexGrammarBase< Iterator, Skipper >::bodyAtomExt, HexGrammarBase< Iterator, Skipper >::bodyLiteral, HexGrammarBase< Iterator, Skipper >::builtinAtom, HexGrammarBase< Iterator, Skipper >::builtinOpsAgg, HexGrammarBase< Iterator, Skipper >::builtinOpsBinary, HexGrammarBase< Iterator, Skipper >::builtinOpsTernary, HexGrammarBase< Iterator, Skipper >::builtinOpsUnary, HexGrammarBase< Iterator, Skipper >::cident, HexGrammarBase< Iterator, Skipper >::classicalAtom, HexGrammarBase< Iterator, Skipper >::classicalAtomPredicate, HexGrammarBase< Iterator, Skipper >::constraint, HexGrammarBase< Iterator, Skipper >::externalAtom, HexGrammarBase< Iterator, Skipper >::externalAtomPredicate, HexGrammarBase< Iterator, Skipper >::externalAtomProperties, HexGrammarBase< Iterator, Skipper >::externalAtomProperty, HexGrammarBase< Iterator, Skipper >::externalAtomPropertyString, HexGrammarBase< Iterator, Skipper >::headAtom, HexGrammarBase< Iterator, Skipper >::headAtomExt, HexGrammarBase< Iterator, Skipper >::mlpModuleAtom, HexGrammarBase< Iterator, Skipper >::mlpModuleAtomPredicate, HexGrammarBase< Iterator, Skipper >::mlpModuleHeader, HexGrammarBase< Iterator, Skipper >::mlpModuleName, HexGrammarBase< Iterator, Skipper >::posinteger, HexGrammarBase< Iterator, Skipper >::pred, HexGrammarBase< Iterator, Skipper >::predDecl, HexGrammarBase< Iterator, Skipper >::predList, HexGrammarBase< Iterator, Skipper >::preds, HexGrammarBase< Iterator, Skipper >::primitiveTerm, HexGrammarBase< Iterator, Skipper >::rule, HexGrammarBase< Iterator, Skipper >::start, HexGrammarBase< Iterator, Skipper >::string, HexGrammarBase< Iterator, Skipper >::symbolicSet, HexGrammarBase< Iterator, Skipper >::term, ID::TERM_BUILTIN_ADD, ID::TERM_BUILTIN_AGGANY, ID::TERM_BUILTIN_AGGAVG, ID::TERM_BUILTIN_AGGCOUNT, ID::TERM_BUILTIN_AGGMAX, ID::TERM_BUILTIN_AGGMIN, ID::TERM_BUILTIN_AGGSUM, ID::TERM_BUILTIN_AGGTIMES, ID::TERM_BUILTIN_DIV, ID::TERM_BUILTIN_EQ, ID::TERM_BUILTIN_GE, ID::TERM_BUILTIN_GT, ID::TERM_BUILTIN_INT, ID::TERM_BUILTIN_LE, ID::TERM_BUILTIN_LT, ID::TERM_BUILTIN_MOD, ID::TERM_BUILTIN_MUL, ID::TERM_BUILTIN_NE, ID::TERM_BUILTIN_SUB, ID::TERM_BUILTIN_SUCC, HexGrammarBase< Iterator, Skipper >::termExt, ID::termFromBuiltin(), HexGrammarBase< Iterator, Skipper >::terms, HexGrammarBase< Iterator, Skipper >::toplevel, HexGrammarBase< Iterator, Skipper >::toplevelBuiltin, HexGrammarBase< Iterator, Skipper >::toplevelExt, HexGrammarBase< Iterator, Skipper >::variable, and HexGrammarBase< Iterator, Skipper >::weakconstraint.


Member Function Documentation

template<typename Iterator , typename Skipper >
void HexGrammarBase< Iterator, Skipper >::registerBodyAtomModule ( HexParserModuleGrammarPtr  module)

Register module for parsing body elements of rules and constraints.

register module for parsing body elements of rules and constraints (use this to parse predicates in rule bodies)

Use this to parse predicates in rule bodies.

Parameters:
moduleParserModule to register.

Definition at line 1265 of file HexGrammar.tcc.

Referenced by ModuleHexParser::parse().

template<typename Iterator , typename Skipper >
void HexGrammarBase< Iterator, Skipper >::registerHeadAtomModule ( HexParserModuleGrammarPtr  module)

Register module for parsing head elements of rules.

register module for parsing head elements of rules (use this to parse predicates in rule heads)

Use this to parse predicates in rule heads.

Parameters:
moduleParserModule to register.

Definition at line 1279 of file HexGrammar.tcc.

Referenced by ModuleHexParser::parse().

template<typename Iterator , typename Skipper >
void HexGrammarBase< Iterator, Skipper >::registerTermModule ( HexParserModuleGrammarPtr  module)

Register module for parsing terms.

register module for parsing terms (use this to parse terms in any predicates)

Use this to parse terms in any predicates.

Parameters:
moduleParserModule to register.

Definition at line 1293 of file HexGrammar.tcc.

Referenced by ModuleHexParser::parse().

template<typename Iterator , typename Skipper >
Skipper void HexGrammarBase< Iterator, Skipper >::registerToplevelModule ( HexParserModuleGrammarPtr  module)

Register module for parsing top level elements of input file.

Use this to parse queries or other meta or control flow information.

Parameters:
moduleParserModule to register.

Definition at line 1251 of file HexGrammar.tcc.

Referenced by ModuleHexParser::parse().


Field Documentation

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::aggregateAtom

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<boost::fusion::vector2<ID, std::vector<boost::fusion::vector2<std::vector<ID>, boost::optional<std::vector<ID> > > > > >::type HexGrammarBase< Iterator, Skipper >::aggregateTerm

Definition at line 305 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::bodyAtom

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::bodyAtomExt

Definition at line 308 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::bodyLiteral

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::builtinAtom

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
boost::spirit::qi::symbols<char, ID> HexGrammarBase< Iterator, Skipper >::builtinOpsAgg

Definition at line 315 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
boost::spirit::qi::symbols<char, ID> HexGrammarBase< Iterator, Skipper >::builtinOpsBinary

Definition at line 315 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
boost::spirit::qi::symbols<char, ID> HexGrammarBase< Iterator, Skipper >::builtinOpsTernary

Definition at line 315 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
boost::spirit::qi::symbols<char, ID> HexGrammarBase< Iterator, Skipper >::builtinOpsUnary

Definition at line 315 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<std::string>::type HexGrammarBase< Iterator, Skipper >::cident

Definition at line 292 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::classicalAtom

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::classicalAtomPredicate

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::constraint

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::externalAtom

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::externalAtomPredicate

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<std::vector<std::vector<std::string> > >::type HexGrammarBase< Iterator, Skipper >::externalAtomProperties

Definition at line 310 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<std::vector<std::string> >::type HexGrammarBase< Iterator, Skipper >::externalAtomProperty

Definition at line 312 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<std::string>::type HexGrammarBase< Iterator, Skipper >::externalAtomPropertyString

Definition at line 292 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::headAtom

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::headAtomExt

Definition at line 308 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::mlpModuleAtom

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::mlpModuleAtomPredicate

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule ::type HexGrammarBase< Iterator, Skipper >::mlpModuleHeader

Definition at line 290 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<std::string>::type HexGrammarBase< Iterator, Skipper >::mlpModuleName

Definition at line 292 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
std::vector<HexParserModuleGrammarPtr> HexGrammarBase< Iterator, Skipper >::modules [protected]

Definition at line 317 of file HexGrammar.h.

template<typename Iterator , typename Skipper >
Rule<uint32_t>::type HexGrammarBase< Iterator, Skipper >::posinteger

Definition at line 294 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::pred

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::predDecl

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<std::vector<ID> >::type HexGrammarBase< Iterator, Skipper >::predList

Definition at line 301 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<std::vector<ID> >::type HexGrammarBase< Iterator, Skipper >::preds

Definition at line 301 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::primitiveTerm

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::rule

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
HexGrammarSemantics& HexGrammarBase< Iterator, Skipper >::sem

Handler called when different syntax elements are parsed.

Definition at line 242 of file HexGrammar.h.

template<typename Iterator , typename Skipper >
Rule ::type HexGrammarBase< Iterator, Skipper >::start

Definition at line 290 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<std::string>::type HexGrammarBase< Iterator, Skipper >::string

Definition at line 292 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<boost::fusion::vector2<std::vector<ID>, boost::optional<std::vector<ID> > > >::type HexGrammarBase< Iterator, Skipper >::symbolicSet

Definition at line 303 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::term

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::termExt

Definition at line 308 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<std::vector<ID> >::type HexGrammarBase< Iterator, Skipper >::terms

Definition at line 301 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule ::type HexGrammarBase< Iterator, Skipper >::toplevel

Definition at line 290 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule ::type HexGrammarBase< Iterator, Skipper >::toplevelBuiltin

Definition at line 290 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::toplevelExt

Definition at line 308 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<std::string>::type HexGrammarBase< Iterator, Skipper >::variable

Definition at line 292 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::weakconstraint

Definition at line 296 of file HexGrammar.h.

Referenced by HexGrammarBase< Iterator, Skipper >::HexGrammarBase().

template<typename Iterator , typename Skipper >
Rule<ID>::type HexGrammarBase< Iterator, Skipper >::weakconstraintaspcore2

Definition at line 296 of file HexGrammar.h.


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