/* Input parser for Bison
Copyright (C) 1984, 1986, 1989, 1992, 1998, 2000, 2001, 2002, 2003,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
#include "files.h"
#include "getargs.h"
#include "gram.h"
-#include "muscle_tab.h"
+#include "muscle-tab.h"
#include "reader.h"
#include "symlist.h"
#include "symtab.h"
gram_scanner_initialize ();
gram_parse ();
+ /* Set front-end %define variable defaults. */
+ muscle_percent_define_default ("lr.keep-unreachable-states", "false");
+ {
+ char *lr_type;
+ /* IELR would be a better default, but LALR is historically the
+ default. */
+ muscle_percent_define_default ("lr.type", "LALR");
+ lr_type = muscle_percent_define_get ("lr.type");
+ if (0 != strcmp (lr_type, "canonical LR"))
+ muscle_percent_define_default ("lr.default-reductions", "all");
+ else
+ muscle_percent_define_default ("lr.default-reductions", "accepting");
+ free (lr_type);
+ }
+
+ /* Check front-end %define variables. */
+ {
+ static char const * const values[] = {
+ "lr.type", "LALR", "IELR", "canonical LR", NULL,
+ "lr.default-reductions", "all", "consistent", "accepting", NULL,
+ NULL
+ };
+ muscle_percent_define_check_values (values);
+ }
+
if (! complaint_issued)
check_and_convert_grammar ();