X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fparser_proc.h;h=3aedbd42475a42c2d5282316c5aa660d4c16c270;hp=a865d802497426816410be14ebcb82367ba6a3f5;hb=aa338e1f515a21d83284c83d780d2dc075192c4d;hpb=42f44eb5bf4ecd36e26e051fada79d861d0f92d2 diff --git a/src/parser_proc.h b/src/parser_proc.h index a865d80..3aedbd4 100644 --- a/src/parser_proc.h +++ b/src/parser_proc.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.2. */ /* Skeleton interface for Bison GLR parsers in C - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. 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 @@ -40,15 +40,20 @@ extern int psi_parser_proc_debug; #endif /* "%code requires" blocks. */ -#line 94 "src/parser_proc_grammar.y" /* glr.c:197 */ +#line 90 "src/parser_proc_grammar.y" /* glr.c:197 */ #include "plist.h" #include "types/layout.h" +#define yytokentype psi_token_type + +#define PSI_T_CAST PSI_T_EQUALS +#define PSI_T_POINTER PSI_T_ASTERISK + struct psi_parser; -#line 52 "src/parser_proc.h" /* glr.c:197 */ +#line 57 "src/parser_proc.h" /* glr.c:197 */ /* Token type. */ #ifndef YYTOKENTYPE @@ -72,110 +77,127 @@ struct psi_parser; PSI_T_CALLABLE = 271, PSI_T_VOID = 272, PSI_T_ZVAL = 273, - PSI_T_INT8 = 274, - PSI_T_UINT8 = 275, - PSI_T_INT16 = 276, - PSI_T_UINT16 = 277, - PSI_T_INT32 = 278, - PSI_T_UINT32 = 279, - PSI_T_INT64 = 280, - PSI_T_UINT64 = 281, - PSI_T_NULL = 282, - PSI_T_TRUE = 283, - PSI_T_FALSE = 284, - PSI_T_NAME = 285, - PSI_T_NSNAME = 286, - PSI_T_DOLLAR_NAME = 287, - PSI_T_NUMBER = 288, - PSI_T_QUOTED_STRING = 289, - PSI_T_QUOTED_CHAR = 290, - PSI_T_EOL = 291, - PSI_T_EOS = 292, - PSI_T_LPAREN = 293, - PSI_T_RPAREN = 294, - PSI_T_COMMA = 295, - PSI_T_COLON = 296, - PSI_T_LBRACE = 297, - PSI_T_RBRACE = 298, - PSI_T_LBRACKET = 299, - PSI_T_RBRACKET = 300, - PSI_T_EQUALS = 301, - PSI_T_HASH = 302, - PSI_T_PIPE = 303, - PSI_T_CARET = 304, - PSI_T_AMPERSAND = 305, - PSI_T_LSHIFT = 306, - PSI_T_RSHIFT = 307, - PSI_T_PLUS = 308, - PSI_T_MINUS = 309, - PSI_T_ASTERISK = 310, - PSI_T_SLASH = 311, - PSI_T_MODULO = 312, - PSI_T_LCHEVR = 313, - PSI_T_RCHEVR = 314, - PSI_T_CMP_GE = 315, - PSI_T_CMP_LE = 316, - PSI_T_OR = 317, - PSI_T_AND = 318, - PSI_T_CMP_EQ = 319, - PSI_T_CMP_NE = 320, - PSI_T_TILDE = 321, - PSI_T_NOT = 322, - PSI_T_PERIOD = 323, - PSI_T_BACKSLASH = 324, - PSI_T_ELLIPSIS = 325, - PSI_T_ERROR = 326, - PSI_T_WARNING = 327, - PSI_T_IF = 328, - PSI_T_IFDEF = 329, - PSI_T_IFNDEF = 330, - PSI_T_ELSE = 331, - PSI_T_ELIF = 332, - PSI_T_ENDIF = 333, - PSI_T_DEFINE = 334, - PSI_T_DEFINED = 335, - PSI_T_UNDEF = 336, - PSI_T_IMPORT = 337, - PSI_T_INCLUDE = 338, - PSI_T_INCLUDE_NEXT = 339, - PSI_T_TYPEDEF = 340, - PSI_T_STRUCT = 341, - PSI_T_UNION = 342, - PSI_T_ENUM = 343, - PSI_T_CONST = 344, - PSI_T_LIB = 345, - PSI_T_STATIC = 346, - PSI_T_CALLBACK = 347, - PSI_T_FUNCTION = 348, - PSI_T_LET = 349, - PSI_T_SET = 350, - PSI_T_TEMP = 351, - PSI_T_FREE = 352, - PSI_T_RETURN = 353, - PSI_T_PRE_ASSERT = 354, - PSI_T_POST_ASSERT = 355, - PSI_T_BOOLVAL = 356, - PSI_T_INTVAL = 357, - PSI_T_STRVAL = 358, - PSI_T_PATHVAL = 359, - PSI_T_STRLEN = 360, - PSI_T_FLOATVAL = 361, - PSI_T_ARRVAL = 362, - PSI_T_OBJVAL = 363, - PSI_T_COUNT = 364, - PSI_T_CALLOC = 365, - PSI_T_TO_BOOL = 366, - PSI_T_TO_INT = 367, - PSI_T_TO_STRING = 368, - PSI_T_TO_FLOAT = 369, - PSI_T_TO_ARRAY = 370, - PSI_T_TO_OBJECT = 371, - PSI_T_COMMENT = 372, - PSI_T_WHITESPACE = 373, - PSI_T_NO_WHITESPACE = 374, - PSI_T_CPP_HEADER = 375, - PSI_T_BINARY = 376, - PSI_T_UNARY = 377 + PSI_T_NULL = 274, + PSI_T_TRUE = 275, + PSI_T_FALSE = 276, + PSI_T_NAME = 277, + PSI_T_NSNAME = 278, + PSI_T_DOLLAR_NAME = 279, + PSI_T_NUMBER = 280, + PSI_T_QUOTED_STRING = 281, + PSI_T_QUOTED_CHAR = 282, + PSI_T_SIZEOF = 283, + PSI_T_VOLATILE = 284, + PSI_T_EOL = 285, + PSI_T_EOS = 286, + PSI_T_LPAREN = 287, + PSI_T_RPAREN = 288, + PSI_T_COMMA = 289, + PSI_T_COLON = 290, + PSI_T_LBRACE = 291, + PSI_T_RBRACE = 292, + PSI_T_LBRACKET = 293, + PSI_T_RBRACKET = 294, + PSI_T_EQUALS = 295, + PSI_T_HASH = 296, + PSI_T_PIPE = 297, + PSI_T_CARET = 298, + PSI_T_AMPERSAND = 299, + PSI_T_LSHIFT = 300, + PSI_T_RSHIFT = 301, + PSI_T_PLUS = 302, + PSI_T_MINUS = 303, + PSI_T_ASTERISK = 304, + PSI_T_SLASH = 305, + PSI_T_MODULO = 306, + PSI_T_LCHEVR = 307, + PSI_T_RCHEVR = 308, + PSI_T_CMP_GE = 309, + PSI_T_CMP_LE = 310, + PSI_T_OR = 311, + PSI_T_AND = 312, + PSI_T_CMP_EQ = 313, + PSI_T_CMP_NE = 314, + PSI_T_TILDE = 315, + PSI_T_NOT = 316, + PSI_T_PERIOD = 317, + PSI_T_BACKSLASH = 318, + PSI_T_ELLIPSIS = 319, + PSI_T_IIF = 320, + PSI_T_PRAGMA = 321, + PSI_T_PRAGMA_ONCE = 322, + PSI_T_LINE = 323, + PSI_T_ERROR = 324, + PSI_T_WARNING = 325, + PSI_T_IF = 326, + PSI_T_IFDEF = 327, + PSI_T_IFNDEF = 328, + PSI_T_ELSE = 329, + PSI_T_ELIF = 330, + PSI_T_ENDIF = 331, + PSI_T_DEFINE = 332, + PSI_T_DEFINED = 333, + PSI_T_UNDEF = 334, + PSI_T_IMPORT = 335, + PSI_T_INCLUDE = 336, + PSI_T_INCLUDE_NEXT = 337, + PSI_T_TYPEDEF = 338, + PSI_T_STRUCT = 339, + PSI_T_UNION = 340, + PSI_T_ENUM = 341, + PSI_T_CONST = 342, + PSI_T_LIB = 343, + PSI_T_STATIC = 344, + PSI_T_CALLBACK = 345, + PSI_T_FUNCTION = 346, + PSI_T_LET = 347, + PSI_T_SET = 348, + PSI_T_TEMP = 349, + PSI_T_FREE = 350, + PSI_T_RETURN = 351, + PSI_T_AS = 352, + PSI_T_PRE_ASSERT = 353, + PSI_T_POST_ASSERT = 354, + PSI_T_BOOLVAL = 355, + PSI_T_INTVAL = 356, + PSI_T_STRVAL = 357, + PSI_T_PATHVAL = 358, + PSI_T_STRLEN = 359, + PSI_T_FLOATVAL = 360, + PSI_T_ARRVAL = 361, + PSI_T_OBJVAL = 362, + PSI_T_COUNT = 363, + PSI_T_CALLOC = 364, + PSI_T_TO_BOOL = 365, + PSI_T_TO_INT = 366, + PSI_T_TO_STRING = 367, + PSI_T_TO_FLOAT = 368, + PSI_T_TO_ARRAY = 369, + PSI_T_TO_OBJECT = 370, + PSI_T_COMMENT = 371, + PSI_T_WHITESPACE = 372, + PSI_T_NO_WHITESPACE = 373, + PSI_T_CPP_HEADER = 374, + PSI_T_CPP_ATTRIBUTE = 375, + PSI_T_CPP_EXTENSION = 376, + PSI_T_CPP_PASTE = 377, + PSI_T_CPP_INLINE = 378, + PSI_T_CPP_RESTRICT = 379, + PSI_T_CPP_ASM = 380, + PSI_T_BSLASH = 381, + PSI_T_LONG_DOUBLE = 382, + PSI_T_INT8 = 383, + PSI_T_UINT8 = 384, + PSI_T_INT16 = 385, + PSI_T_UINT16 = 386, + PSI_T_INT32 = 387, + PSI_T_UINT32 = 388, + PSI_T_INT64 = 389, + PSI_T_UINT64 = 390, + PSI_T_INT128 = 391, + PSI_T_UINT128 = 392, + PSI_T_BINARY = 393, + PSI_T_UNARY = 394 }; #endif @@ -193,12 +215,12 @@ union YYSTYPE size_t PSI_T_indirection; /* pointers */ size_t PSI_T_pointers; + /* asterisks */ + size_t PSI_T_asterisks; /* assert_stmt */ struct psi_assert_stmt * PSI_T_assert_stmt; /* constant */ struct psi_const * PSI_T_constant; - /* constant_type */ - struct psi_const_type * PSI_T_constant_type; /* cpp */ struct psi_cpp_exp * PSI_T_cpp; /* cpp_exp */ @@ -207,30 +229,46 @@ union YYSTYPE struct psi_cpp_macro_decl * PSI_T_cpp_macro_decl; /* decl_stmt */ struct psi_decl * PSI_T_decl_stmt; + /* ignored_decl */ + struct psi_decl * PSI_T_ignored_decl; /* decl */ struct psi_decl * PSI_T_decl; + /* decl_body */ + struct psi_decl * PSI_T_decl_body; + /* decl_func_body */ + struct psi_decl * PSI_T_decl_func_body; + /* decl_functor_body */ + struct psi_decl * PSI_T_decl_functor_body; + /* decl_anon_functor_body */ + struct psi_decl * PSI_T_decl_anon_functor_body; /* decl_typedef */ struct psi_decl_arg * PSI_T_decl_typedef; /* typedef */ struct psi_decl_arg * PSI_T_typedef; - /* decl_fn */ - struct psi_decl_arg * PSI_T_decl_fn; + /* typedef_anon */ + struct psi_decl_arg * PSI_T_typedef_anon; + /* typedef_decl */ + struct psi_decl_arg * PSI_T_typedef_decl; + /* typedef_anon_decl */ + struct psi_decl_arg * PSI_T_typedef_anon_decl; /* decl_functor */ struct psi_decl_arg * PSI_T_decl_functor; + /* decl_anon_functor */ + struct psi_decl_arg * PSI_T_decl_anon_functor; /* decl_func */ struct psi_decl_arg * PSI_T_decl_func; + /* decl_anon_arg */ + struct psi_decl_arg * PSI_T_decl_anon_arg; /* decl_arg */ struct psi_decl_arg * PSI_T_decl_arg; - /* struct_arg */ - struct psi_decl_arg * PSI_T_struct_arg; /* decl_enum */ struct psi_decl_enum * PSI_T_decl_enum; /* decl_enum_item */ struct psi_decl_enum_item * PSI_T_decl_enum_item; /* decl_struct */ struct psi_decl_struct * PSI_T_decl_struct; - /* const_decl_type */ - struct psi_decl_type * PSI_T_const_decl_type; + /* qualified_decl_type */ + struct psi_decl_type * PSI_T_qualified_decl_type; /* decl_type */ struct psi_decl_type * PSI_T_decl_type; /* decl_type_complex */ @@ -253,6 +291,8 @@ union YYSTYPE struct psi_impl_func * PSI_T_impl_func; /* impl_type */ struct psi_impl_type * PSI_T_impl_type; + /* impl_type_restricted */ + struct psi_impl_type * PSI_T_impl_type_restricted; /* impl_var */ struct psi_impl_var * PSI_T_impl_var; /* align_and_size */ @@ -279,6 +319,12 @@ union YYSTYPE struct psi_num_exp * PSI_T_num_exp; /* number */ struct psi_number * PSI_T_number; + /* sizeof */ + struct psi_number * PSI_T_sizeof; + /* sizeof_body */ + struct psi_number * PSI_T_sizeof_body; + /* sizeof_body_notypes */ + struct psi_number * PSI_T_sizeof_body_notypes; /* cpp_macro_sig */ struct psi_plist * PSI_T_cpp_macro_sig; /* cpp_macro_sig_args */ @@ -291,14 +337,26 @@ union YYSTYPE struct psi_plist * PSI_T_cpp_macro_call_args; /* cpp_macro_call_arg_list */ struct psi_plist * PSI_T_cpp_macro_call_arg_list; + /* decl_extvar_stmt */ + struct psi_plist * PSI_T_decl_extvar_stmt; + /* decl_extvar_list */ + struct psi_plist * PSI_T_decl_extvar_list; + /* decl_vars */ + struct psi_plist * PSI_T_decl_vars; /* decl_args */ struct psi_plist * PSI_T_decl_args; + /* decl_arg_list */ + struct psi_plist * PSI_T_decl_arg_list; /* decl_struct_args */ struct psi_plist * PSI_T_decl_struct_args; /* struct_args_block */ struct psi_plist * PSI_T_struct_args_block; /* struct_args */ struct psi_plist * PSI_T_struct_args; + /* struct_arg_var_list */ + struct psi_plist * PSI_T_struct_arg_var_list; + /* decl_vars_with_layout */ + struct psi_plist * PSI_T_decl_vars_with_layout; /* decl_enum_items */ struct psi_plist * PSI_T_decl_enum_items; /* impl_args */ @@ -313,14 +371,16 @@ union YYSTYPE struct psi_plist * PSI_T_callback_arg_list; /* callback_args */ struct psi_plist * PSI_T_callback_args; + /* call_decl_vars */ + struct psi_plist * PSI_T_call_decl_vars; /* set_func_exps */ struct psi_plist * PSI_T_set_func_exps; /* set_exps */ struct psi_plist * PSI_T_set_exps; /* free_exps */ struct psi_plist * PSI_T_free_exps; - /* decl_vars */ - struct psi_plist * PSI_T_decl_vars; + /* return_exp */ + struct psi_return_exp * PSI_T_return_exp; /* return_stmt */ struct psi_return_stmt * PSI_T_return_stmt; /* set_exp */ @@ -363,22 +423,6 @@ union YYSTYPE struct psi_token * PSI_T_VOID; /* ZVAL */ struct psi_token * PSI_T_ZVAL; - /* INT8 */ - struct psi_token * PSI_T_INT8; - /* UINT8 */ - struct psi_token * PSI_T_UINT8; - /* INT16 */ - struct psi_token * PSI_T_INT16; - /* UINT16 */ - struct psi_token * PSI_T_UINT16; - /* INT32 */ - struct psi_token * PSI_T_INT32; - /* UINT32 */ - struct psi_token * PSI_T_UINT32; - /* INT64 */ - struct psi_token * PSI_T_INT64; - /* UINT64 */ - struct psi_token * PSI_T_UINT64; /* NULL */ struct psi_token * PSI_T_NULL; /* TRUE */ @@ -397,6 +441,10 @@ union YYSTYPE struct psi_token * PSI_T_QUOTED_STRING; /* QUOTED_CHAR */ struct psi_token * PSI_T_QUOTED_CHAR; + /* SIZEOF */ + struct psi_token * PSI_T_SIZEOF; + /* VOLATILE */ + struct psi_token * PSI_T_VOLATILE; /* "end of line" */ struct psi_token * PSI_T_EOL; /* ";" */ @@ -467,6 +515,14 @@ union YYSTYPE struct psi_token * PSI_T_BACKSLASH; /* "..." */ struct psi_token * PSI_T_ELLIPSIS; + /* "?" */ + struct psi_token * PSI_T_IIF; + /* PRAGMA */ + struct psi_token * PSI_T_PRAGMA; + /* PRAGMA_ONCE */ + struct psi_token * PSI_T_PRAGMA_ONCE; + /* LINE */ + struct psi_token * PSI_T_LINE; /* ERROR */ struct psi_token * PSI_T_ERROR; /* WARNING */ @@ -523,6 +579,8 @@ union YYSTYPE struct psi_token * PSI_T_FREE; /* RETURN */ struct psi_token * PSI_T_RETURN; + /* AS */ + struct psi_token * PSI_T_AS; /* PRE_ASSERT */ struct psi_token * PSI_T_PRE_ASSERT; /* POST_ASSERT */ @@ -567,6 +625,42 @@ union YYSTYPE struct psi_token * PSI_T_NO_WHITESPACE; /* CPP_HEADER */ struct psi_token * PSI_T_CPP_HEADER; + /* CPP_ATTRIBUTE */ + struct psi_token * PSI_T_CPP_ATTRIBUTE; + /* CPP_EXTENSION */ + struct psi_token * PSI_T_CPP_EXTENSION; + /* CPP_PASTE */ + struct psi_token * PSI_T_CPP_PASTE; + /* CPP_INLINE */ + struct psi_token * PSI_T_CPP_INLINE; + /* CPP_RESTRICT */ + struct psi_token * PSI_T_CPP_RESTRICT; + /* CPP_ASM */ + struct psi_token * PSI_T_CPP_ASM; + /* BSLASH */ + struct psi_token * PSI_T_BSLASH; + /* LONG_DOUBLE */ + struct psi_token * PSI_T_LONG_DOUBLE; + /* INT8 */ + struct psi_token * PSI_T_INT8; + /* UINT8 */ + struct psi_token * PSI_T_UINT8; + /* INT16 */ + struct psi_token * PSI_T_INT16; + /* UINT16 */ + struct psi_token * PSI_T_UINT16; + /* INT32 */ + struct psi_token * PSI_T_INT32; + /* UINT32 */ + struct psi_token * PSI_T_UINT32; + /* INT64 */ + struct psi_token * PSI_T_INT64; + /* UINT64 */ + struct psi_token * PSI_T_UINT64; + /* INT128 */ + struct psi_token * PSI_T_INT128; + /* UINT128 */ + struct psi_token * PSI_T_UINT128; /* binary_op_token */ struct psi_token * PSI_T_binary_op_token; /* unary_op_token */ @@ -589,16 +683,12 @@ union YYSTYPE struct psi_token * PSI_T_cpp_name_arg_token; /* cpp_exp_arg_token */ struct psi_token * PSI_T_cpp_exp_arg_token; - /* constant_type_token */ - struct psi_token * PSI_T_constant_type_token; /* impl_def_val_token */ struct psi_token * PSI_T_impl_def_val_token; /* decl_type_simple */ struct psi_token * PSI_T_decl_type_simple; /* decl_real_type */ struct psi_token * PSI_T_decl_real_type; - /* decl_stdint_type */ - struct psi_token * PSI_T_decl_stdint_type; /* int_signed */ struct psi_token * PSI_T_int_signed; /* int_width */ @@ -613,6 +703,10 @@ union YYSTYPE struct psi_token * PSI_T_signed_long_types; /* int_width_types */ struct psi_token * PSI_T_int_width_types; + /* decl_asm */ + struct psi_token * PSI_T_decl_asm; + /* quoted_strings */ + struct psi_token * PSI_T_quoted_strings; /* enum_name */ struct psi_token * PSI_T_enum_name; /* union_name */ @@ -623,6 +717,10 @@ union YYSTYPE struct psi_token * PSI_T_optional_name; /* impl_type_token */ struct psi_token * PSI_T_impl_type_token; + /* impl_type_restricted_token */ + struct psi_token * PSI_T_impl_type_restricted_token; + /* impl_type_extended_token */ + struct psi_token * PSI_T_impl_type_extended_token; /* let_func_token */ struct psi_token * PSI_T_let_func_token; /* callback_rval */ @@ -633,7 +731,7 @@ union YYSTYPE struct psi_token * PSI_T_assert_stmt_token; /* impl_stmt */ struct psi_token ** PSI_T_impl_stmt; -#line 637 "src/parser_proc.h" /* glr.c:197 */ +#line 735 "src/parser_proc.h" /* glr.c:197 */ }; typedef union YYSTYPE YYSTYPE;