X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/0245f82d315e27c2439482d8b3f15af74d5dd508..29c017256a980c07f898d8a4e5f6a630a5bf70b7:/data/c.m4?ds=sidebyside diff --git a/data/c.m4 b/data/c.m4 index b513df56..26171622 100644 --- a/data/c.m4 +++ b/data/c.m4 @@ -19,9 +19,9 @@ m4_divert(-1) -*- Autoconf -*- # 02111-1307 USA -## ----------- ## -## Copyright. ## -## ----------- ## +## ---------------- ## +## Identification. ## +## ---------------- ## # b4_copyright(TITLE, YEARS) # -------------------------- @@ -47,6 +47,45 @@ m4_define([b4_copyright], Boston, MA 02111-1307, USA. */]) +# b4_identification +# ----------------- +m4_define([b4_identification], +[/* Identify Bison output. */ +[#]define YYBISON 1 + +/* Skeleton name. */ +[#]define YYSKELETON_NAME "b4_skeleton" + +/* Pure parsers. */ +[#]define YYPURE b4_pure + +/* Using locations. */ +[#]define YYLSP_NEEDED b4_locations_flag +]) + + + +## ------------------------ ## +## Pure/impure interfaces. ## +## ------------------------ ## + + +# b4_user_args +# ------------ +m4_define([b4_user_args], +[m4_ifset([b4_parse_param], [, b4_c_args(b4_parse_param)])]) + + +# b4_parse_param +# -------------- +# If defined, b4_parse_param arrives double quoted, but below we prefer +# it to be single quoted. +m4_define_default([b4_parse_param]) +m4_define([b4_parse_param], +b4_parse_param)) + + + ## ------------ ## ## Data Types. ## ## ------------ ## @@ -65,7 +104,7 @@ m4_define([b4_ints_in], # MIN to MAX (included). m4_define([b4_int_type], [m4_if(b4_ints_in($@, [0], [255]), [1], [unsigned char], - b4_ints_in($@, [-128], [127]), [1], [yysigned_char], + b4_ints_in($@, [-128], [127]), [1], [signed char], b4_ints_in($@, [0], [65535]), [1], [unsigned short], b4_ints_in($@, [-32768], [32767]), [1], [short], @@ -74,6 +113,7 @@ m4_define([b4_int_type], [int])]) + # b4_int_type_for(NAME) # --------------------- # Return the smallest int type able to handle numbers ranging from