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>
28typedef std::list<QString>::iterator
Name;
39typedef QMultiMap<Name, RulePointer>
RuleMap;
46typedef QMap<Name, StatePointer>
Bundle;
87 {
return rule->rhs.begin (); }
89 inline NameList::iterator
end_rhs ()
const
90 {
return rule->rhs.end (); }
99 {
return dot ==
rule->rhs.end (); }
134template <
typename _Tp>
148 {
return outs.begin (); }
151 {
return outs.end (); }
178 mutable std::list<iterator>
outs;
187template <
typename _Tp>
190 Node<_Tp> tmp (
data);
193 if (
it != repository ().
end ())
196 return repository ().
insert (tmp).first;
199template <
typename _Tp>
204 if (
it != outs.
end ())
208 return {outs.insert (outs.end (),
other),
true};
223 {
return terminals.find (
name) != terminals.end (); }
226 {
return non_terminals.find (
name) != non_terminals.end (); }
228 void buildRuleMap ();
229 void buildExtendedGrammar ();
314 std::pair<StatePointer, bool> internState (
const State &
state);
323 void buildNullables ();
325 void buildLookbackSets ();
327 void buildDirectReads ();
328 void buildReadsDigraph ();
332 void buildIncludesAndFollows ();
333 void buildIncludesDigraph ();
336 void buildLookaheads ();
338 void buildDefaultReduceActions ();
359 QStack<ReadsGraph::iterator> _M_reads_stack;
362 QStack<IncludesGraph::iterator> _M_includes_stack;
ReadsGraph::iterator ReadNode
void dump(QTextStream &out, ReadNode rd)
IncludesGraph::iterator IncludeNode
Node< Include > IncludesGraph
QMultiMap< ItemPointer, Lookback > lookbacks
QMap< ItemPointer, NameSet > lookaheads
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
int expected_shift_reduce
Include(StatePointer s, Name n)
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
bool operator<(const Node< _Tp > &other) const
static Repository & repository()
edge_iterator end() const
static iterator get(_Tp data)
static iterator begin_nodes()
edge_iterator begin() const
std::list< iterator > outs
std::pair< edge_iterator, bool > insertEdge(iterator other) const
std::list< iterator >::iterator edge_iterator
bool operator==(const Node< _Tp > &other) const
bool operator!=(const Node< _Tp > &other) const
Repository::iterator iterator
std::set< Node< _Tp > > Repository
static iterator end_nodes()
iterator find(const T &value)
iterator insert(const T &value)
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Read(StatePointer s, Name n)
QSet< QString >::iterator it
QT_BEGIN_NAMESPACE QTextStream & qerr()
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
debug_infot::iterator RulePointer
std::list< Name > NameList
Combined button and popup list for selecting options.
constexpr bool operator!=(const timespec &t1, const timespec &t2)
DBusConnection const char * rule
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
static bool operator<(const QSettingsIniKey &k1, const QSettingsIniKey &k2)
static QString dump(const QByteArray &)
QRandomGenerator64 rd
[10]
QTextStream out(stdout)
[7]
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