X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/7031fb3bec5bbef1d14686ba0434442a4ebf5ebd..4c819e9466a0573afae0f9787a4704a479517624:/src/scan.l diff --git a/src/scan.l b/src/scan.l index 73efdde..5d460ed 100644 --- a/src/scan.l +++ b/src/scan.l @@ -32,12 +32,18 @@ * functions static, which allows better optimization (especially wrt. * dead code elimination). */ +#if !cdecl__yyIN_HEADER + +#if __GNUC__ +# define static __attribute__((__unused__)) static +#endif + static struct yy_buffer_state *cdecl__yy_create_buffer(FILE *, int, void *); static struct yy_buffer_state *cdecl__yy_scan_bytes(const char *, int, void *); static struct yy_buffer_state *cdecl__yy_scan_buffer(char *, size_t, void *); static void cdecl__yy_switch_to_buffer(struct yy_buffer_state *, void *); static void cdecl__yy_flush_buffer(struct yy_buffer_state *, void *); -static void yypush_buffer_state(struct yy_buffer_state *, void *); +static void cdecl__yypush_buffer_state(struct yy_buffer_state *, void *); static void cdecl__yypop_buffer_state(void *); static void cdecl__yyrestart(FILE *, void *); static int cdecl__yylex_init(void **); @@ -61,11 +67,14 @@ static void cdecl__yyset_out(FILE *, void *); static void cdecl__yyset_debug(int, void *); static void cdecl__yyset_lineno(int, void *); static void cdecl__yyset_column(int, void *); -static void cdecl__yyset_leng(int, void *); static void *cdecl__yyrealloc(void *, size_t, void *); static void *cdecl__yyalloc(size_t, void *); static void cdecl__yyfree(void *, void *); + +#undef static + +#endif } %option nodefault noyywrap bison-locations reentrant never-interactive @@ -174,7 +183,7 @@ IDENT [_[:alpha:]][-_[:alnum:]]* [1-9][0-9]* { intconv_base = INTCONV_DECIMAL; goto int_parse; } 0[Xx][[:xdigit:]]+ { unsigned char d; - uintmax_t v; + cdecl_uintmax v; yytext += 2; intconv_base = INTCONV_HEXADECIMAL; @@ -231,6 +240,6 @@ int_parse: c = yytext; invalid_char: to_readable_ch(buf, *c); - cdecl__err(CDECL_ENOPARSE, _("syntax error, unexpected %s"), buf); + cdecl__err(_("syntax error, unexpected %s"), buf); return T_LEX_ERROR; }