grammar PIR::Grammar; # This file contains helper rules to handle # the PASM instruction arguments. Many instructions # share the same 'format' of arguments (i.e. instructions # taking an int constant and a string constant). Handling # syntax checking in a central place may make the generated # parser shorter. # # Having these rules in a separate file makes compiling # faster. # rule arg_string { | | } rule arg_int { | | } rule arg_int_var { [ | ] } rule arg_pmc_var { | } rule arg_exp_exp_lab { [ \, | ] [ \, | ] } rule isXX_args { [ | ] [ \, | ] [ | ] [ \, | ] [ | ] } rule arg_get_params { ? } rule param_flag_list { [ \" | \' | ] [ \( | ] ? [ \) | ] [ \" | \' | ] [ \, | ] } rule arg_pmc_var_list { | [ \, | ]* } rule arg_hack { [ [ \, ]* ]? } # FIX the flags rule pasm_param_flags { [ \, ]* } # fix the arguments rule arg_set_args { } rule arg_set_returns { } rule arg_get_results { }