diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-10-17 08:17:49 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-10-17 08:17:49 -0700 |
commit | 9f158a44b7e88c1dcfb8d56f4f85d642fc423b59 (patch) | |
tree | 336dc9997f047c3ea954312b3dbc715157de0b67 /parser.y | |
parent | 499f04dc4f9f864071d6ff7e75c9cbec60e2fd12 (diff) | |
download | txr-9f158a44b7e88c1dcfb8d56f4f85d642fc423b59.tar.gz txr-9f158a44b7e88c1dcfb8d56f4f85d642fc423b59.tar.bz2 txr-9f158a44b7e88c1dcfb8d56f4f85d642fc423b59.zip |
Purge stray occurrences of "void *" from code base.
* lib.c (cobj_print_op): In the format call, cast
the C pointer to val, since the ~p conversion now
takes a val rather than void *.
(cptr_equal_op, obj_print, obj_pprint): Remove cast to
void *, since obj now already has the type that ~p expects.
* lib.h (struct any): Use mem_t * instead of void *.
* parser.h (yyscan_t): Repeat the definition from inside
the Flex-generated lex.yy.c.
(yylex_init, yylex_destroy, yyget_extra, yyset_extra): Re-declare
using yyscan_t typedef in place of void *.
* parser.l (yyget_column, yyerrprepf): Re-declare using yyscan_t.
(grammar): Use yyg in place of yyscanner in calls to yyerrprepf.
* parser.y (yylex, %lex-param): Use yyscan_t instead of void *.
(parse): Use yyscan_t for local variable.
* signal.c (stack): Change type from void * to mem_t *.
* stream.c (vformat): Conversion specifier p extracts val
instead of void *.
(run): Use casts that only remove const, not all the way to void *.
* txr.1: Documented p conversion specifier of format.
* Makefile (OBJS-y): Initialize with := to make sure it is a
simple variable, and not a macro.
(SRCS): New variable, listing source files.
(enforce): New rule for enforcing coding conventions.
Currently checks for void * occurrences.
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -60,7 +60,7 @@ static val make_expr(parser_t *, val sym, val rest, val lineno); #if YYBISON union YYSTYPE; -int yylex(union YYSTYPE *, void *scanner); +int yylex(union YYSTYPE *, yyscan_t scanner); #endif #define rl(form, line) rlrec(parser, form, line) @@ -74,7 +74,7 @@ int yylex(union YYSTYPE *, void *scanner); %pure-parser %parse-param{scanner_t *scnr} %parse-param{parser_t *parser} -%lex-param{void *scnr} +%lex-param{yyscan_t scnr} %union { wchar_t *lexeme; @@ -979,7 +979,7 @@ not_a_clause : ALL { $$ = mkexp(all_s, nil, num(parser->lineno)); } %% -int yylex(YYSTYPE *, void *scanner); +int yylex(YYSTYPE *, yyscan_t scanner); /* C99 inline instantiations. */ #if __STDC_VERSION__ >= 199901L @@ -1354,7 +1354,7 @@ void yybadtoken(parser_t *parser, int tok, val context) int parse(val stream, val name, parser_t *parser) { int res; - void *scanner; + yyscan_t scanner; parser->lineno = 1; parser->errors = 0; |