X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/dd0e33293dca1f19fd465b4d96b64adb6444e0d2..02413704070c34bec00184120c4728854671d2d5:/src/parse.y diff --git a/src/parse.y b/src/parse.y index 3f02129..11ae6bb 100644 --- a/src/parse.y +++ b/src/parse.y @@ -1,7 +1,7 @@ %code top { /* * Parser for C declarations. - * Copyright © 2011 Nick Bowler + * Copyright © 2011-2012, 2021 Nick Bowler * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ } %name-prefix "cdecl__yy" -%parse-param {yyscan_t scanner} +%parse-param {void *scanner} %parse-param {struct cdecl **out} %lex-param {yyscan_t scanner} %define api.pure @@ -32,8 +32,8 @@ #include #include "scan.h" -#include "error.h" #include "cdecl.h" +#include "cdecl-internal.h" #define FAIL(msg) do { \ yyerror(&yylloc, NULL, NULL, msg); \ @@ -64,6 +64,7 @@ int cdecl__yyparse(void *scanner, struct cdecl **out); %union { uintmax_t uintval; + unsigned spectype; _Bool boolval; char *strval; struct cdecl_declspec *declspec; @@ -205,7 +206,7 @@ void cdecl__free(struct cdecl *decl) %type vla_ident %type varargs -%type declspec_simple typespec_simple qualifier_simple +%type declspec_simple typespec_simple qualifier_simple %type declspec_notype declspec_noid typespec_noid typespec %type qualifier qualifiers %type declspecs declspecs_noid @@ -580,8 +581,7 @@ english_vla: T_IDENT | { %% void -yyerror(YYLTYPE *loc, yyscan_t scanner, struct cdecl **out, - const char *err) +yyerror(YYLTYPE *loc, yyscan_t scanner, struct cdecl **out, const char *err) { if (strstr(err, "T_LEX_ERROR")) return;