|
From: | Hans Aberg |
Subject: | Re: Change yylex name |
Date: | Wed, 2 May 2007 19:53:40 +0200 |
On 2 May 2007, at 15:23, Leviathan wrote:
I have used gnu-flex to generate a lexer. The point is that ihave created a wrapper function which calls int yylex() whose name is for instance my_yylex and has a different signature lets say int my_yylex( char* pointer , int * pointer2 , float * pointer2 ) ;This function apart from calling yylex() has some additional functionality . My question actually is : Is there any way that i can get bison to call this function instead of calling yylex() ?I hope i made some sense .Thanx again
See the Bison 2.3 manual, sec. 4.2.4, "Calling Conventions for Pure Parsers". When you invoke %pure-parser, the arguments of the parser and lexer functions can be set by %parse-param and %lex-param.
Hans Aberg
[Prev in Thread] | Current Thread | [Next in Thread] |