Ignore:
Timestamp:
Jul 3, 2020, 7:29:31 PM (4 years ago)
Author:
coas-nagasima
Message:

RubyパーサーとYaccを更新(変化なし)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/webapp/webmrbc/mrb_parse.jay

    r321 r430  
    1010// [this has not been done here to stress-test the skeleton]
    1111using System;
     12using System.Collections.Generic;
     13using System.Text.RegularExpressions;
    1214using Bridge;
    1315using Bridge.Html5;
     
    402404                      if ($1 == null) $$ = new_nil();
    403405                      else{
    404                         void_expr_error($1);
    405406                        $$ = $1;
    406407                      }
     
    414415block_command   : block_call
    415416                | block_call call_op2 operation2 command_args
     417                    {
     418                      $$ = new_call($1, $3, $4, $2);
     419                    }
    416420                ;
    417421
     
    659663                | primary_value tCOLON2 cname
    660664                    {
     665                      void_expr_error($1);
    661666                      $$ = cons($1, $3);
    662667                    }
     
    929934arg_rhs         : arg   %prec tOP_ASGN
    930935                    {
     936                      $$ = $1;
     937                    }
     938                | arg modifier_rescue arg
     939                    {
    931940                      void_expr_error($1);
    932                       $$ = $1;
    933                     }
    934                 | arg modifier_rescue arg
    935                     {
    936                       void_expr_error($1);
     941                      void_expr_error($3);
    937942                      $$ = new_mod_rescue($1, $3);
    938943                    }
     
    970975call_args       : command
    971976                    {
     977                      void_expr_error($1);
    972978                      $$ = cons(list1($1), null);
    973979                      $<node>$.NODE_LINENO($1);
     
    21072113f_opt           : f_opt_asgn arg
    21082114                    {
     2115                      void_expr_error($2);
    21092116                      $$ = cons($1, $2);
    21102117                    }
     
    21132120f_block_opt     : f_opt_asgn primary_value
    21142121                    {
     2122                      void_expr_error($2);
    21152123                      $$ = cons($1, $2);
    21162124                    }
     
    22262234assoc           : arg tASSOC arg
    22272235                    {
     2236                      void_expr_error($1);
     2237                      void_expr_error($3);
    22282238                      $$ = cons($1, $3);
    22292239                    }
    22302240                | tLABEL arg
    22312241                    {
     2242                      void_expr_error($2);
    22322243                      $$ = cons(new_sym($1), $2);
    22332244                    }
    22342245                | tLABEL_END arg
    22352246                    {
     2247                      void_expr_error($2);
    22362248                      $$ = cons(new_sym(new_strsym($1)), $2);
    22372249                    }
    22382250                | tSTRING_BEG tLABEL_END arg
    22392251                    {
     2252                      void_expr_error($3);
    22402253                      $$ = cons(new_sym(new_strsym($2)), $3);
    22412254                    }
    22422255                | tSTRING_BEG string_rep tLABEL_END arg
    22432256                    {
     2257                      void_expr_error($4);
    22442258                      $$ = cons(new_dsym(push($2, $3)), $4);
    22452259                    }
Note: See TracChangeset for help on using the changeset viewer.