Le 28 juil. 2010 à 15:21, tys lefering a écrit : Thanks for the detailed report Tys!
Paul, did you see that? > > Hi, > > When creating a glr parser with 'bison --debug' > from bison master git repo the resulting parser > has this error now, it did not have before glr changes: > > dot-grammar-parser.c: In function ‘yy_reduce_print’: > dot-grammar-parser.c:2347:39: error: ‘yyvsp’ undeclared (first use in this > function) > dot-grammar-parser.c:2347:39: note: each undeclared identifier is reported > only once for each function it appears in > dot-grammar-parser.c:2347:46: error: ‘yylow’ undeclared (first use in this > function) > > in yy_reduce_print() is > > yy_symbol_print (stderr, > yystos[yyrhsVals[yyi - yynrhs + 1].yystate.yylrState], > &yyrhsVals[yyi - yynrhs + 1].yystate.yysemantics.yysval > , &(((yyGLRStackItem const *)yyvsp)[YYFILL ((yyi + 1) - > (yynrhs))].yystate.yyloc) ); > > and YYFILL is: > # undef YYFILL > # define YYFILL(N) yyfill (yyvsp, &yylow, N, yynormal) > > also when compiling from bison master git repo had to change > in flex-scanner.h this line in: > > yy_size_t FLEX_PREFIX (get_leng) (void); > > at compilation with gcc warning -Wconversion -Wno-sign-conversion > warnings appear about bison and in the generated parsers, used it > to check for conversions to smaller data types and possible overflow. > > dot-grammar-parser.c:3127:3: warning: conversion to ‘yySymbol’ from ‘int’ > may alter its value > dot-grammar-parser.c:3128:3: warning: conversion to ‘yybool’ from ‘int’ > may alter its value > > in the glr parser is: > > /** Grammar symbol */ > typedef short int yySymbol; > > #ifdef __cplusplus > typedef bool yybool; > #else > typedef unsigned char yybool; > #endif > > yybool is 0 or 1, unsigned char should be no problem. > but yySymbol from int to short int ? > > see also: > > http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Warning-Options.html#Warning-Options > > bison --version reports: > > bison (GNU Bison) 2.4.520-4276-dirty > Written by Robert Corbett and Richard Stallman. > > Copyright (C) 2010 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > Compiled on opensuse 11.4 test version with gcc: > gcc (SUSE Linux) 4.5.0 20100722 [gcc-4_5-branch revision 162408] > Copyright (C) 2010 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > Does someone know more about the glr and --debug option issue. > Thanks, > Tys. > > > -- > > >
