X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/791934e4b5692dabefdee2ca948ade8afc3684ce..2e7944cbb21e10c130192f733abc1af5cd8b6eb7:/src/parse-gram.y?ds=sidebyside diff --git a/src/parse-gram.y b/src/parse-gram.y index a753fa9a..ba0ef6f9 100644 --- a/src/parse-gram.y +++ b/src/parse-gram.y @@ -143,6 +143,7 @@ static int current_prec = 0; PERCENT_FILE_PREFIX "%file-prefix" PERCENT_GLR_PARSER "%glr-parser" PERCENT_INITIAL_ACTION "%initial-action" + PERCENT_LANGUAGE "%language" PERCENT_LEX_PARAM "%lex-param" PERCENT_LOCATIONS "%locations" PERCENT_NAME_PREFIX "%name-prefix" @@ -245,6 +246,7 @@ prologue_declaration: { muscle_code_grow ("initial_action", translate_symbol_action ($2, @2), @2); } +| "%language" STRING { language_argmatch ($2, 1, &@1); } | "%lex-param" "{...}" { add_param ("lex_param", $2, @2); } | "%locations" { locations_flag = true; } | "%name-prefix" STRING { spec_name_prefix = $2; } @@ -255,9 +257,9 @@ prologue_declaration: | "%output" "=" STRING { spec_outfile = $3; } /* deprecated */ | "%parse-param" "{...}" { add_param ("parse_param", $2, @2); } | "%pure-parser" { pure_parser = true; } -| "%push-parser" { push_parser = true; pure_parser = true; } +| "%push-parser" { push_parser = true; } | "%require" STRING { version_check (&@2, $2); } -| "%skeleton" STRING { skeleton = $2; } +| "%skeleton" STRING { skeleton_arg ($2, 1, &@1); } | "%token-table" { token_table_flag = true; } | "%verbose" { report_flag = report_states; } | "%yacc" { yacc_flag = true; }