-| PROLOGUE { prologue_augment ($1, @1); }
-| "%debug" { debug_flag = 1; }
-| "%define" string_content string_content { muscle_insert ($2, $3); }
-| "%defines" { defines_flag = 1; }
-| "%error-verbose" { error_verbose = 1; }
-| "%expect" INT { expected_conflicts = $2; }
-| "%file-prefix" "=" string_content { spec_file_prefix = $3; }
-| "%locations" { locations_flag = 1; }
-| "%name-prefix" "=" string_content { spec_name_prefix = $3; }
-| "%no-lines" { no_lines_flag = 1; }
-| "%output" "=" string_content { spec_outfile = $3; }
-| "%pure-parser" { pure_parser = 1; }
-| "%glr-parser" { glr_parser = 1; }
-| "%skeleton" string_content { skeleton = $2; }
-| "%token-table" { token_table_flag = 1; }
-| "%verbose" { report_flag = 1; }
-| "%yacc" { yacc_flag = 1; }
+| "%{...%}"
+ {
+ code_props plain_code;
+ code_props_plain_init (&plain_code, $1, @1);
+ code_props_translate_code (&plain_code);
+ gram_scanner_last_string_free ();
+ muscle_code_grow (union_seen ? "post_prologue" : "pre_prologue",
+ plain_code.code, @1);
+ code_scanner_last_string_free ();
+ }
+| "%debug" { debug_flag = true; }
+| "%define" variable content.opt
+ {
+ char const name_prefix[] = "percent_define(";
+ size_t length = strlen ($2);
+ char *name = xmalloc (sizeof name_prefix + length + 1);
+ strcpy (name, name_prefix);
+ strcpy (name + sizeof name_prefix - 1, $2);
+ strcpy (name + sizeof name_prefix - 1 + length, ")");
+ if (muscle_find_const (name))
+ warn_at (@2, _("%s `%s' redefined"), "%define variable", $2);
+ MUSCLE_INSERT_STRING (uniqstr_new (name), $3);
+ free (name);
+ muscle_grow_user_name_list ("percent_define_user_variables", $2, @2);
+ }
+| "%defines" { defines_flag = true; }
+| "%defines" STRING
+ {
+ defines_flag = true;
+ spec_defines_file = xstrdup ($2);
+ }
+| "%error-verbose" { error_verbose = true; }
+| "%expect" INT { expected_sr_conflicts = $2; }
+| "%expect-rr" INT { expected_rr_conflicts = $2; }
+| "%file-prefix" STRING { spec_file_prefix = $2; }
+| "%file-prefix" "=" STRING { spec_file_prefix = $3; } /* deprecated */
+| "%glr-parser"
+ {
+ nondeterministic_parser = true;
+ glr_parser = true;
+ }
+| "%initial-action" "{...}"
+ {
+ code_props action;
+ code_props_symbol_action_init (&action, $2, @2);
+ code_props_translate_code (&action);
+ gram_scanner_last_string_free ();
+ muscle_code_grow ("initial_action", action.code, @2);
+ code_scanner_last_string_free ();
+ }
+| "%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; }
+| "%name-prefix" "=" STRING { spec_name_prefix = $3; } /* deprecated */
+| "%no-lines" { no_lines_flag = true; }
+| "%nondeterministic-parser" { nondeterministic_parser = true; }
+| "%output" STRING { spec_outfile = $2; }
+| "%output" "=" STRING { spec_outfile = $3; } /* deprecated */
+| "%parse-param" "{...}" { add_param ("parse_param", $2, @2); }
+| "%pure-parser" { pure_parser = true; }
+| "%push-parser" { push_parser = true; pull_parser = false; }
+| "%push-pull-parser" { push_parser = true; pull_parser = true; }
+| "%require" STRING { version_check (&@2, $2); }
+| "%skeleton" STRING { skeleton_arg ($2, 1, &@1); }
+| "%token-table" { token_table_flag = true; }
+| "%verbose" { report_flag = report_states; }
+| "%yacc" { yacc_flag = true; }
+| /*FIXME: Err? What is this horror doing here? */ ";"