File indexing completed on 2024-03-24 05:54:36
0001 /* 0002 * SPDX-FileCopyrightText: 2002-2003 Jesper K. Pedersen <blackie@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-only 0005 **/ 0006 0007 #ifndef __CONCREGEXP_H 0008 #define __CONCREGEXP_H 0009 0010 #include "regexp.h" 0011 0012 /** 0013 Abstract syntax node for `concatenated' regular expression 0014 @internal 0015 */ 0016 class ConcRegExp : public RegExp 0017 { 0018 public: 0019 ConcRegExp(bool selected); 0020 0021 void addRegExp(RegExp *); 0022 RegExpList children(); 0023 RegExp *lastRegExp(); 0024 0025 bool check(ErrorMap &, bool first, bool last) override; 0026 int precedence() const override 0027 { 0028 return 2; 0029 } 0030 0031 QDomNode toXml(QDomDocument *doc) const override; 0032 bool load(const QDomElement &, const QString &version) override; 0033 RegExpType type() const override 0034 { 0035 return CONC; 0036 } 0037 0038 bool operator==(const RegExp &other) const override; 0039 void replacePart(CompoundRegExp *replacement) override; 0040 0041 private: 0042 RegExpList list; 0043 }; 0044 0045 #endif // __CONCREGEXP_H