Use Bison 1.875 features, and some minor
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 25 Oct 2004 05:50:16 +0000 (05:50 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 25 Oct 2004 05:50:16 +0000 (05:50 +0000)
commitdfe3217b64781802c408f0db29c5b78eba49f8f4
treeb0ea320865ad4b06f5fc33715a42243e29de6df9
parent4039363afbbe6113e08d0a839e107304277979e3
Use Bison 1.875 features, and some minor
code cleanups.  This change does not affect semantics.
Don't include <stdlib.h>; no longer needed.
Don't include unlocked-io.h; only the "#if TEST" code uses
stdio, and performance isn't crucial there.
(PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
Bison 1.875 features as described below.
All uses of "PC." replaced by "pc->".
(YYSTYPE): Add a forward declaration.
(yylex, yyerror): Use full prototypes in forward decls.
Use "%pure-parser" rather than obsolescent "%pure_parser".
Use %parse-param and %lex-param instead of obsolescent
YYPARSE_PARAM and YYLEX_PARAM.
(meridian_table, month_and_day_table, time_units_table,
relative_time_table, time_zone_table, military_table,
lookup_zone, lookup_word, get_date):
Use NULL instead of 0 where appropriate.
(to_hour): Avoid abort (), to avoid a dependency on
stdlib.h.
(yyerror, yylex): Now accepts parser_control * arg.
(main) [TEST]: Use '\0' rather than 0 for char.
lib/getdate.y