>I'm trying to compile Rayshade.4.0 with gcc 2.5.8 (linux kernel
>1.1.54) and my progress has been thwarted by an "unknown symbol" at
>link time (using gcc 2.5.8). The unknown symbol is the function
>_yylineno, apparently having to do with the yacc/bison -y parser
>(about which I know next to nothing). I have grep-ed and indexed all
>of my libraries and can find none *defining* a function _yylineno.
>Can anyone point me to a library available on the net which does
>define this function (if it is, in fact, a function!).
yylineno is not a function. It is a scalar variable.
The 'lex' program (original vintage, not flex), defines this as the
current line number from the input file. There is no equivalent entry
The usual thing is to keep your own line number. You can do it in the
yyinput routine or change the lexical grammar so that when you have a
token which includes newline, you increment the yylineno.
For example, you may find a token such as:
which says that a rule which starts with "#", contains any text,
followed by end-of-line (newline) is to simply be ignored. Change the
';' to be '++yylineno;'.
If you are going to do this, I would not suggest calling it yylineno
as it will conflict with lex's variable of the same name. Call it your
own variable name and change the references in the rest of the
production from yylineno to your own name. In that manner, either flex
or lex may be used without conflict.
>Please reply by email to the address below.
Fat chance of that. If you wanted the proper mail address, you should
have included the "Reply-To:" header.