X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/fb9c0b3360928887038a296c338025ced68e2d8c..b09a18c50d221b54e6bc94e03deb65ecd52c4288:/src/parse-gram.y?ds=sidebyside diff --git a/src/parse-gram.y b/src/parse-gram.y index 027a773d..d4f2731e 100644 --- a/src/parse-gram.y +++ b/src/parse-gram.y @@ -20,6 +20,7 @@ 02110-1301 USA */ +#include #include "system.h" #include "complain.h" @@ -53,9 +54,8 @@ static void add_param (char const *, char *, location); static symbol_class current_class = unknown_sym; static uniqstr current_type = 0; -symbol *current_lhs; -location current_lhs_location; -assoc current_assoc; +static symbol *current_lhs; +static location current_lhs_location; static int current_prec = 0; %} @@ -181,7 +181,7 @@ static int current_prec = 0; %type INT %printer { fprintf (stderr, "%d", $$); } INT %type ID symbol string_as_id -%printer { fputs ($$->tag, stderr); } ID symbol string_as_id +%printer { fprintf (stderr, "%s", $$->tag); } ID symbol string_as_id %type ID_COLON %printer { fprintf (stderr, "%s:", $$->tag); } ID_COLON %type precedence_declarator @@ -539,8 +539,11 @@ static void version_check (location const *loc, char const *version) { if (strverscmp (version, PACKAGE_VERSION) > 0) - complain_at (*loc, "require bison %s, but have %s", - version, PACKAGE_VERSION); + { + complain_at (*loc, "require bison %s, but have %s", + version, PACKAGE_VERSION); + exit (63); + } } static void