ruby-changes:50536
From: nobu <ko1@a...>
Date: Tue, 6 Mar 2018 18:03:32 +0900 (JST)
Subject: [ruby-changes:50536] nobu:r62675 (trunk): parse.y: tSPACE for old bison
nobu 2018-03-06 18:03:24 +0900 (Tue, 06 Mar 2018) New Revision: 62675 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62675 Log: parse.y: tSPACE for old bison * parse.y (tSPACE): define a separate token for escaped space, to fix `redefining user token number of ' '` error at word list separator on bison 2. Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 62674) +++ parse.y (revision 62675) @@ -838,7 +838,7 @@ static void token_info_pop(struct parser https://github.com/ruby/ruby/blob/trunk/parse.y#L838 %token <id> '.' /* escaped chars, should be ignored otherwise */ %token <id> '\\' "backslash" -%token <id> ' ' "escaped space" +%token tSPACE "escaped space" %token <id> '\t' "escaped horizontal tab" %token <id> '\f' "escaped form feed" %token <id> '\r' "escaped carriage return" @@ -8101,6 +8101,7 @@ parser_yylex(struct parser_params *p) https://github.com/ruby/ruby/blob/trunk/parse.y#L8101 dispatch_scan_event(p, tSP); goto retry; /* skip \\n */ } + if (c == ' ') return tSPACE; if (ISSPACE(c)) return c; pushback(p, c); return '\\'; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/