LEX Question
Mark Nagel
nagel at paris.ics.uci.edu
Sat Feb 18 05:08:52 AEST 1989
In article <1989Feb15.200741.15963 at utzoo.uucp>, henry at utzoo (Henry Spencer) writes:
|In article <9580001 at hpcuhb.HP.COM> najmi at hpcuhb.HP.COM (Farrukh Najmi) writes:
|>... one can make it read from a file (using file pointer)
|>by declaring the file pointer variable and then assigning
|>it to yyin...
|
|Be careful: this is not a documented feature, at least not in all versions
|of lex, and therefore should not be relied on too heavily in portable code.
Is there any reason (other than losing stdin) that you couldn't just
freopen stdin to the new input file? That should be portable enough...
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