[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Conditional generation of Grammar rules
From: |
Jeganatan, Srividhya |
Subject: |
Conditional generation of Grammar rules |
Date: |
Tue, 2 May 2006 12:37:33 -0400 |
All,
Is there a way to conditionally generate grammar rules?
For example, I need to do something like
nonterminal X:
#ifdef FEATURE
{ rule 1 }
#else
{ rule 1; rule 2 }
#endif
I know that ifdefs dont work with the grammar but is there anything else
that can be done?
Or is it possible to make bison to read define variables from a make file?
I want to avoid writing different parsers / recursive parsers to do this.
Thanks for your help.
Srividhya.
- Conditional generation of Grammar rules,
Jeganatan, Srividhya <=