[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Disabling Actions
From: |
Ramaswamy R |
Subject: |
Re: Disabling Actions |
Date: |
Mon, 16 Oct 2006 11:34:03 +0530 |
Hi,
I don't know if bison supports this as such. I believe its been in the wish
list, to have a statement that would be executed at the start of every
action. We have nothing more than %initial-action. But you could do this
with the following macros.
#define CURB_ACTION 0 // Depending on if u want to enable / disable actions
#define ON_ACTION_START if ( CURB_ACTION ) return yyok
and add this statement as the 1st in every action (its painful but one-time
effort) -
ON_ACTION_START;
This should help in enabling / disabling actions as and when required :).
Hope this helps.
Regards
Ramaswamy
On 10/16/06, Paulo J. Matos <address@hidden> wrote:
Hi all,
I've developed a parter with flex/bison and I would like to find a
simple way to check how long it takes to parse the file without
executing the actions. Is there an option I can enable to ignore
actions?
Regards,
--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK
_______________________________________________
address@hidden http://lists.gnu.org/mailman/listinfo/help-bison
--
"Chaos is the rule in nature, not an exception"
http://samy-scribbles.blogspot.com