Re: Bison Parser negate production rules
- From: George Neuner <gneuner2@xxxxxxxxxxx>
- Date: 26 Mar 2007 09:13:38 -0400
On 23 Mar 2007 22:16:22 -0400, royzlife@xxxxxxxxx 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
.
- Follow-Ups:
- Re: Bison Parser negate production rules
- From: Chris F Clark
- Re: Bison Parser negate production rules
- References:
- Bison Parser negate production rules
- From: royzlife
- Bison Parser negate production rules
- Prev by Date: Re: about syntax trees
- Next by Date: Re: Seeking cheaper alternative to Visual Parse++
- Previous by thread: Bison Parser negate production rules
- Next by thread: Re: Bison Parser negate production rules
- Index(es):