SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
Identifier.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Common.h"
4 #include "Lexicon.h"
5 
6 namespace smtrat {
7 namespace parser {
8 
9 struct IdentifierParser: public qi::grammar<Iterator, Identifier(), Skipper> {
10  IdentifierParser(): IdentifierParser::base_type(main, "identifier") {
11  main = symbol[qi::_val = px::construct<Identifier>(qi::_1)] | indexed[qi::_val = qi::_1];
12  main.name("identifier");
13  indexed = (qi::lit("(") >> qi::lit("_") >> symbol >> +numeral >> qi::lit(")"))[qi::_val = px::construct<Identifier>(qi::_1, qi::_2)];
14  indexed.name("indexed symbol");
15  }
20 };
21 
22 }
23 }
PositionIteratorType Iterator
Definition: Common.h:49
Class to create the formulas for axioms.
qi::rule< Iterator, Identifier(), Skipper > indexed
Definition: Identifier.h:19
qi::rule< Iterator, Identifier(), Skipper > main
Definition: Identifier.h:18
Parses numerals: (0 | [1-9][0-9]*)
Definition: Lexicon.h:24