help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: YY_CURRENT_BUFFER undeclared


From: Hans-Bernhard Broeker
Subject: Re: YY_CURRENT_BUFFER undeclared
Date: Thu, 04 Dec 2003 18:19:12 +0100 (CET)

On Thu, 4 Dec 2003, Buday Gergely wrote:

> Herr Broeker wrote:
> 
> > You're trying to use a macro generated by flex, but from a source file
> > that has *no* connection to flex output.  
> > 
> > YY_CURRENT_BUFFER cannot be available outside the flex-generated .c source
> > file.
> 
> Why is this? yy_scan_string, for example, _is_ available from outside.

Because it's a *macro*, not an external function.  At the minimum, you'ld
have to use the new %option header-file to generate a file and let your C
code #include that.  I don't think flex-2.5.4 even has that option yet.

But even then, I'm not sure YY_CURRENT_BUFFER is considered part of the
"external flex API" that is supposed to be contained in such a header.

-- 
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]