help-flex
[Top][All Lists]
Advanced

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

Re: input is provided thru buffer instead of a file


From: W. L. Estes
Subject: Re: input is provided thru buffer instead of a file
Date: Thu, 20 Dec 2001 14:49:58 -0500

> I'm using bison & flex to parse the rxd bytes.
> If inputs (rxd bytes from the network) to the flex, are provided as a char
> buffer [instead of a file stream],
> which one of the following should be used so that yylex( ) will start
> scaning the char buffer?
> 1. yy_scan_string(const char *str);
> 2.yy_scan_bytes(const char *bytes,int len);

See the discussion in the flex manual for the differences between the
functions you mention. Depending on how you structure your data and
what assumptions you can and can't make about it, the various provided
functions may or may not be appropriate.

--Will



reply via email to

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