[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use different yylex ?
From: |
Akim Demaille |
Subject: |
Re: How to use different yylex ? |
Date: |
Thu, 28 Jun 2012 17:04:01 +0200 |
Le 28 juin 2012 à 17:00, Timothy Madden a écrit :
> On 06/28/2012 04:56 PM, Akim Demaille wrote:
>>
>> Le 28 juin 2012 à 15:44, Timothy Madden a écrit :
>>
>>> Hello
>>>
>>> All symbols generated by bison atr included in the yy:: namespace (in the
>>> yy::parser class actually), except the yylex function.
>>>
>>> Is there a way to change the name for yylex function ? So it does not have
>>> to be a global function ? Or even a way to use yylex() method on an object
>>> of class yyFlexLexer ? Other than using #define yylex, which I think is not
>>> very friendly ?
>>
>> Read the documentation of YY_DECL.
>
> YY_DECL looks like the domain of flex, and I did not find it in the bison
> documentation. Is it meant to work in bison nonetheless ?
Bison calls "yylex" without specifying the namespace, so if you defined
yy::yylex for instance, it will work.
Read the generated code.