Ticket #49074: patch-lalr.diff

File patch-lalr.diff, 1.4 KB (added by casey.webster@…, 9 years ago)
  • qtbase/src/tools/qlalr/lalr.cpp

    old new  
    238238  non_terminals.insert (accept_symbol);
    239239}
    240240
    241 struct _Nullable: public std::unary_function<Name, bool>
     241struct Nullable: public std::unary_function<Name, bool>
    242242{
    243243  Automaton *_M_automaton;
    244244
    245   _Nullable (Automaton *aut):
     245  Nullable (Automaton *aut):
    246246    _M_automaton (aut) {}
    247247
    248248  bool operator () (Name name) const
     
    300300
    301301      for (RulePointer rule = _M_grammar->rules.begin (); rule != _M_grammar->rules.end (); ++rule)
    302302        {
    303           NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (_Nullable (this)));
     303          NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (Nullable (this)));
    304304
    305305          if (nn == rule->rhs.end ())
    306306            changed |= nullables.insert (rule->lhs).second;
     
    635635                  if (! _M_grammar->isNonTerminal (*A))
    636636                    continue;
    637637
    638                   NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (_Nullable (this)));
     638                  NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (Nullable (this)));
    639639                  if (first_not_nullable != rule->rhs.end ())
    640640                    continue;
    641641