help-flex
[Top][All Lists]
Advanced

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

Re: in-memory scanning


From: Hans Aberg
Subject: Re: in-memory scanning
Date: Wed, 6 Mar 2002 01:47:53 +0100

At 15:04 -0700 2002/03/05, Mark C. Smith wrote:
>I'm using ansi standard c.  The problem is that input comes
>in "sporatic bursts", and I'm working on a real-time application.
>
>Mark
>
>
>On Mar 5, 2002, Hans Aberg wrote the following with Subject "Re: in-memory...:
>
>->At 13:33 -0700 2002/03/05, Mark C. Smith wrote:
>->>Greetings,
>->>I'm trying to scan a string in memory that is updated regularly
>->>(w/ input from an external device hooked up to the serial port).
>->>yywrap is working great on keeping lex from returning prematurely,
>->>but tokens that are split between strings are not recognised.
>->>Lex does recognise tokens that are within a single string, though.
>->>Am I missing something that I need to do?  Thanks!.
>->
>->Which language are you using? -- If you use C++, you might write a
>->std::basic_istream, and hand that over to the Flex generated lexer.
>->
>->  Hans Aberg
>->
>->
>->

I think that C and C++ are the same in that both call a "get character"
function. The lexer will somehow call such a function, and lie waiting
until each character has arrived. All you need is to somehow supply such a
"get character" function then.

  Hans Aberg





reply via email to

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