mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 09:43:03 +00:00
* data/yacc.c (m4_int_type): New.
* data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed char' as only yacc.c wants K&R portability. * data/glr.c (yysigned_char): Remove. * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name. Reported by Quoc Peyrot.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2002-10-24 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* data/yacc.c (m4_int_type): New.
|
||||||
|
* data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
|
||||||
|
char' as only yacc.c wants K&R portability.
|
||||||
|
* data/glr.c (yysigned_char): Remove.
|
||||||
|
* data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
|
||||||
|
Reported by Quoc Peyrot.
|
||||||
|
|
||||||
2002-10-23 Paul Eggert <eggert@twinsun.com>
|
2002-10-23 Paul Eggert <eggert@twinsun.com>
|
||||||
|
|
||||||
* src/main.c (main): With --trace=time, report times even if a
|
* src/main.c (main): With --trace=time, report times even if a
|
||||||
|
|||||||
1
THANKS
1
THANKS
@@ -48,6 +48,7 @@ Paul Hilfinger Hilfinger@CS.Berkeley.EDU
|
|||||||
Per Allansson per@appgate.com
|
Per Allansson per@appgate.com
|
||||||
Peter Hámorský hamo@upjs.sk
|
Peter Hámorský hamo@upjs.sk
|
||||||
Piotr Gackiewicz gacek@intertel.com.pl
|
Piotr Gackiewicz gacek@intertel.com.pl
|
||||||
|
Quoc Peyrot chojin@lrde.epita.fr
|
||||||
R Blake blakers@mac.com
|
R Blake blakers@mac.com
|
||||||
Raja R Harinath harinath@cs.umn.edu
|
Raja R Harinath harinath@cs.umn.edu
|
||||||
Richard Stallman rms@gnu.org
|
Richard Stallman rms@gnu.org
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ m4_define([b4_ints_in],
|
|||||||
# MIN to MAX (included).
|
# MIN to MAX (included).
|
||||||
m4_define([b4_int_type],
|
m4_define([b4_int_type],
|
||||||
[m4_if(b4_ints_in($@, [0], [255]), [1], [unsigned char],
|
[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($@, [0], [65535]), [1], [unsigned short],
|
||||||
b4_ints_in($@, [-32768], [32767]), [1], [short],
|
b4_ints_in($@, [-32768], [32767]), [1], [short],
|
||||||
@@ -74,6 +74,7 @@ m4_define([b4_int_type],
|
|||||||
|
|
||||||
[int])])
|
[int])])
|
||||||
|
|
||||||
|
|
||||||
# b4_int_type_for(NAME)
|
# b4_int_type_for(NAME)
|
||||||
# ---------------------
|
# ---------------------
|
||||||
# Return the smallest int type able to handle numbers ranging from
|
# Return the smallest int type able to handle numbers ranging from
|
||||||
|
|||||||
@@ -207,12 +207,6 @@ static YYLTYPE yyloc_default;
|
|||||||
# define yyfalse 0
|
# define yyfalse 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (__STDC__) || defined (__cplusplus)
|
|
||||||
typedef signed char yysigned_char;
|
|
||||||
#else
|
|
||||||
typedef short yysigned_char;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*-----------------.
|
/*-----------------.
|
||||||
| GCC extensions. |
|
| GCC extensions. |
|
||||||
`-----------------*/
|
`-----------------*/
|
||||||
|
|||||||
@@ -775,7 +775,7 @@ const int yy::b4_parser_class_name::ntokens_ = b4_tokens_number;
|
|||||||
const int yy::b4_parser_class_name::initdepth_ = b4_stack_depth_init;
|
const int yy::b4_parser_class_name::initdepth_ = b4_stack_depth_init;
|
||||||
|
|
||||||
const unsigned yy::b4_parser_class_name::user_token_number_max_ = b4_user_token_number_max;
|
const unsigned yy::b4_parser_class_name::user_token_number_max_ = b4_user_token_number_max;
|
||||||
const yy::b4_parser_class_name::TokenNumberType yy::b4_name::undef_token_ = b4_undef_token_number;
|
const yy::b4_parser_class_name::TokenNumberType yy::b4_parser_class_name::undef_token_ = b4_undef_token_number;
|
||||||
|
|
||||||
b4_epilogue
|
b4_epilogue
|
||||||
dnl
|
dnl
|
||||||
|
|||||||
22
data/yacc.c
22
data/yacc.c
@@ -47,6 +47,28 @@ m4_ifdef([b4_parse_param],
|
|||||||
b4_parse_param)])
|
b4_parse_param)])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## ------------ ##
|
||||||
|
## Data Types. ##
|
||||||
|
## ------------ ##
|
||||||
|
|
||||||
|
# b4_int_type(MIN, MAX)
|
||||||
|
# ---------------------
|
||||||
|
# Return the smallest int type able to handle numbers ranging from
|
||||||
|
# MIN to MAX (included). We overwrite the version from c.m4 which relies
|
||||||
|
# on `signed char' which is not portable to old K&R compilers.
|
||||||
|
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($@, [0], [65535]), [1], [unsigned short],
|
||||||
|
b4_ints_in($@, [-32768], [32767]), [1], [short],
|
||||||
|
|
||||||
|
m4_eval([0 <= $1]), [1], [unsigned int],
|
||||||
|
|
||||||
|
[int])])
|
||||||
|
|
||||||
|
|
||||||
## ----------------- ##
|
## ----------------- ##
|
||||||
## Semantic Values. ##
|
## Semantic Values. ##
|
||||||
## ----------------- ##
|
## ----------------- ##
|
||||||
|
|||||||
Reference in New Issue
Block a user