OK, found a pratical answer. to get the
extern int yylineno;
in the first part of the Bison file
Edit- the same way can help with getting the token from the lex file, just write in the Bison file: extern NODEPTR yylval;
*yylval in my project is defined as NODEPTR, if you did not change it you should use int (the default declaration for it)