input to the lexx / yacc combination is done via FILE *, called yyin.
for this, stdin is used by default - trawl around lex.yy.c to find it
if you assign FILE * to yyin, lexer will read from this file, you are doing something like
yyin = fopen ("parseme", "rt");
before calling yyparse (), usually in your main ().
source
share