X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/56ca3d8fce0c9db2f2829d7a7a07a9ad06cdf6a8..95361618dee181507d53f47de2dd50c667b84007:/data/c.m4 diff --git a/data/c.m4 b/data/c.m4 index 78b12325..1f266a47 100644 --- a/data/c.m4 +++ b/data/c.m4 @@ -77,9 +77,6 @@ m4_define([b4_identification], /* Pull parsers. */ #define YYPULL ]b4_pull_flag])[ - -/* Using locations. */ -#define YYLSP_NEEDED ]b4_locations_flag[ ]]) @@ -537,8 +534,8 @@ b4_locations_if([, yylocationp])[]b4_user_args[); # b4_declare_yylstype # ------------------ -# Declaration that might either go into the header (if --defines) -# or open coded in the parser body. Declare YYSTYPE and YYLTYPE. +# Declarations that might either go into the header (if --defines) or +# in the parser body. Declare YYSTYPE/YYLTYPE, and yylval/yylloc. m4_define([b4_declare_yylstype], [[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED ]m4_ifdef([b4_stype], @@ -566,6 +563,9 @@ typedef struct YYLTYPE # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif]]) + +b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval; +]b4_locations_if([[extern YYLTYPE ]b4_prefix[lloc;]])])[]dnl ]) # b4_declare_yydebug