8#include <QtCore/qtextstream.h>
31 out <<
" * " << *
item;
40 for (Bundle::iterator arrow =
state->bundle.begin (); arrow !=
state->bundle.end (); ++arrow)
42 if (!
g->isTerminal (arrow.key ()))
50 out <<
" " << *arrow.key () <<
" shift, and go to state " << std::distance (aut->
states.begin (), *arrow) <<
Qt::endl;
65 for (
const Name &la : lookaheads)
66 out <<
" " << *la <<
" reduce using rule " << aut->
id (
item->rule) <<
" (" << *
item->rule->lhs <<
")" <<
Qt::endl;
70 for (Bundle::iterator arrow =
state->bundle.begin (); arrow !=
state->bundle.end (); ++arrow)
72 if (!
g->isNonTerminal (arrow.key ()))
80 out <<
" " << *arrow.key () <<
" go to state " << std::distance (aut->
states.begin (), *arrow) <<
Qt::endl;
83 if (
state->defaultReduce !=
g->rules.end ())
86 <<
" $default reduce using rule " << aut->
id (
state->defaultReduce) <<
" (" << *
state->defaultReduce->lhs <<
")" <<
Qt::endl;
QMap< ItemPointer, NameSet > lookaheads
ParseTable(QTextStream &out)
void operator()(Automaton *a)
T value(const Key &key, const T &defaultValue=T()) const
ItemList::iterator ItemPointer
StateList::iterator StatePointer
std::list< QString >::iterator Name
debug_infot::iterator RulePointer
QTextStream & endl(QTextStream &stream)
Writes '\n' to the stream and flushes the stream.
DBusConnection const char * rule
QTextStream out(stdout)
[7]