From 2679b8127a31f627f8bd6375b464cf65c7434a94 Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Thu, 17 May 2018 17:23:37 +0200
Subject: [PATCH] add 'first' static function to xml api of automata, grammars
 and trees

---
 alib2data/src/automaton/xml/FSM/CompactNFA.h          | 11 +++++++++++
 alib2data/src/automaton/xml/FSM/DFA.h                 | 11 +++++++++++
 alib2data/src/automaton/xml/FSM/EpsilonNFA.h          | 11 +++++++++++
 alib2data/src/automaton/xml/FSM/ExtendedNFA.h         | 11 +++++++++++
 .../src/automaton/xml/FSM/MultiInitialStateNFA.h      | 11 +++++++++++
 alib2data/src/automaton/xml/FSM/NFA.h                 | 11 +++++++++++
 alib2data/src/automaton/xml/PDA/DPDA.h                | 11 +++++++++++
 alib2data/src/automaton/xml/PDA/InputDrivenDPDA.h     | 11 +++++++++++
 alib2data/src/automaton/xml/PDA/InputDrivenNPDA.h     | 11 +++++++++++
 alib2data/src/automaton/xml/PDA/NPDA.h                | 11 +++++++++++
 alib2data/src/automaton/xml/PDA/NPDTA.h               | 11 +++++++++++
 .../xml/PDA/RealTimeHeightDeterministicDPDA.h         | 11 +++++++++++
 .../xml/PDA/RealTimeHeightDeterministicNPDA.h         | 11 +++++++++++
 alib2data/src/automaton/xml/PDA/SinglePopDPDA.h       | 11 +++++++++++
 alib2data/src/automaton/xml/PDA/SinglePopNPDA.h       | 11 +++++++++++
 alib2data/src/automaton/xml/PDA/VisiblyPushdownDPDA.h | 11 +++++++++++
 alib2data/src/automaton/xml/PDA/VisiblyPushdownNPDA.h | 11 +++++++++++
 alib2data/src/automaton/xml/TA/DFTA.h                 | 11 +++++++++++
 alib2data/src/automaton/xml/TA/NFTA.h                 | 11 +++++++++++
 alib2data/src/automaton/xml/TM/OneTapeDTM.h           | 11 +++++++++++
 alib2data/src/grammar/xml/ContextFree/CFG.h           | 11 +++++++++++
 alib2data/src/grammar/xml/ContextFree/CNF.h           | 11 +++++++++++
 .../src/grammar/xml/ContextFree/EpsilonFreeCFG.h      | 11 +++++++++++
 alib2data/src/grammar/xml/ContextFree/GNF.h           | 11 +++++++++++
 alib2data/src/grammar/xml/ContextFree/LG.h            | 11 +++++++++++
 alib2data/src/grammar/xml/ContextSensitive/CSG.h      | 11 +++++++++++
 .../xml/ContextSensitive/NonContractingGrammar.h      | 11 +++++++++++
 alib2data/src/grammar/xml/Regular/LeftLG.h            | 11 +++++++++++
 alib2data/src/grammar/xml/Regular/LeftRG.h            | 11 +++++++++++
 alib2data/src/grammar/xml/Regular/RightLG.h           | 11 +++++++++++
 alib2data/src/grammar/xml/Regular/RightRG.h           | 11 +++++++++++
 .../ContextPreservingUnrestrictedGrammar.h            | 11 +++++++++++
 .../grammar/xml/Unrestricted/UnrestrictedGrammar.h    | 11 +++++++++++
 alib2data/src/tree/xml/ranked/PostfixRankedTree.h     | 11 +++++++++++
 .../tree/xml/ranked/PrefixRankedBarNonlinearPattern.h | 11 +++++++++++
 .../src/tree/xml/ranked/PrefixRankedBarPattern.h      | 11 +++++++++++
 alib2data/src/tree/xml/ranked/PrefixRankedBarTree.h   | 11 +++++++++++
 .../tree/xml/ranked/PrefixRankedNonlinearPattern.h    | 11 +++++++++++
 alib2data/src/tree/xml/ranked/PrefixRankedPattern.h   | 11 +++++++++++
 alib2data/src/tree/xml/ranked/PrefixRankedTree.h      | 11 +++++++++++
 .../src/tree/xml/ranked/RankedNonlinearPattern.h      | 11 +++++++++++
 alib2data/src/tree/xml/ranked/RankedPattern.h         | 11 +++++++++++
 alib2data/src/tree/xml/ranked/RankedTree.h            |  7 +++++++
 alib2data/src/tree/xml/unranked/PrefixBarTree.h       | 11 +++++++++++
 .../src/tree/xml/unranked/UnrankedNonlinearPattern.h  | 11 +++++++++++
 alib2data/src/tree/xml/unranked/UnrankedPattern.h     | 11 +++++++++++
 alib2data/src/tree/xml/unranked/UnrankedTree.h        |  7 +++++++
 47 files changed, 509 insertions(+)

diff --git a/alib2data/src/automaton/xml/FSM/CompactNFA.h b/alib2data/src/automaton/xml/FSM/CompactNFA.h
index c99bf87539..f127e5cce8 100644
--- a/alib2data/src/automaton/xml/FSM/CompactNFA.h
+++ b/alib2data/src/automaton/xml/FSM/CompactNFA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::CompactNFA < SymbolType, StateType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/FSM/DFA.h b/alib2data/src/automaton/xml/FSM/DFA.h
index 906a4d7df9..aad1a465bd 100644
--- a/alib2data/src/automaton/xml/FSM/DFA.h
+++ b/alib2data/src/automaton/xml/FSM/DFA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::DFA < SymbolType, StateType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/FSM/EpsilonNFA.h b/alib2data/src/automaton/xml/FSM/EpsilonNFA.h
index dac7d62d03..4bd95eb652 100644
--- a/alib2data/src/automaton/xml/FSM/EpsilonNFA.h
+++ b/alib2data/src/automaton/xml/FSM/EpsilonNFA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::EpsilonNFA < SymbolType, EpsilonType, StateType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/FSM/ExtendedNFA.h b/alib2data/src/automaton/xml/FSM/ExtendedNFA.h
index 9d7c6ae988..6767d4dba8 100644
--- a/alib2data/src/automaton/xml/FSM/ExtendedNFA.h
+++ b/alib2data/src/automaton/xml/FSM/ExtendedNFA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::ExtendedNFA < SymbolType, StateType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/FSM/MultiInitialStateNFA.h b/alib2data/src/automaton/xml/FSM/MultiInitialStateNFA.h
index c464b9ef9f..854860e4c9 100644
--- a/alib2data/src/automaton/xml/FSM/MultiInitialStateNFA.h
+++ b/alib2data/src/automaton/xml/FSM/MultiInitialStateNFA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::MultiInitialStateNFA < SymbolType, StateType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/FSM/NFA.h b/alib2data/src/automaton/xml/FSM/NFA.h
index 53408aae1e..344944c21f 100644
--- a/alib2data/src/automaton/xml/FSM/NFA.h
+++ b/alib2data/src/automaton/xml/FSM/NFA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::NFA < SymbolType, StateType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/PDA/DPDA.h b/alib2data/src/automaton/xml/PDA/DPDA.h
index 925f19cb35..cf32f9bb14 100644
--- a/alib2data/src/automaton/xml/PDA/DPDA.h
+++ b/alib2data/src/automaton/xml/PDA/DPDA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::DPDA < InputSymbolType, EpsilonType, PushdownStoreSym
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/PDA/InputDrivenDPDA.h b/alib2data/src/automaton/xml/PDA/InputDrivenDPDA.h
index 0c86ce798d..88b2f2511f 100644
--- a/alib2data/src/automaton/xml/PDA/InputDrivenDPDA.h
+++ b/alib2data/src/automaton/xml/PDA/InputDrivenDPDA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::InputDrivenDPDA < InputSymbolType, PushdownStoreSymbo
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/PDA/InputDrivenNPDA.h b/alib2data/src/automaton/xml/PDA/InputDrivenNPDA.h
index 61512f78fc..d7b30ed5b9 100644
--- a/alib2data/src/automaton/xml/PDA/InputDrivenNPDA.h
+++ b/alib2data/src/automaton/xml/PDA/InputDrivenNPDA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::InputDrivenNPDA < InputSymbolType, PushdownStoreSymbo
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/PDA/NPDA.h b/alib2data/src/automaton/xml/PDA/NPDA.h
index bd331edc9c..1998c98571 100644
--- a/alib2data/src/automaton/xml/PDA/NPDA.h
+++ b/alib2data/src/automaton/xml/PDA/NPDA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::NPDA < InputSymbolType, EpsilonType, PushdownStoreSym
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/PDA/NPDTA.h b/alib2data/src/automaton/xml/PDA/NPDTA.h
index bd1bca13b9..2e0ea60478 100644
--- a/alib2data/src/automaton/xml/PDA/NPDTA.h
+++ b/alib2data/src/automaton/xml/PDA/NPDTA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::NPDTA < InputSymbolType, OutputSymbolType, EpsilonTyp
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/PDA/RealTimeHeightDeterministicDPDA.h b/alib2data/src/automaton/xml/PDA/RealTimeHeightDeterministicDPDA.h
index d05dc25fbd..b96793fe9b 100644
--- a/alib2data/src/automaton/xml/PDA/RealTimeHeightDeterministicDPDA.h
+++ b/alib2data/src/automaton/xml/PDA/RealTimeHeightDeterministicDPDA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::RealTimeHeightDeterministicDPDA < InputSymbolType, Ep
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/PDA/RealTimeHeightDeterministicNPDA.h b/alib2data/src/automaton/xml/PDA/RealTimeHeightDeterministicNPDA.h
index 9e80f3317d..49433a50c7 100644
--- a/alib2data/src/automaton/xml/PDA/RealTimeHeightDeterministicNPDA.h
+++ b/alib2data/src/automaton/xml/PDA/RealTimeHeightDeterministicNPDA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::RealTimeHeightDeterministicNPDA < InputSymbolType, Ep
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/PDA/SinglePopDPDA.h b/alib2data/src/automaton/xml/PDA/SinglePopDPDA.h
index 328476b158..e3d7827ffd 100644
--- a/alib2data/src/automaton/xml/PDA/SinglePopDPDA.h
+++ b/alib2data/src/automaton/xml/PDA/SinglePopDPDA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::SinglePopDPDA < InputSymbolType, EpsilonType, Pushdow
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/PDA/SinglePopNPDA.h b/alib2data/src/automaton/xml/PDA/SinglePopNPDA.h
index f9d924986a..eda110c5d6 100644
--- a/alib2data/src/automaton/xml/PDA/SinglePopNPDA.h
+++ b/alib2data/src/automaton/xml/PDA/SinglePopNPDA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::SinglePopNPDA < InputSymbolType, EpsilonType, Pushdow
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/PDA/VisiblyPushdownDPDA.h b/alib2data/src/automaton/xml/PDA/VisiblyPushdownDPDA.h
index 84f4ae5b48..de6bf9ae80 100644
--- a/alib2data/src/automaton/xml/PDA/VisiblyPushdownDPDA.h
+++ b/alib2data/src/automaton/xml/PDA/VisiblyPushdownDPDA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::VisiblyPushdownDPDA < InputSymbolType, PushdownStoreS
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/PDA/VisiblyPushdownNPDA.h b/alib2data/src/automaton/xml/PDA/VisiblyPushdownNPDA.h
index 763bd142c6..1b0fcc7468 100644
--- a/alib2data/src/automaton/xml/PDA/VisiblyPushdownNPDA.h
+++ b/alib2data/src/automaton/xml/PDA/VisiblyPushdownNPDA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::VisiblyPushdownNPDA < InputSymbolType, PushdownStoreS
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/TA/DFTA.h b/alib2data/src/automaton/xml/TA/DFTA.h
index 46e60daa8b..b754c4620d 100644
--- a/alib2data/src/automaton/xml/TA/DFTA.h
+++ b/alib2data/src/automaton/xml/TA/DFTA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::DFTA < SymbolType, RankType, StateType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/TA/NFTA.h b/alib2data/src/automaton/xml/TA/NFTA.h
index 4166d3aa05..4310afa6dc 100644
--- a/alib2data/src/automaton/xml/TA/NFTA.h
+++ b/alib2data/src/automaton/xml/TA/NFTA.h
@@ -46,6 +46,17 @@ struct xmlApi < automaton::NFTA < SymbolType, RankType, StateType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/automaton/xml/TM/OneTapeDTM.h b/alib2data/src/automaton/xml/TM/OneTapeDTM.h
index c8fcff800c..a1be03c6cf 100644
--- a/alib2data/src/automaton/xml/TM/OneTapeDTM.h
+++ b/alib2data/src/automaton/xml/TM/OneTapeDTM.h
@@ -47,6 +47,17 @@ struct xmlApi < automaton::OneTapeDTM < SymbolType, StateType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/ContextFree/CFG.h b/alib2data/src/grammar/xml/ContextFree/CFG.h
index 3f301b5da4..e19621dfca 100644
--- a/alib2data/src/grammar/xml/ContextFree/CFG.h
+++ b/alib2data/src/grammar/xml/ContextFree/CFG.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::CFG < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/ContextFree/CNF.h b/alib2data/src/grammar/xml/ContextFree/CNF.h
index f1258e0a69..150648aff2 100644
--- a/alib2data/src/grammar/xml/ContextFree/CNF.h
+++ b/alib2data/src/grammar/xml/ContextFree/CNF.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::CNF < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/ContextFree/EpsilonFreeCFG.h b/alib2data/src/grammar/xml/ContextFree/EpsilonFreeCFG.h
index 0d1aa9df0a..e7b18aa3ab 100644
--- a/alib2data/src/grammar/xml/ContextFree/EpsilonFreeCFG.h
+++ b/alib2data/src/grammar/xml/ContextFree/EpsilonFreeCFG.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::EpsilonFreeCFG < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/ContextFree/GNF.h b/alib2data/src/grammar/xml/ContextFree/GNF.h
index 197c3eeb2e..89016d7617 100644
--- a/alib2data/src/grammar/xml/ContextFree/GNF.h
+++ b/alib2data/src/grammar/xml/ContextFree/GNF.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::GNF < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/ContextFree/LG.h b/alib2data/src/grammar/xml/ContextFree/LG.h
index 915f99555f..18da53d7a5 100644
--- a/alib2data/src/grammar/xml/ContextFree/LG.h
+++ b/alib2data/src/grammar/xml/ContextFree/LG.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::LG < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/ContextSensitive/CSG.h b/alib2data/src/grammar/xml/ContextSensitive/CSG.h
index 97b3ed8c80..d97918046c 100644
--- a/alib2data/src/grammar/xml/ContextSensitive/CSG.h
+++ b/alib2data/src/grammar/xml/ContextSensitive/CSG.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::CSG < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/ContextSensitive/NonContractingGrammar.h b/alib2data/src/grammar/xml/ContextSensitive/NonContractingGrammar.h
index 56a10f5568..bad5fc62b1 100644
--- a/alib2data/src/grammar/xml/ContextSensitive/NonContractingGrammar.h
+++ b/alib2data/src/grammar/xml/ContextSensitive/NonContractingGrammar.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::NonContractingGrammar < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/Regular/LeftLG.h b/alib2data/src/grammar/xml/Regular/LeftLG.h
index 3260bc493b..a55316387d 100644
--- a/alib2data/src/grammar/xml/Regular/LeftLG.h
+++ b/alib2data/src/grammar/xml/Regular/LeftLG.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::LeftLG < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/Regular/LeftRG.h b/alib2data/src/grammar/xml/Regular/LeftRG.h
index 3a59221bd9..fed328d368 100644
--- a/alib2data/src/grammar/xml/Regular/LeftRG.h
+++ b/alib2data/src/grammar/xml/Regular/LeftRG.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::LeftRG < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/Regular/RightLG.h b/alib2data/src/grammar/xml/Regular/RightLG.h
index cff23afa3a..163b34f321 100644
--- a/alib2data/src/grammar/xml/Regular/RightLG.h
+++ b/alib2data/src/grammar/xml/Regular/RightLG.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::RightLG < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/Regular/RightRG.h b/alib2data/src/grammar/xml/Regular/RightRG.h
index f611668947..7217a73beb 100644
--- a/alib2data/src/grammar/xml/Regular/RightRG.h
+++ b/alib2data/src/grammar/xml/Regular/RightRG.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::RightRG < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/Unrestricted/ContextPreservingUnrestrictedGrammar.h b/alib2data/src/grammar/xml/Unrestricted/ContextPreservingUnrestrictedGrammar.h
index ff008afa25..1084dcd2ae 100644
--- a/alib2data/src/grammar/xml/Unrestricted/ContextPreservingUnrestrictedGrammar.h
+++ b/alib2data/src/grammar/xml/Unrestricted/ContextPreservingUnrestrictedGrammar.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::ContextPreservingUnrestrictedGrammar < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/grammar/xml/Unrestricted/UnrestrictedGrammar.h b/alib2data/src/grammar/xml/Unrestricted/UnrestrictedGrammar.h
index 76a293421f..4c483f0b68 100644
--- a/alib2data/src/grammar/xml/Unrestricted/UnrestrictedGrammar.h
+++ b/alib2data/src/grammar/xml/Unrestricted/UnrestrictedGrammar.h
@@ -45,6 +45,17 @@ struct xmlApi < grammar::UnrestrictedGrammar < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/ranked/PostfixRankedTree.h b/alib2data/src/tree/xml/ranked/PostfixRankedTree.h
index a3cded10b4..5dc71bf721 100644
--- a/alib2data/src/tree/xml/ranked/PostfixRankedTree.h
+++ b/alib2data/src/tree/xml/ranked/PostfixRankedTree.h
@@ -47,6 +47,17 @@ struct xmlApi < tree::PostfixRankedTree < SymbolType, RankType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/ranked/PrefixRankedBarNonlinearPattern.h b/alib2data/src/tree/xml/ranked/PrefixRankedBarNonlinearPattern.h
index bd5bcdf5c1..368cff3307 100644
--- a/alib2data/src/tree/xml/ranked/PrefixRankedBarNonlinearPattern.h
+++ b/alib2data/src/tree/xml/ranked/PrefixRankedBarNonlinearPattern.h
@@ -47,6 +47,17 @@ struct xmlApi < tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > >
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/ranked/PrefixRankedBarPattern.h b/alib2data/src/tree/xml/ranked/PrefixRankedBarPattern.h
index 5fd5ccaae6..e3d70569e2 100644
--- a/alib2data/src/tree/xml/ranked/PrefixRankedBarPattern.h
+++ b/alib2data/src/tree/xml/ranked/PrefixRankedBarPattern.h
@@ -47,6 +47,17 @@ struct xmlApi < tree::PrefixRankedBarPattern < SymbolType, RankType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/ranked/PrefixRankedBarTree.h b/alib2data/src/tree/xml/ranked/PrefixRankedBarTree.h
index 1a0372983b..58e5b0e883 100644
--- a/alib2data/src/tree/xml/ranked/PrefixRankedBarTree.h
+++ b/alib2data/src/tree/xml/ranked/PrefixRankedBarTree.h
@@ -47,6 +47,17 @@ struct xmlApi < tree::PrefixRankedBarTree < SymbolType, RankType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/ranked/PrefixRankedNonlinearPattern.h b/alib2data/src/tree/xml/ranked/PrefixRankedNonlinearPattern.h
index 8a311ed974..2981af0bb4 100644
--- a/alib2data/src/tree/xml/ranked/PrefixRankedNonlinearPattern.h
+++ b/alib2data/src/tree/xml/ranked/PrefixRankedNonlinearPattern.h
@@ -47,6 +47,17 @@ struct xmlApi < tree::PrefixRankedNonlinearPattern < SymbolType, RankType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/ranked/PrefixRankedPattern.h b/alib2data/src/tree/xml/ranked/PrefixRankedPattern.h
index 8e0489c839..20914cd151 100644
--- a/alib2data/src/tree/xml/ranked/PrefixRankedPattern.h
+++ b/alib2data/src/tree/xml/ranked/PrefixRankedPattern.h
@@ -47,6 +47,17 @@ struct xmlApi < tree::PrefixRankedPattern < SymbolType, RankType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/ranked/PrefixRankedTree.h b/alib2data/src/tree/xml/ranked/PrefixRankedTree.h
index 1f16cd053c..398662bee4 100644
--- a/alib2data/src/tree/xml/ranked/PrefixRankedTree.h
+++ b/alib2data/src/tree/xml/ranked/PrefixRankedTree.h
@@ -47,6 +47,17 @@ struct xmlApi < tree::PrefixRankedTree < SymbolType, RankType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/ranked/RankedNonlinearPattern.h b/alib2data/src/tree/xml/ranked/RankedNonlinearPattern.h
index 970049092d..80778c4b55 100644
--- a/alib2data/src/tree/xml/ranked/RankedNonlinearPattern.h
+++ b/alib2data/src/tree/xml/ranked/RankedNonlinearPattern.h
@@ -47,6 +47,17 @@ struct xmlApi < tree::RankedNonlinearPattern < SymbolType, RankType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/ranked/RankedPattern.h b/alib2data/src/tree/xml/ranked/RankedPattern.h
index 2476fb6e29..7eb7795871 100644
--- a/alib2data/src/tree/xml/ranked/RankedPattern.h
+++ b/alib2data/src/tree/xml/ranked/RankedPattern.h
@@ -47,6 +47,17 @@ struct xmlApi < tree::RankedPattern < SymbolType, RankType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/ranked/RankedTree.h b/alib2data/src/tree/xml/ranked/RankedTree.h
index f99889340f..e42fbb975f 100644
--- a/alib2data/src/tree/xml/ranked/RankedTree.h
+++ b/alib2data/src/tree/xml/ranked/RankedTree.h
@@ -47,6 +47,13 @@ struct xmlApi < tree::RankedTree < SymbolType, RankType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
 	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
 		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
 	}
diff --git a/alib2data/src/tree/xml/unranked/PrefixBarTree.h b/alib2data/src/tree/xml/unranked/PrefixBarTree.h
index 89373bd967..4e1c0f04e1 100644
--- a/alib2data/src/tree/xml/unranked/PrefixBarTree.h
+++ b/alib2data/src/tree/xml/unranked/PrefixBarTree.h
@@ -46,6 +46,17 @@ struct xmlApi < tree::PrefixBarTree < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/unranked/UnrankedNonlinearPattern.h b/alib2data/src/tree/xml/unranked/UnrankedNonlinearPattern.h
index d33c9ea887..4ee23dd984 100644
--- a/alib2data/src/tree/xml/unranked/UnrankedNonlinearPattern.h
+++ b/alib2data/src/tree/xml/unranked/UnrankedNonlinearPattern.h
@@ -46,6 +46,17 @@ struct xmlApi < tree::UnrankedNonlinearPattern < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/unranked/UnrankedPattern.h b/alib2data/src/tree/xml/unranked/UnrankedPattern.h
index 6ed06e2744..bfc7dbd1bd 100644
--- a/alib2data/src/tree/xml/unranked/UnrankedPattern.h
+++ b/alib2data/src/tree/xml/unranked/UnrankedPattern.h
@@ -46,6 +46,17 @@ struct xmlApi < tree::UnrankedPattern < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
+	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
+		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
+	}
+
 	/**
 	 * Parsing from a sequence of xml tokens helper.
 	 *
diff --git a/alib2data/src/tree/xml/unranked/UnrankedTree.h b/alib2data/src/tree/xml/unranked/UnrankedTree.h
index de52ad7738..1e74f33536 100644
--- a/alib2data/src/tree/xml/unranked/UnrankedTree.h
+++ b/alib2data/src/tree/xml/unranked/UnrankedTree.h
@@ -46,6 +46,13 @@ struct xmlApi < tree::UnrankedTree < SymbolType > > {
 		return xmlTagName;
 	}
 
+	/**
+	 * \brief Tests whether the token stream starts with this type
+	 *
+	 * \params input the iterator to sequence of xml tokens to test
+	 *
+	 * \returns true if the token stream iterator points to opening tag named with xml tag name of this type, false otherwise.
+	 */
 	static bool first ( const ext::deque < sax::Token >::const_iterator & input ) {
 		return sax::FromXMLParserHelper::isToken ( input, sax::Token::TokenType::START_ELEMENT, xmlTagName ( ) );
 	}
-- 
GitLab