Skip to content
Snippets Groups Projects
Commit eb4600b5 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

simplify includes in regexps

parent f25ae0be
No related branches found
No related tags found
No related merge requests found
Showing
with 89 additions and 44 deletions
......@@ -6,6 +6,8 @@
*/
 
#include "RegExpCastVisitor.h"
#include "regexp/RegExpClasses.h"
#include "../CastVisitorBase.hpp"
 
typedef cast_base_helper< regexp::VisitableRegExpBase::const_visitor_type, regexp::RegExpBase, alib::RegExpTypes, regexp::RegExp, alib::RegExpTypes > RegExpCastVisitorType;
......
......@@ -3,6 +3,7 @@
#include "regexp/transform/RegExpConcatenate.h"
 
#include <regexp/RegExp.h>
#include <regexp/formal/FormalRegExpElements.h>
 
#include <factory/StringDataFactory.hpp>
 
......
......@@ -16,6 +16,7 @@
#include "automaton/AutomatonClasses.h"
#include "container/ContainerClasses.h"
#include "grammar/GrammarClasses.h"
#include "regexp/RegExpClasses.h"
 
namespace alib {
 
......
......@@ -28,14 +28,7 @@ class UndirectedGraph;
}
 
#include "../label/LabelFeatures.h"
namespace regexp {
class UnboundedRegExp;
class FormalRegExp;
}
#include "../regexp/RegExpFeatures.h"
#include "../string/StringFeatures.h"
#include "../alphabet/SymbolFeatures.h"
#include "../container/ContainerFeatures.h"
......
......@@ -10,6 +10,7 @@
 
#include "../common/wrapper.hpp"
#include "RegExpBase.h"
#include "../alphabet/Symbol.h"
#include "../string/LinearString.h"
#include <string>
......@@ -19,7 +20,18 @@ namespace regexp {
/**
* Wrapper around automata.
*/
typedef alib::wrapper<RegExpBase> RegExp;
class RegExp : public alib::wrapper<RegExpBase> {
public:
explicit RegExp(RegExpBase* data) : alib::wrapper<RegExpBase>(data) {
}
explicit RegExp(const RegExpBase& data) : alib::wrapper<RegExpBase>(data.clone()) {
}
explicit RegExp(RegExpBase&& data) : alib::wrapper<RegExpBase>(std::move(data).plunder()) {
}
};
 
regexp::RegExp regexpFrom( const std::string& string );
 
......
......@@ -6,6 +6,8 @@
*/
 
#include "RegExpAlphabetGetter.h"
#include "RegExp.h"
#include "RegExpClasses.h"
 
namespace regexp {
 
......
......@@ -8,11 +8,9 @@
#ifndef REG_EXP_ALPHABET_GETTER_H_
#define REG_EXP_ALPHABET_GETTER_H_
 
#include "RegExpBase.h"
#include <set>
#include "RegExp.h"
#include "../alphabet/Symbol.h"
#include "unbounded/UnboundedRegExp.h"
#include "formal/FormalRegExp.h"
 
namespace regexp {
 
......
/*
* RegExpClasses.h
*
* Created on: Jun 19, 2014
* Author: Jan Travnicek
*/
#ifndef REG_EXP_CLASSES_H_
#define REG_EXP_CLASSES_H_
#include "unbounded/UnboundedRegExp.h"
#include "formal/FormalRegExp.h"
#endif /* REG_EXP_CLASSES_H_ */
......@@ -15,6 +15,29 @@ enum class FEATURES {
UNBOUNDED
};
 
class RegExp;
class UnboundedRegExp;
class UnboundedRegExpElement;
class UnboundedRegExpAlternation;
class UnboundedRegExpConcatenation;
class UnboundedRegExpIteration;
class UnboundedRegExpSymbol;
class UnboundedRegExpEmpty;
class UnboundedRegExpEpsilon;
class FormalRegExp;
class FormalRegExpElement;
class FormalRegExpAlternation;
class FormalRegExpConcatenation;
class FormalRegExpIteration;
class FormalRegExpSymbol;
class FormalRegExpEmpty;
class FormalRegExpEpsilon;
} /* namespace regexp */
 
#endif /* REG_EXP_FEATURES_H_ */
......@@ -9,7 +9,7 @@
#define REG_EXP_FROM_STRING_LEXER_H_
 
#include <string>
#include <sstream>
#include <istream>
 
namespace regexp {
 
......
......@@ -6,13 +6,13 @@
*/
 
#include "RegExpFromStringParser.h"
#include "../sax/ParserException.h"
#include "../exception/AlibException.h"
#include "RegExpClasses.h"
 
#include "../StringApi.hpp"
#include "unbounded/UnboundedRegExpElements.h"
#include "formal/FormalRegExpElements.h"
 
#include "unbounded/UnboundedRegExp.h"
#include "formal/FormalRegExp.h"
#include "../StringApi.hpp"
 
namespace regexp {
 
......
......@@ -8,12 +8,10 @@
#ifndef REG_EXP_FROM_STRING_PARSER_H_
#define REG_EXP_FROM_STRING_PARSER_H_
 
#include "RegExp.h"
#include "unbounded/UnboundedRegExpElements.h"
#include "formal/FormalRegExpElements.h"
#include "RegExpFromStringLexer.h"
#include "RegExpFeatures.h"
#include "RegExpFromStringLexer.h"
#include <set>
 
namespace alib {
 
......
......@@ -7,9 +7,14 @@
 
#include "RegExpFromXMLParser.h"
#include "../sax/ParserException.h"
#include "../XmlApi.hpp"
 
#include "RegExp.h"
#include "RegExpClasses.h"
#include "unbounded/UnboundedRegExpElements.h"
#include "formal/FormalRegExpElements.h"
namespace regexp {
 
RegExp RegExpFromXMLParser::parseRegExp(std::deque<sax::Token>::iterator& input) const {
......
......@@ -9,14 +9,8 @@
#define REG_EXP_FROM_XML_PARSER_H_
 
#include "../sax/FromXMLParserHelper.h"
#include "RegExp.h"
#include <set>
#include "RegExpFeatures.h"
#include "unbounded/UnboundedRegExp.h"
#include "unbounded/UnboundedRegExpElements.h"
#include "formal/FormalRegExp.h"
#include "formal/FormalRegExpElements.h"
#include "../sax/Token.h"
#include "../alphabet/Symbol.h"
 
namespace alib {
 
......
......@@ -5,11 +5,13 @@
* Author: Martin Zak
*/
 
#include <algorithm>
#include "RegExpToStringComposer.h"
#include "RegExpClasses.h"
#include "unbounded/UnboundedRegExpElements.h"
#include "formal/FormalRegExpElements.h"
#include "../StringApi.hpp"
#include "unbounded/UnboundedRegExp.h"
#include "formal/FormalRegExp.h"
 
namespace regexp {
 
......
......@@ -10,8 +10,8 @@
 
#include <string>
#include "RegExp.h"
#include "unbounded/UnboundedRegExpElements.h"
#include "formal/FormalRegExpElements.h"
#include "unbounded/UnboundedRegExpElement.h"
#include "formal/FormalRegExpElement.h"
 
namespace regexp {
 
......
......@@ -6,9 +6,13 @@
*/
 
#include "RegExpToXMLComposer.h"
#include "../XmlApi.hpp"
 
#include "RegExpClasses.h"
#include "unbounded/UnboundedRegExpElements.h"
#include "formal/FormalRegExpElements.h"
namespace regexp {
 
void RegExpToXMLComposer::Visit(void* userData, const UnboundedRegExpAlternation& alternation) const {
......
......@@ -10,8 +10,8 @@
 
#include <deque>
#include "RegExp.h"
#include "unbounded/UnboundedRegExpElements.h"
#include "formal/FormalRegExpElements.h"
#include "unbounded/UnboundedRegExpElement.h"
#include "formal/FormalRegExpElement.h"
#include "../sax/Token.h"
 
namespace alib {
......
......@@ -7,9 +7,7 @@
 
#include "StringAlphabetGetter.h"
#include "String.h"
#include "Epsilon.h"
#include "LinearString.h"
#include "CyclicString.h"
#include "StringClasses.h"
 
namespace string {
 
......
......@@ -7,9 +7,7 @@
 
#include "StringFromStringParser.h"
#include "../exception/AlibException.h"
#include "Epsilon.h"
#include "LinearString.h"
#include "CyclicString.h"
#include "StringClasses.h"
#include <vector>
 
#include "../StringApi.hpp"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment