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 238 238 non_terminals.insert (accept_symbol); 239 239 } 240 240 241 struct _Nullable: public std::unary_function<Name, bool>241 struct Nullable: public std::unary_function<Name, bool> 242 242 { 243 243 Automaton *_M_automaton; 244 244 245 _Nullable (Automaton *aut):245 Nullable (Automaton *aut): 246 246 _M_automaton (aut) {} 247 247 248 248 bool operator () (Name name) const … … 300 300 301 301 for (RulePointer rule = _M_grammar->rules.begin (); rule != _M_grammar->rules.end (); ++rule) 302 302 { 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))); 304 304 305 305 if (nn == rule->rhs.end ()) 306 306 changed |= nullables.insert (rule->lhs).second; … … 635 635 if (! _M_grammar->isNonTerminal (*A)) 636 636 continue; 637 637 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))); 639 639 if (first_not_nullable != rule->rhs.end ()) 640 640 continue; 641 641