00001 00002 /* 00003 | Author: Michael Schmidt; 00004 | Gunnar Jehl 00005 | 00006 | ************************* SOFTWARE LICENSE AGREEMENT *********************** 00007 | This source code is published under the BSD License. 00008 | 00009 | See file 'LICENSE.txt' that comes with this distribution or 00010 | http://dbis.informatik.uni-freiburg.de/index.php?project=GCX/license.php 00011 | for the full license agreement. 00012 | 00013 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00014 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00015 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00016 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00017 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00018 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00019 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00020 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00021 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00022 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00023 | POSSIBILITY OF SUCH DAMAGE. 00024 | **************************************************************************** 00025 */ 00026 00035 #ifndef STREAMTRACKER_H 00036 #define STREAMTRACKER_H 00037 00038 #include "buffer.h" 00039 00040 #ifdef VALIDATION 00041 #include "parseexception.h" 00042 #endif // #ifdef VALIDATION 00043 00056 class StreamTracker { 00057 00058 public: 00064 StreamTracker(ProjectionDFA * _pdfa, Buffer * _buffer); 00065 00069 virtual ~ StreamTracker(); 00070 00079 void processOpeningTag(const char *tag); 00080 00089 void processBachelorTag(const char *tag); 00090 00091 #ifdef VALIDATION 00092 00101 void processClosingTag(TAG tag); 00102 #endif // #ifdef VALIDATION 00103 00104 00105 #ifdef VALIDATION 00106 00115 void processClosingTag(const char *_tag); 00116 #else 00117 00125 void processClosingTag(); 00126 #endif // #ifdef VALIDATION 00127 00135 void processPCData(const char *data); 00136 00137 private: 00145 ProjectionDFAState * cur; 00146 00152 Buffer *buffer; 00153 00158 TagMap *tagmap; 00159 00166 unsigned skip_subtree_depth; 00167 00174 unsigned keep_subtree_depth; 00175 }; 00176 00177 #endif // STREAMTRACKER_H