Revision 49

Date:
2010/11/15 20:11:24
Author:
gdshaw@RISCID.ORG
Revision Log:
Corrected handling of recursive unary rules.
Files:

Legend:

 
Added
 
Removed
 
Modified
  • trunk/parser/grammar.cc

     
    62 62
    63 63 tagset grammar::find(const tagset& tags) const
    64 64 {
    65 tagset result;
    65 tagset result=tags;
    66 66 bool found=true;
    67 67 while (found)
    68 68 {
     
    70 70 for (std::vector<unary_rule>::const_iterator i=_unary_rules.begin();
    71 71 i!=_unary_rules.end();++i)
    72 72 {
    73 if (tags.find(i->arg())&&!result.find(i->result()))
    73 if (result.find(i->arg())&&!result.find(i->result()))
    74 74 {
    75 75 found=true;
    76 76 result|=i->result();