1
/* VerifyPN - TAPAAL Petri Net Engine
2
* Copyright (C) 2014 Jiri Srba <srba.jiri@gmail.com>
3
* Peter Gjøl Jensen <root@petergjoel.dk>
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
#ifndef QUERYXMLPARSER_H
19
#define QUERYXMLPARSER_H
29
#include <rapidxml.hpp>
31
#include "PNMLParser.h"
32
#include "QueryParser.h"
33
using namespace PetriEngine::PQL;
35
class QueryXMLParser {
40
std::vector<QueryItem> queries;
42
bool parse(std::ifstream& xml, const std::set<size_t>& );
44
void printQueries(size_t i);
47
bool parsePropertySet(rapidxml::xml_node<>* element, const std::set<size_t>&);
48
bool parseProperty(rapidxml::xml_node<>* element);
49
bool parseTags(rapidxml::xml_node<>* element);
50
Condition_ptr parseFormula(rapidxml::xml_node<>* element);
51
Condition_ptr parseBooleanFormula(rapidxml::xml_node<>* element);
52
Expr_ptr parseIntegerExpression(rapidxml::xml_node<>* element);
53
string parsePlace(rapidxml::xml_node<>* element);
54
void fatal_error(const std::string& token);
57
#endif /* QUERYXMLPARSER_H */