LEX Question
Simon Elliott
sme at computing-maths.cardiff.ac.uk
Wed Mar 8 06:06:16 AEST 1989
In article <416 at chem.ucsd.EDU>, tps at chem.ucsd.edu (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.
But if you look again, you will notice that this and unput() are the only
uses of these variables, so there is no objection to using other
variables in your own input macros/functions.
--
--------------------------------------------------------------------------
Simon Elliott Internet: sme%v1.cm.cf.ac.uk at cunyvm.cuny.edu
UWCC Computer Centre JANET: sme at uk.ac.cf.cm.v1
40/41 Park Place UUCP: {backbones}!mcvax!ukc!reading!cf-cm!sme
Cardiff, Wales PHONE: +44 222 874300
More information about the Comp.lang.c
mailing list