Saludos al Forum
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.
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.
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.
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.
#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;
聽 聽 }
}