SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
Attribute.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Common.h"
4 #include "Lexicon.h"
5 #include "SExpression.h"
6 #include "theories/Attribute.h"
7 #include "theories/TheoryTypes.h"
8 
9 namespace smtrat {
10 namespace parser {
11 
12 struct AttributeValueParser: public qi::grammar<Iterator, types::AttributeValue(), Skipper> {
14  AttributeValueParser(): AttributeValueParser::base_type(main, "attribute value") {
15  main =
16  specconstant[qi::_val = px::bind(&Converter::template convert<types::ConstType>, &converter, qi::_1)]
17  | symbol[qi::_val = qi::_1]
18  | (qi::lit("(") >> *sexpression >> qi::lit(")"))[qi::_val = px::construct<SExpressionSequence<types::ConstType>>(qi::_1)]
19  ;
20  }
26 };
27 
28 
29 struct AttributeParser: public qi::grammar<Iterator, Attribute(), Skipper> {
30  AttributeParser(): AttributeParser::base_type(main, "attribute") {
31  main = (keyword > -value)[qi::_val = px::construct<Attribute>(qi::_1, qi::_2)];
32  }
35  qi::rule<Iterator, Attribute(), Skipper> main;
36 };
37 
38 }
39 }
Represents an Attribute.
Definition: Attribute.h:14
carl::mpl_variant_of< AttributeTypes >::type AttributeValue
Variant type for all attributes.
Definition: TheoryTypes.h:177
PositionIteratorType Iterator
Definition: Common.h:49
Class to create the formulas for axioms.
qi::rule< Iterator, Attribute(), Skipper > main
Definition: Attribute.h:35
AttributeValueParser value
Definition: Attribute.h:34
qi::rule< Iterator, types::AttributeValue(), Skipper > main
Definition: Attribute.h:25
SpecConstantParser specconstant
Definition: Attribute.h:21
conversion::VariantVariantConverter< types::AttributeValue > Converter
Definition: Attribute.h:13
Parses keywords: :simple_symbol
Definition: Lexicon.h:111