File descriptors and streams and copying thereof.

Henry Spencer henry at utzoo.uucp
Sun Apr 16 12:03:50 AEST 1989


In article <10222 at ihlpb.ATT.COM> gregg at ihlpb.ATT.COM (Wonderly) writes:
>> Robert wants to have yyparse() read from a different file.  We did a
>> go-round on this a couple of months ago.  The answer is to provide your
>> own routine named input():
>
>The external symbol, yyin, is a (FILE *) which lex uses to read from.  Yyin
>is initialized with (stdin), so you can just change it to whatever stream you
>need, and then change it back.

We did a go-round on that too a couple of months ago.  Although it's very
attractive, yyin is **NOT** a documented part of the user interface
of lex and hence its use is not portable.
-- 
Welcome to Mars!  Your         |     Henry Spencer at U of Toronto Zoology
passport and visa, comrade?    | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list