7#include <QtCore/qset.h>
8#include <QtCore/qstack.h>
9#include <QtCore/qmap.h>
10#include <QtCore/qstring.h>
11#include <QtCore/qtextstream.h>
87 {
return rule->rhs.begin (); }
90 {
return rule->rhs.end (); }
93 {
return rule == other.rule && dot == other.dot; }
96 {
return rule != other.rule || dot != other.dot; }
99 {
return dot == rule->rhs.end (); }
134template <
typename _Tp>
148 {
return outs.begin (); }
151 {
return outs.end (); }
154 {
return data == other.data; }
157 {
return data != other.data; }
160 {
return data < other.data; }
187template <
typename _Tp>
190 Node<_Tp> tmp (data);
199template <
typename _Tp>
202 edge_iterator it = std::find (outs.begin (), outs.end (), other);
204 if (it != outs.end ())
208 return {outs.insert (outs.end (), other),
true};
220 Name intern (
const char *id) {
return intern(QString::fromUtf8(id)); }
359 QStack<ReadsGraph::iterator> _M_reads_stack;
362 QStack<IncludesGraph::iterator> _M_includes_stack;
int main(int argc, char *argv[])
[2]
void buildDefaultReduceActions()
IncludesGraph::iterator IncludeNode
void visitReadNode(ReadNode node)
ReadsGraph::iterator ReadNode
void dump(QTextStream &out, IncludeNode incl)
void buildIncludesDigraph()
std::pair< StatePointer, bool > internState(const State &state)
void buildIncludesAndFollows()
Node< Include > IncludesGraph
void visitIncludeNode(IncludeNode node)
void dump(QTextStream &out, const Lookback &lp)
QMultiMap< ItemPointer, Lookback > lookbacks
void closure(StatePointer state)
QMap< ItemPointer, NameSet > lookaheads
CppGenerator(const Recognizer &p, Grammar &grammar, Automaton &aut, bool verbose)
void setWarningsAreErrors(bool e)
void setDebugInfo(bool d)
void setCopyright(bool t)
void operator()(Automaton *a)
QMap< Name, QString > spells
Name intern(const char *id)
int expected_reduce_reduce
QMap< Name, TokenInfo > token_info
bool isNonTerminal(Name name) const
std::list< QString > names
bool isTerminal(Name name) const
void buildExtendedGrammar()
Name intern(const QString &id)
int expected_shift_reduce
bool operator<(const Include &other) const
Include(StatePointer s, Name n)
bool operator==(const Include &other) const
bool operator!=(const Include &other) const
bool isReduceItem() const
bool operator!=(const Item &other) const
NameList::iterator end_rhs() const
bool operator==(const Item &other) const
NameList::iterator begin_rhs() const
Lookback(StatePointer s, Name n)
bool operator<(const Lookback &other) const
bool operator!=(const Lookback &other) const
bool operator==(const Lookback &other) const
The Node class is the base class for all the nodes in QDoc's parse tree.
std::set< Node< _Tp > > Repository
bool operator<(const Node< _Tp > &other) const
std::list< iterator >::iterator edge_iterator
static Repository & repository()
edge_iterator end() const
static iterator get(_Tp data)
bool root
Returns a pointer to the root of the Tree this node is in.
static iterator begin_nodes()
edge_iterator begin() const
std::list< iterator > outs
std::pair< edge_iterator, bool > insertEdge(iterator other) const
bool operator==(const Node< _Tp > &other) const
bool operator!=(const Node< _Tp > &other) const
Repository::iterator iterator
static iterator end_nodes()
void operator()(Automaton *a)
bool operator!=(const Read &other) const
bool operator<(const Read &other) const
Read(StatePointer s, Name n)
bool operator==(const Read &other) const
QT_FORWARD_DECLARE_CLASS(QTextStream)
std::list< Item > ItemList
ItemList::iterator ItemPointer
StateList::iterator StatePointer
std::list< QString >::iterator Name
QMap< Name, StatePointer > Bundle
std::list< State > StateList
std::list< Rule > debug_infot
QMultiMap< Name, RulePointer > RuleMap
QTextStream & operator<<(QTextStream &out, const Rule &r)
debug_infot::iterator RulePointer
std::list< Name > NameList
QTextStream & operator<<(QTextStream &out, const Item &item)
bool operator<(Name a, Name b)
bool operator!=(const State &other) const
std::pair< ItemPointer, bool > insertClosure(const Item &item)
std::pair< ItemPointer, bool > insert(const Item &item)
RulePointer defaultReduce
QMap< Name, NameSet > reads
bool operator==(const State &o) const
QMap< Name, NameSet > follows