Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Static Public Member Functions
core::xmlApi< grammar::LG< TerminalSymbolType, NonterminalSymbolType > > Struct Template Reference

#include <LG.h>

Static Public Member Functions

static std::string xmlTagName ()
 The XML tag name of class. More...
 
static bool first (const ext::deque< sax::Token >::const_iterator &input)
 Tests whether the token stream starts with this type. More...
 
static grammar::LG< TerminalSymbolType, NonterminalSymbolType > parse (ext::deque< sax::Token >::iterator &input)
 
static void parseRule (ext::deque< sax::Token >::iterator &input, grammar::LG< TerminalSymbolType, NonterminalSymbolType > &grammar)
 
static void compose (ext::deque< sax::Token > &out, const grammar::LG< TerminalSymbolType, NonterminalSymbolType > &grammar)
 
static void composeRules (ext::deque< sax::Token > &out, const grammar::LG< TerminalSymbolType, NonterminalSymbolType > &grammar)
 

Member Function Documentation

◆ compose()

template<class TerminalSymbolType , class NonterminalSymbolType >
void core::xmlApi< grammar::LG< TerminalSymbolType, NonterminalSymbolType > >::compose ( ext::deque< sax::Token > &  out,
const grammar::LG< TerminalSymbolType, NonterminalSymbolType > &  grammar 
)
static

Composing to a sequence of xml tokens helper.

Parameters
outsink for new xml tokens representing the grammar
grammarthe grammar to compose
Here is the call graph for this function:

◆ composeRules()

template<class TerminalSymbolType , class NonterminalSymbolType >
void core::xmlApi< grammar::LG< TerminalSymbolType, NonterminalSymbolType > >::composeRules ( ext::deque< sax::Token > &  out,
const grammar::LG< TerminalSymbolType, NonterminalSymbolType > &  grammar 
)
static

Helper for composing rules of the grammar to a sequence of xml tokens.

Parameters
outsink for xml tokens representing the rules of the grammar
grammarthe grammar to compose
Here is the call graph for this function:

◆ first()

template<class TerminalSymbolType , class NonterminalSymbolType >
static bool core::xmlApi< grammar::LG< TerminalSymbolType, NonterminalSymbolType > >::first ( const ext::deque< sax::Token >::const_iterator &  input)
inlinestatic

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.
Here is the call graph for this function:

◆ parse()

template<class TerminalSymbolType , class NonterminalSymbolType >
grammar::LG< TerminalSymbolType, NonterminalSymbolType > core::xmlApi< grammar::LG< TerminalSymbolType, NonterminalSymbolType > >::parse ( ext::deque< sax::Token >::iterator &  input)
static

Parsing from a sequence of xml tokens helper.

\params input the iterator to sequence of xml tokens to parse from

Returns
the new instance of the grammar
Here is the call graph for this function:

◆ parseRule()

template<class TerminalSymbolType , class NonterminalSymbolType >
void core::xmlApi< grammar::LG< TerminalSymbolType, NonterminalSymbolType > >::parseRule ( ext::deque< sax::Token >::iterator &  input,
grammar::LG< TerminalSymbolType, NonterminalSymbolType > &  grammar 
)
static

Helper for parsing of individual rules of the grammar from a sequence of xml tokens.

\params input the iterator to sequence of xml tokens to parse from \params grammar the grammar to add the rule to

Here is the call graph for this function:

◆ xmlTagName()

template<class TerminalSymbolType , class NonterminalSymbolType >
static std::string core::xmlApi< grammar::LG< TerminalSymbolType, NonterminalSymbolType > >::xmlTagName ( )
inlinestatic

The XML tag name of class.

Intentionaly a static member function to be safe in the initialisation before the main function starts.

Returns
string representing the XML tag name of the class

The documentation for this struct was generated from the following file: