Please cc the Help-Bison list, and keep it in subsequent discussion, so that others may help.

  Hans Aberg


On 17 Jan 2007, at 09:56, Kamel SEGHAIER wrote:

Hi Hans,

I'm using traking locations to detect error in my parser, i'm using the macro YYLLOC_DEFAULT ,I define YYRHSLOC(Rhs, K) (Rhs)[K]) and add the directive %locations and %pure_parser but i have always this error :
`Rhs' undeclared (first use in this function).
May I miss some declaration but I don't know exactly ....


int yylex (YYSTYPE * lvalp, YYLTYPE * llocp );
#define YYRHSLOC(Rhs, K) (Rhs)[K])
#define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (N) \ { \ (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC(Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC(Rhs, 0).last_column; \ } \
         while (0)
%}

%locations
%pure-parser

Can u help me.

Best regards.
Kamel




_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to