actions before parsing rules in lex n yacc

Hi ,

We have developed a grammer for our domain language using lex n yacc.
I want to know is there any pre defined lex-yacc function which gets call before executing any rule (or rules).
Oue requirement is, before processing any rule ,we want to perform some specific actions ?
is there any pre defined lex-yacc function which get call before processing rules?

In case of ANTLR (Another Tool for Language Recognition), we can specify actions before processing rule using a block "@init" . Is there anything like "@init" in lex n yacc ?

Regards,
Suprit