2024-12-13 09:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/compiler/harbour.y
* src/macro/macro.y
* replaced depreciated bison macro %pure-parser with %define api.pure
* src/compiler/complex.c
* src/macro/macrolex.c
* src/compiler/harbour.y
* src/macro/macro.y
* replaced depreciated bison macro %name-prefix with %define api.prefix
; Warning: now Bison 2.6 or newer is required to regenerate Harbour grammar
files. If someone wants/needs to work with older bison versions
then it's enough to restore depreciated macros, Harbour compiler
and macros lexers will work with both versions.
* src/compiler/harbour.yyc
* src/compiler/harbour.yyh
* src/macro/macro.yyc
* src/macro/macro.yyh
* regenerated with Bison 3.02 (the same as before)
* re-added HB_SYMBOL_UNUSED( yynerrs ) to pacify some compilers warnings
This commit is contained in:
@@ -7,6 +7,29 @@
|
||||
Entries may not always be in chronological/commit order.
|
||||
See license at the end of file. */
|
||||
|
||||
2024-12-13 09:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/compiler/harbour.y
|
||||
* src/macro/macro.y
|
||||
* replaced depreciated bison macro %pure-parser with %define api.pure
|
||||
|
||||
* src/compiler/complex.c
|
||||
* src/macro/macrolex.c
|
||||
* src/compiler/harbour.y
|
||||
* src/macro/macro.y
|
||||
* replaced depreciated bison macro %name-prefix with %define api.prefix
|
||||
|
||||
; Warning: now Bison 2.6 or newer is required to regenerate Harbour grammar
|
||||
files. If someone wants/needs to work with older bison versions
|
||||
then it's enough to restore depreciated macros, Harbour compiler
|
||||
and macros lexers will work with both versions.
|
||||
|
||||
* src/compiler/harbour.yyc
|
||||
* src/compiler/harbour.yyh
|
||||
* src/macro/macro.yyc
|
||||
* src/macro/macro.yyh
|
||||
* regenerated with Bison 3.02 (the same as before)
|
||||
* re-added HB_SYMBOL_UNUSED( yynerrs ) to pacify some compilers warnings
|
||||
|
||||
2024-12-12 21:30 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/compiler/genc.c
|
||||
! fixed detection of C function written in C inside
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
#include "hbdate.h"
|
||||
#include "harboury.h"
|
||||
|
||||
#ifdef HB_COMP_YYSTYPE_IS_DECLARED
|
||||
# define YYSTYPE HB_COMP_YYSTYPE
|
||||
#endif
|
||||
|
||||
#define HB_PP_LEX_SELF(t) ( HB_PP_TOKEN_TYPE((t)->type) == HB_PP_TOKEN_SEND && \
|
||||
(t)->pNext && (t)->pNext->spaces == 0 && \
|
||||
HB_PP_TOKEN_TYPE((t)->pNext->type) == HB_PP_TOKEN_SEND )
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
%pure-parser
|
||||
%define api.pure
|
||||
%parse-param { PHB_COMP pComp }
|
||||
%lex-param { PHB_COMP pComp }
|
||||
%name-prefix "hb_comp_yy"
|
||||
%define api.prefix {hb_comp_yy}
|
||||
|
||||
%{
|
||||
/*
|
||||
* Compiler YACC rules and actions
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -33,17 +33,25 @@
|
||||
#ifndef YY_HB_COMP_YY_HARBOURY_H_INCLUDED
|
||||
# define YY_HB_COMP_YY_HARBOURY_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#ifndef HB_COMP_YYDEBUG
|
||||
# if defined YYDEBUG
|
||||
#if YYDEBUG
|
||||
# define HB_COMP_YYDEBUG 1
|
||||
# else
|
||||
# define HB_COMP_YYDEBUG 0
|
||||
# endif
|
||||
# else /* ! defined YYDEBUG */
|
||||
# define HB_COMP_YYDEBUG 0
|
||||
# endif /* ! defined YYDEBUG */
|
||||
#endif /* ! defined HB_COMP_YYDEBUG */
|
||||
#if HB_COMP_YYDEBUG
|
||||
extern int hb_comp_yydebug;
|
||||
#endif
|
||||
|
||||
/* Token type. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
enum yytokentype
|
||||
#ifndef HB_COMP_YYTOKENTYPE
|
||||
# define HB_COMP_YYTOKENTYPE
|
||||
enum hb_comp_yytokentype
|
||||
{
|
||||
FUNCTION = 258,
|
||||
PROCEDURE = 259,
|
||||
@@ -159,11 +167,11 @@ extern int hb_comp_yydebug;
|
||||
#endif
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
union YYSTYPE
|
||||
#if ! defined HB_COMP_YYSTYPE && ! defined HB_COMP_YYSTYPE_IS_DECLARED
|
||||
typedef union HB_COMP_YYSTYPE HB_COMP_YYSTYPE;
|
||||
union HB_COMP_YYSTYPE
|
||||
{
|
||||
#line 125 "harbour.y" /* yacc.c:1909 */
|
||||
#line 126 "harbour.y" /* yacc.c:1909 */
|
||||
|
||||
const char * string; /* to hold a string returned by lex */
|
||||
int iNumber; /* to hold a temporary integer number */
|
||||
@@ -202,10 +210,10 @@ union YYSTYPE
|
||||
} asCodeblock;
|
||||
PHB_VARTYPE asVarType;
|
||||
|
||||
#line 206 "harboury.h" /* yacc.c:1909 */
|
||||
#line 214 "harboury.h" /* yacc.c:1909 */
|
||||
};
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define HB_COMP_YYSTYPE_IS_TRIVIAL 1
|
||||
# define HB_COMP_YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
%pure-parser
|
||||
%define api.pure
|
||||
%parse-param { PHB_MACRO pMacro }
|
||||
%lex-param { PHB_MACRO pMacro }
|
||||
%name-prefix "hb_macro_yy"
|
||||
%define api.prefix {hb_macro_yy}
|
||||
|
||||
%{
|
||||
/*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -33,17 +33,25 @@
|
||||
#ifndef YY_HB_MACRO_YY_MACROY_H_INCLUDED
|
||||
# define YY_HB_MACRO_YY_MACROY_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#ifndef HB_MACRO_YYDEBUG
|
||||
# if defined YYDEBUG
|
||||
#if YYDEBUG
|
||||
# define HB_MACRO_YYDEBUG 1
|
||||
# else
|
||||
# define HB_MACRO_YYDEBUG 0
|
||||
# endif
|
||||
# else /* ! defined YYDEBUG */
|
||||
# define HB_MACRO_YYDEBUG 0
|
||||
# endif /* ! defined YYDEBUG */
|
||||
#endif /* ! defined HB_MACRO_YYDEBUG */
|
||||
#if HB_MACRO_YYDEBUG
|
||||
extern int hb_macro_yydebug;
|
||||
#endif
|
||||
|
||||
/* Token type. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
enum yytokentype
|
||||
#ifndef HB_MACRO_YYTOKENTYPE
|
||||
# define HB_MACRO_YYTOKENTYPE
|
||||
enum hb_macro_yytokentype
|
||||
{
|
||||
IDENTIFIER = 258,
|
||||
NIL = 259,
|
||||
@@ -87,9 +95,9 @@ extern int hb_macro_yydebug;
|
||||
#endif
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
union YYSTYPE
|
||||
#if ! defined HB_MACRO_YYSTYPE && ! defined HB_MACRO_YYSTYPE_IS_DECLARED
|
||||
typedef union HB_MACRO_YYSTYPE HB_MACRO_YYSTYPE;
|
||||
union HB_MACRO_YYSTYPE
|
||||
{
|
||||
#line 140 "macro.y" /* yacc.c:1909 */
|
||||
|
||||
@@ -120,14 +128,14 @@ union YYSTYPE
|
||||
} valDouble;
|
||||
struct
|
||||
{
|
||||
long date; /* to hold julian date */
|
||||
long date; /* to hold Julian date */
|
||||
long time; /* to hold milliseconds */
|
||||
} valTimeStamp;
|
||||
|
||||
#line 128 "macroy.h" /* yacc.c:1909 */
|
||||
#line 136 "macroy.h" /* yacc.c:1909 */
|
||||
};
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define HB_MACRO_YYSTYPE_IS_TRIVIAL 1
|
||||
# define HB_MACRO_YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,10 @@
|
||||
#include "hbdate.h"
|
||||
#include "macroy.h"
|
||||
|
||||
#ifdef HB_MACRO_YYSTYPE_IS_DECLARED
|
||||
# define YYSTYPE HB_MACRO_YYSTYPE
|
||||
#endif
|
||||
|
||||
typedef struct _HB_MACRO_LEX
|
||||
{
|
||||
const char * pString;
|
||||
|
||||
Reference in New Issue
Block a user