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 916 of 2,753    |
|    George Neuner to royzlife@gmail.com    |
|    Re: Bison Parser negate production rules    |
|    26 Mar 07 09:13:38    |
      From: gneuner2@comcast.net              On 23 Mar 2007 22:16:22 -0400, royzlife@gmail.com wrote:              >Can any one help in explaining how to negate a production rule in       >Bison parser?       >e.g A:B       > B: C       > |D       > |E       > (here i want to write a block of statements or rules which will be       >executed if B doesnt match to C/D/E.)       >       >[Basically, you can't other than by enumerating all of the other       >possibilities. What do you really want to do here? -John]              There is no way to specify the complement of a rule because it isn't a       terribly useful thing to do. Context free languages are drawn from an       infinite set of strings, the complement of any particular subset of a       language is also an infinite set of strings. Not very practical to       match.              If you can tell us more about what you are trying to do, we might be       able to suggest some alternatives.              George              --- 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