Trato de crear la contribucion de xharbour una version vieja al dar este instrucion da error
bison -v -d source\compiler\harbour.sly -oobj\b32\harboury.c
** error 1 ** deleting obj\b32\harboury.c
Este es el error
source\compiler\harbour.sly:1809.56-67: Integer Out of range '$lNumber'
Estes e un trozo de codigo harbour.sly
esta es la instrucion que da error
| EmptyStatements LineStat { $<lNumber>$ += $<lNumber>3; }
Hago es cambio, coloco 2 en vez 3 y pasa el bison.
- Code: Select all Expand view
IfEndif : IfBegin EndIf { hb_compGenJumpHere( $1 ); }
| IfBegin IfElse EndIf { hb_compGenJumpHere( $1 ); }
| IfBegin IfElseIf EndIf { hb_compGenJumpHere( $1 ); hb_compElseIfFix( $2 ); }
| IfBegin IfElseIf IfElse EndIf { hb_compGenJumpHere( $1 ); hb_compElseIfFix( $2 ); }
;
EmptyStatements : LineStat { $<lNumber>$ = $<lNumber>1; }
| EmptyStatements LineStat { $<lNumber>$ += $<lNumber>3; }
;
EmptyStats : /* empty */ { $<lNumber>$ = 0; }
| EmptyStatements { $<lNumber>$ = $<lNumber>1; }
ahora el erroror esta en harbour.c
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
bison -v -d source\compiler\harbour.sly -oobj\b32\harboury.c
bcc32 -c -Iinclude;source\compiler;source\macro -d -5 -6 -OS -a8 -DHB_FM_STATISTICS_OFF -O2 -D__EXPORT__ -DHB_GUI -tWM -DHB_FM_STATISTICS_OFF -DHB_INCLUDE_WINEXCHANDLER -DHARBOUR_MAIN_WIN -d -a8 -OS -O2 -5 -6 -DSIMPLEX -oobj\b32\harboury.obj obj\b32\harboury.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
obj\b32\harboury.c:
Warning W8004 obj\\b32\\harboury.c 3356: 'yymsg' is assigned a value that is never used in function yydestruct
Error E2040 obj\\b32\\harboury.c 3418: Declaration terminated incorrectly
*** 1 errors in Compile ***
** error 1 ** deleting obj\b32\harboury.obj
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
bcc32 -DHB_THREAD_SUPPORT -c -Iinclude;source\compiler;source\macro -d -5 -6 -OS -a8 -DHB_FM_STATISTICS_OFF -O2 -D__EXPORT__ -DHB_GUI -tWM -DHB_FM_STATISTICS_OFF -DHB_INCLUDE_WINEXCHANDLER -DHARBOUR_MAIN_WIN -d -a8 -OS -O2 -5 -6 -DSIMPLEX -oobj\b32\harboury.obj obj\b32\harboury.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
obj\b32\harboury.c:
Warning W8004 obj\\b32\\harboury.c 3356: 'yymsg' is assigned a value that is never used in function yydestruct
Error E2040 obj\\b32\\harboury.c 3418: Declaration terminated incorrectly
*** 1 errors in Compile ***
** error 1 ** deleting obj\b32\harboury.obj
pero esta extension harboury.c lo construye el bison, alquien me puede orientar.
- Code: Select all Expand view
#if defined (__STDC__) || defined (__cplusplus)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yymsg, yytype, yyvaluep)
const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
#endif
{
/* Pacify ``unused variable'' warnings. */
(void) yyvaluep;
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
default:
break;
}
}