help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to negate a non-terminal ?


From: Samkit Jain
Subject: How to negate a non-terminal ?
Date: Sun, 3 May 2009 19:16:46 +0530

Let say there are 5 non-terminal symbols:

nt_1
nt_2
nt_3
nt_4
nt_5

In nt_5, I want to use every other non-terminal except nt_2.
For this I have to write like:

nt_5:    /* empty */          { ... }
 |          nt_5 nt_1             { ... }
 |          nt_5 nt_3             { ... }
 |          nt_5 nt_4             { ... }
 ;


Now my question is that, is there any way by which I can negate nt_2 while
creating nt_5 ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]