From 8a5e2cba9577665a1da6c7d8a41072ca6c58fb9f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 24 Jan 2021 09:05:32 -0800 Subject: parser: fix bad precedence of @ token. Whereas @a..@b parses and transforms to (rcons @a @a), @(a)..@(a) goes to @(rcons a @(a)). * parser.l (grammar): Under 248 compatibility or lower, the @ character now produces the OLD_AT token. Otherwise it produces the '@' character, as before. * parser.y (OLD_AT): New token replaces the '@' at the old low precedence position. '@' is now at the highest precedence, together with OLD_DOTDOT. (We don't care about interactions between '@' and OLD_DOTDOT, because OLD_DOTDOT only exists in 185 compatibility, in which '@' is OLD_AT). (meta): The two rules have to be unfortunately duplicated for OLD_AT, since there is no BNF OR operator in Yacc. * txr.1: Compat note added. * lex.yy.c.shipped: Updated. * y.tab.c.shipped, y.tab.h.shipped: Likewise. --- y.tab.h.shipped | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'y.tab.h.shipped') diff --git a/y.tab.h.shipped b/y.tab.h.shipped index 59a490e3..19ec4906 100644 --- a/y.tab.h.shipped +++ b/y.tab.h.shipped @@ -66,14 +66,15 @@ REGTOKEN = 313, LITCHAR = 314, SPLICE = 315, - CONSDOT = 316, - LAMBDOT = 317, - UREFDOT = 318, - OREFDOT = 319, - UOREFDOT = 320, - LOW = 321, - ELSE = 322, - ELIF = 323 + OLD_AT = 316, + CONSDOT = 317, + LAMBDOT = 318, + UREFDOT = 319, + OREFDOT = 320, + UOREFDOT = 321, + LOW = 322, + ELSE = 323, + ELIF = 324 }; #endif /* Tokens. */ @@ -135,14 +136,15 @@ #define REGTOKEN 313 #define LITCHAR 314 #define SPLICE 315 -#define CONSDOT 316 -#define LAMBDOT 317 -#define UREFDOT 318 -#define OREFDOT 319 -#define UOREFDOT 320 -#define LOW 321 -#define ELSE 322 -#define ELIF 323 +#define OLD_AT 316 +#define CONSDOT 317 +#define LAMBDOT 318 +#define UREFDOT 319 +#define OREFDOT 320 +#define UOREFDOT 321 +#define LOW 322 +#define ELSE 323 +#define ELIF 324 @@ -162,7 +164,7 @@ typedef union YYSTYPE /* Line 2068 of yacc.c */ -#line 195 "y.tab.h" +#line 197 "y.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ -- cgit v1.2.3