Re: lex input from a queue

sumesh <>
1 May 2002 23:21:54 -0400

          From comp.compilers

Related articles
lex input from a queue (2002-04-29)
Re: lex input from a queue (sumesh) (2002-05-01)
| List of all articles for this month |

From: sumesh <>
Newsgroups: comp.compilers
Date: 1 May 2002 23:21:54 -0400
Organization: The George Washington University
References: 02-04-165
Keywords: lex
Posted-Date: 01 May 2002 23:21:54 EDT

In most of the lex versions you can redefine the function which is
used to take input . But the function which is used to take the input
most of the times is different based on what lex software you are
using .

        So like in the case of the lex found on a lot of systems , the
macros used are called input() and unput .Input reads the character
and returns it back. So just change it to return whatever you want . I
guess in the software you are using its called yygetchar. In flex its
called YY_INPUT and it returns the no of characters read .


"anuradha.k.r" <> wrote
> ...We are planning to store the robot controlling commands
> in a buffer(Queue).This queue should be the input to the lex.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.