lex, yacc question

Lawrence Plona plona at romulus.rutgers.edu
Thu Jun 13 09:22:57 AEST 1991


From: ricks at nrl.navy.mil (Richard Schumeyer)
> Is there a way to get lex and yacc to read from somewhere other than
> stdin?  

   yacc declares "FILE *yyin".  A pre-processor might be set up like:

   extern FILE *yyin;

   yyin = popen( "/usr/bin/m4 infile", "r" );
   yyparse();
   pclose( yyin );
-- 

Sit denique inscriptum in fronte unius  "Let it finally be written on
cuiusque quid de rebus publicis sentiat  the forehead of each man what he
- Cicero                                 thinks of open systems"



More information about the Comp.unix.programmer mailing list