[prog] Elementary 'C' question

Kathryn Andersen kat_lists at katspace.com
Sun Nov 14 23:14:50 EST 2004


On Sun, Nov 14, 2004 at 11:37:40AM +0000, David Sumbler wrote:
> My question is: why is 'yyin' shown as 'extern', since it only seems
> to be mentioned in this file, and is presumably defined by the 'extern
> FILE *yyin' line?

Are there any files in the source called "(something).y" or
"(something).l"?  Because "yyin" is one of the variables defined by yacc
+ lex (I can't remember which one), the compiler-compiler and lexer (or
by their clones, bison and flex etc).  Folks often use yacc + lex if
they have non-simple files that they have to read and parse, as it
simplifies the task of parsing the format of said files -- even though
YACC stands for Yet Another Compiler Compiler, the things that it
defines don't have to be programming languages, just non-trivial
"languages" (which could be configuration files, or whatever).

So my suspicion is that this program is using that as part of what it
does.  The "yyin" file is the file which the parser expects its input to
come from.

Kathryn Andersen
-=-=-=-=-=-=-=-=-
A year spent in artificial intelligence is enough to make one believe in
God.
	-- from the .sig of CrudPuppy on slashdot.org
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe



More information about the Programming mailing list