LEX Question
Mark Nagel
nagel at paris.ics.uci.edu
Sat Feb 25 04:26:14 AEST 1989
In article <416 at chem.ucsd.EDU>, tps at chem (Tom Stockfisch) writes:
|
|I must be missing something. Looking at lex.yy.c on my machine shows that
|input() is defined as
|
|# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10? \
| (yylineno++,yytchar):yytchar)==EOF?0:yytchar)
|
|so if I re-#define input(), don't I have to use yytchar,yysptr, and yysbuf?
|I would assume one of these would be more likely to change than yyin.
If you redefine input() in lex, you'd most likely redefine it in such
a way that you'd manage the input entirely yourself. So you would have
no need for lex's internal input management.
Mark Nagel @ UC Irvine, Dept of Info and Comp Sci
ARPA: nagel at ics.uci.edu | Charisma doesn't have jelly in the
UUCP: {sdcsvax,ucbvax}!ucivax!nagel | middle. -- Jim Ignatowski
More information about the Comp.lang.c
mailing list