Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,707 of 2,753    |
|    gah4 to our moderator    |
|    Re: How detect grammar not derive nonter    |
|    14 Sep 23 20:04:30    |
      From: gah4@u.washington.edu              (our moderator wrote)              > [At the very least, you'd need some rules that don't have nonterminals       > on the right side to make it possible to break loops. -John]              So do it by back propagation.              Mark all rules that have a terminal on the right side.              Mark all rules that have a rule that has a terminal on the right side.              Repeat until there aren't any more to mark.              Any unmarked rules don't ever reach a terminal.       [It's not quite that, it's rules that have no nonterminals, that       is, either just terminals or empty. This will recognize a       possibly empty sequence of x's:              A: /* nothing */       A: x A              -John]              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca