From 6554dd6f8e5b1faafbda33b853a3de08ffd0ff6e Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Sat, 28 Mar 2020 18:02:11 +0100 Subject: Add location to transform functions. --- cparser/Bitfields.ml | 8 ++++---- cparser/StructPassing.ml | 12 ++++++------ cparser/Transform.ml | 24 ++++++++++++------------ cparser/Transform.mli | 12 ++++++------ 4 files changed, 28 insertions(+), 28 deletions(-) (limited to 'cparser') diff --git a/cparser/Bitfields.ml b/cparser/Bitfields.ml index 696a9a8d..efb82b01 100644 --- a/cparser/Bitfields.ml +++ b/cparser/Bitfields.ml @@ -189,7 +189,7 @@ let rec transf_union_members env id count = function { fld_name = carrier; fld_typ = carrier_typ; fld_bitfield = None; fld_anonymous = false;} :: transf_union_members env id (count + 1) ms) -let transf_composite env su id attr ml = +let transf_composite env loc su id attr ml = if List.for_all (fun f -> f.fld_bitfield = None) ml then (attr, ml) else begin @@ -550,7 +550,7 @@ and transf_init env i = (* Declarations *) -let transf_decl env (sto, id, ty, init_opt) = +let transf_decl env loc (sto, id, ty, init_opt) = (sto, id, ty, match init_opt with None -> None | Some i -> Some(transf_init env i)) @@ -559,12 +559,12 @@ let transf_decl env (sto, id, ty, init_opt) = let transf_stmt env s = Transform.stmt ~expr:(fun loc env ctx e -> transf_exp env ctx e) - ~decl:transf_decl + ~decl:(fun env (sto, id, ty, init_opt) -> transf_decl env s.sloc (sto, id, ty, init_opt)) env s (* Functions *) -let transf_fundef env f = +let transf_fundef env loc f = Transform.fundef transf_stmt env f (* Programs *) diff --git a/cparser/StructPassing.ml b/cparser/StructPassing.ml index 5c6454f0..222da367 100644 --- a/cparser/StructPassing.ml +++ b/cparser/StructPassing.ml @@ -424,7 +424,7 @@ and transf_init env = function (* Declarations *) -let transf_decl env (sto, id, ty, init) = +let transf_decl env loc (sto, id, ty, init) = (sto, id, transf_type env ty, match init with None -> None | Some i -> Some (transf_init env i)) @@ -494,7 +494,7 @@ let rec transf_stmt s = | Sblock sl -> {s with sdesc = Sblock(List.map transf_stmt sl)} | Sdecl d -> - {s with sdesc = Sdecl(transf_decl env d)} + {s with sdesc = Sdecl(transf_decl env s.sloc d)} | Sasm(attr, template, outputs, inputs, clob) -> {s with sdesc = Sasm(attr, template, List.map transf_asm_operand outputs, @@ -540,13 +540,13 @@ let rec transf_funparams loc env params = actions, IdentMap.add x (ereinterpret tx' y) subst) -let transf_fundef env f = +let transf_fundef env loc f = reset_temps(); let ret = transf_type env f.fd_ret in let (params, actions, subst) = transf_funparams f.fd_body.sloc env f.fd_params in let locals = - List.map (fun d -> transf_decl env (subst_decl subst d)) f.fd_locals in + List.map (fun d -> transf_decl env loc (subst_decl subst d)) f.fd_locals in let (attr1, ret1, params1, body1) = match classify_return env f.fd_ret with | Ret_scalar -> @@ -577,7 +577,7 @@ let transf_fundef env f = (* Composites *) -let transf_composite env su id attr fl = +let transf_composite env loc su id attr fl = (attr, List.map (fun f -> {f with fld_typ = transf_type env f.fld_typ}) fl) (* Entry point *) @@ -595,5 +595,5 @@ let program p = ~decl:transf_decl ~fundef:transf_fundef ~composite:transf_composite - ~typedef:(fun env id ty -> transf_type env ty) + ~typedef:(fun env loc id ty -> transf_type env ty) p diff --git a/cparser/Transform.ml b/cparser/Transform.ml index 349a3155..6774a9b6 100644 --- a/cparser/Transform.ml +++ b/cparser/Transform.ml @@ -191,12 +191,12 @@ let fundef trstmt env f = (* Generic transformation of a program *) let program - ?(decl = fun env d -> d) - ?(fundef = fun env fd -> fd) - ?(composite = fun env su id attr fl -> (attr, fl)) - ?(typedef = fun env id ty -> ty) - ?(enum = fun env id attr members -> (attr, members)) - ?(pragma = fun env s -> s) + ?(decl = fun env loc d -> d) + ?(fundef = fun env loc fd -> fd) + ?(composite = fun env loc su id attr fl -> (attr, fl)) + ?(typedef = fun env loc id ty -> ty) + ?(enum = fun env loc id attr members -> (attr, members)) + ?(pragma = fun env loc s -> s) p = let rec transf_globdecls env accu = function @@ -205,25 +205,25 @@ let program let (desc', env') = match g.gdesc with | Gdecl((sto, id, ty, init) as d) -> - (Gdecl(decl env d), Env.add_ident env id sto ty) + (Gdecl(decl env g.gloc d), Env.add_ident env id sto ty) | Gfundef f -> - (Gfundef(fundef env f), + (Gfundef(fundef env g.gloc f), Env.add_ident env f.fd_name f.fd_storage (fundef_typ f)) | Gcompositedecl(su, id, attr) -> (Gcompositedecl(su, id, attr), Env.add_composite env id (composite_info_decl su attr)) | Gcompositedef(su, id, attr, fl) -> - let (attr', fl') = composite env su id attr fl in + let (attr', fl') = composite env g.gloc su id attr fl in (Gcompositedef(su, id, attr', fl'), Env.add_composite env id (composite_info_def env su attr fl)) | Gtypedef(id, ty) -> - (Gtypedef(id, typedef env id ty), Env.add_typedef env id ty) + (Gtypedef(id, typedef env g.gloc id ty), Env.add_typedef env id ty) | Genumdef(id, attr, members) -> - let (attr', members') = enum env id attr members in + let (attr', members') = enum env g.gloc id attr members in (Genumdef(id, attr', members'), Env.add_enum env id {ei_members = members; ei_attr = attr}) | Gpragma s -> - (Gpragma(pragma env s), env) + (Gpragma(pragma env g.gloc s), env) in transf_globdecls env' ({g with gdesc = desc'} :: accu) gl diff --git a/cparser/Transform.mli b/cparser/Transform.mli index dbd8e575..220b7944 100644 --- a/cparser/Transform.mli +++ b/cparser/Transform.mli @@ -62,14 +62,14 @@ val fundef : (Env.t -> C.stmt -> C.stmt) -> Env.t -> C.fundef -> C.fundef (** Generic transformation of a program *) val program : - ?decl:(Env.t -> C.decl -> C.decl) -> - ?fundef:(Env.t -> C.fundef -> C.fundef) -> - ?composite:(Env.t -> C.struct_or_union -> + ?decl:(Env.t -> C.location -> C.decl -> C.decl) -> + ?fundef:(Env.t -> C.location -> C.fundef -> C.fundef) -> + ?composite:(Env.t -> C.location -> C.struct_or_union -> C.ident -> C.attributes -> C.field list -> C.attributes * C.field list) -> - ?typedef:(Env.t -> C.ident -> C.typ -> C.typ) -> - ?enum:(Env.t -> C.ident -> C.attributes -> C.enumerator list -> + ?typedef:(Env.t -> C.location -> C.ident -> C.typ -> C.typ) -> + ?enum:(Env.t -> C.location -> C.ident -> C.attributes -> C.enumerator list -> C.attributes * C.enumerator list) -> - ?pragma:(Env.t -> string -> string) -> + ?pragma:(Env.t -> C.location -> string -> string) -> C.program -> C.program -- cgit From 99c97f7267a803bf92011857f5edbc8597e6b8da Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Sat, 28 Mar 2020 18:04:15 +0100 Subject: Added warning for packed composite with bitfields. --- cparser/Bitfields.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cparser') diff --git a/cparser/Bitfields.ml b/cparser/Bitfields.ml index efb82b01..9ca40e70 100644 --- a/cparser/Bitfields.ml +++ b/cparser/Bitfields.ml @@ -193,6 +193,8 @@ let transf_composite env loc su id attr ml = if List.for_all (fun f -> f.fld_bitfield = None) ml then (attr, ml) else begin + if find_custom_attributes ["packed";"__packed__"] attr <> [] then + Diagnostics.error loc "bitfields in packed structs not allowed"; let ml' = match su with | Struct -> transf_struct_members env id 1 ml -- cgit From 202c96018bf086dd6941bc2483aec0e77d3128ad Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 30 Mar 2020 19:25:49 +0200 Subject: Check for errors after each pass. --- cparser/Parse.ml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cparser') diff --git a/cparser/Parse.ml b/cparser/Parse.ml index 29245083..d9f9aa1c 100644 --- a/cparser/Parse.ml +++ b/cparser/Parse.ml @@ -18,7 +18,14 @@ module CharSet = Set.Make(struct type t = char let compare = compare end) let transform_program t p name = - let run_pass pass flag p = if CharSet.mem flag t then pass p else p in + let run_pass pass flag p = + if CharSet.mem flag t then begin + let p = pass p in + Diagnostics.check_errors (); + p + end else + p + in let p1 = (run_pass StructPassing.program 's' (run_pass PackedStructs.program 'p' (run_pass Unblock.program 'b' -- cgit From 19aed83caebcae1103e0c4f6e200744492f17545 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 24 Apr 2020 15:17:37 +0200 Subject: Use Hashtbl.find_opt. Replace the pattern `try Some (Hashtbl.find ...) with Not_found -> None` by a call to the function Hashtbl.find_opt. --- cparser/Bitfields.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cparser') diff --git a/cparser/Bitfields.ml b/cparser/Bitfields.ml index 9ca40e70..7a00f719 100644 --- a/cparser/Bitfields.ml +++ b/cparser/Bitfields.ml @@ -50,8 +50,7 @@ let bitfield_table = (Hashtbl.create 57: (ident * string, bitfield_info) Hashtbl.t) let is_bitfield structid fieldname = - try Some (Hashtbl.find bitfield_table (structid, fieldname)) - with Not_found -> None + Hashtbl.find_opt bitfield_table (structid, fieldname) (* Mapping struct/union identifier -> list of members after transformation, including the carrier fields, but without the bit fields. -- cgit From 127b00c573ca5fef4245e77bac89e1093a7ec0d2 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 24 Apr 2020 15:21:44 +0200 Subject: Use library function. The function String.uppercase was deprecated and the replacement function String.upercase_ascii was only available from OCaml 4.03.0. Since the minimal OCaml version is now 4.05.0 we can use the function String.upercase_ascii. --- cparser/Elab.ml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cparser') diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 9e17cb7e..4f2ddce7 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -329,10 +329,7 @@ let integer_representable v ik = v >= 0L && v < Int64.shift_left 1L (bitsize - 1) let elab_int_constant loc s0 = - let s = String.map (fun d -> match d with - | '0'..'9' | 'A'..'F' | 'L' | 'U' | 'X' -> d - | 'a'..'f' | 'l' | 'u' | 'x' -> Char.chr (Char.code d - 32) - | _ -> error loc "bad digit '%c' in integer literal '%s'" d s0; d) s0 in + let s = String.uppercase_ascii s0 in (* Determine possible types and chop type suffix *) let (s, dec_kinds, hex_kinds) = if has_suffix s "ULL" || has_suffix s "LLU" then -- cgit From ad2ea9c2e701dd82c26e6cd3e8a777be9bdef2a2 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 29 Apr 2020 15:12:54 +0200 Subject: Move shared code in new file. The name_of_register and register_of_name function are shared between all architectures and can be moved in a common file. --- cparser/ExtendedAsm.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser') diff --git a/cparser/ExtendedAsm.ml b/cparser/ExtendedAsm.ml index 257e9cf7..df2da2a2 100644 --- a/cparser/ExtendedAsm.ml +++ b/cparser/ExtendedAsm.ml @@ -156,7 +156,7 @@ let transf_outputs loc env = function let check_clobbers loc clob = List.iter (fun c -> - if Machregsaux.register_by_name c <> None + if Machregsnames.register_by_name c <> None || Machregsaux.is_scratch_register c || c = "memory" || c = "cc" (* GCC does not accept MEMORY or CC *) then () -- cgit From f8cfbc1bc22c06835e9ea7b0cab41a8f25b523ba Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 2 Jul 2020 14:52:34 +0200 Subject: Introduce additional "branch" build information. --- cparser/Diagnostics.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cparser') diff --git a/cparser/Diagnostics.ml b/cparser/Diagnostics.ml index 7957375c..86a5e522 100644 --- a/cparser/Diagnostics.ml +++ b/cparser/Diagnostics.ml @@ -400,16 +400,16 @@ let raise_on_errors () = raise Abort let crash exn = - if Version.buildnr <> "" && Version.tag <> "" then begin + if Version.buildnr <> "" && Version.tag <> "" && Version.branch <> "" then begin let backtrace = Printexc.get_backtrace () in - eprintf "%tThis is CompCert, Release %s, Build:%s, Tag:%s%t\n" - bc Version.version Version.buildnr Version.tag rsc; + eprintf "%tThis is CompCert, Release %s, Build:%s, Tag:%s, Branch:%s%t\n" + bc Version.version Version.buildnr Version.tag Version.branch rsc; eprintf "Backtrace (please include this in your support request):\n%s" backtrace; eprintf "%tUncaught exception: %s.\n\ \ Please report this problem to our support.\n\ -\ Error occurred in Build: %s, Tag: %s.\n%t" - rc (Printexc.to_string exn) Version.buildnr Version.tag rsc; +\ Error occurred in Build: %s, Tag: %s, Branch %s.\n%t" + rc (Printexc.to_string exn) Version.buildnr Version.tag Version.branch rsc; exit 2 end else begin let backtrace = Printexc.get_backtrace () -- cgit From b4c6087cd0faf3d165ca5450f7462b9fbe98796f Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 20 Jul 2020 11:55:35 +0200 Subject: Added error for redefined builtin. We check in the initial environment if a function is already defined to avoid redefinition of functions that are part of the builtin environment. --- cparser/Elab.ml | 2 ++ cparser/Env.ml | 3 +++ cparser/Env.mli | 1 + 3 files changed, 6 insertions(+) (limited to 'cparser') diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 4f2ddce7..b74e34d0 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -2624,6 +2624,8 @@ let elab_fundef genv spec name defs body loc = and structs and unions defined in the parameter list. *) let (fun_id, sto, inline, noret, ty, kr_params, genv, lenv) = elab_fundef_name genv spec name in + if Env.is_builtin fun_id.C.name then + error loc "definition of builtin function '%s'" fun_id.C.name; let s = fun_id.C.name in if sto = Storage_auto || sto = Storage_register then fatal_error loc "invalid storage class %s on function" diff --git a/cparser/Env.ml b/cparser/Env.ml index 4723a725..00806be1 100644 --- a/cparser/Env.ml +++ b/cparser/Env.ml @@ -316,6 +316,9 @@ let set_builtins blt = List.iter Init.add_typedef blt.builtin_typedefs; List.iter Init.add_function blt.builtin_functions +let is_builtin name = + ident_is_bound !Init.env name + (* Error reporting *) open Printf diff --git a/cparser/Env.mli b/cparser/Env.mli index 1baab68f..589a76c7 100644 --- a/cparser/Env.mli +++ b/cparser/Env.mli @@ -84,3 +84,4 @@ val initial: unit -> t val initial_identifiers: unit -> C.ident list val initial_declarations: unit -> C.globdecl list val set_builtins: C.builtins -> unit +val is_builtin : string -> bool -- cgit From 4adf6e3a967055df66fb815c92350dc835bb06dc Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 21 Jul 2020 13:17:38 +0200 Subject: Use the correct location for Slabaled in transform. --- cparser/Transform.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cparser') diff --git a/cparser/Transform.ml b/cparser/Transform.ml index 6774a9b6..a57d94c4 100644 --- a/cparser/Transform.ml +++ b/cparser/Transform.ml @@ -161,8 +161,8 @@ let stmt ~expr ?(decl = fun env decl -> assert false) env s = | Scontinue -> s | Sswitch(e, s1) -> {s with sdesc = Sswitch(expr s.sloc env Val e, stm s1)} - | Slabeled(lbl, s) -> - {s with sdesc = Slabeled(lbl, stm s)} + | Slabeled(lbl, s1) -> + {s with sdesc = Slabeled(lbl, stm s1)} | Sgoto lbl -> s | Sreturn None -> s | Sreturn (Some e) -> -- cgit From 3a1b0e98a09dd9688e8f45f9677b7ea25f4720bf Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 21 Jul 2020 17:09:45 +0200 Subject: Support __builtin_constant_p as in GCC and Clang (#367) Returns 1 if the argument is a constant expression, 0 otherwise. Closes: #366 --- cparser/Elab.ml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cparser') diff --git a/cparser/Elab.ml b/cparser/Elab.ml index b74e34d0..4bd0bdfa 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -1809,6 +1809,16 @@ let elab_expr ctx loc env a = (print_typ env) ty (print_typ env) ty' (print_typ env) ty' (print_typ env) ty; { edesc = ECall(ident, [b2; b3]); etyp = ty },env + | CALL(VARIABLE "__builtin_constant_p", al) -> + begin match al with + | [a1] -> + let b1,env = elab env a1 in + let v = if Ceval.is_constant_expr env b1 then 1L else 0L in + intconst v IInt, env + | _ -> + fatal_error "'__builtin_constant_p' expects one argument" + end + | CALL((VARIABLE "__builtin_sel" as a0), al) -> begin match al with | [a1; a2; a3] -> -- cgit From a8ce85adbf2863e98e5c24e9cc6f82947d4b3a29 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 21 Jul 2020 18:42:27 +0200 Subject: Support _Static_assert from C11 --- cparser/Cabs.v | 2 + cparser/Cabshelper.ml | 1 + cparser/Elab.ml | 30 +- cparser/Lexer.mll | 2 + cparser/Parser.vy | 19 +- cparser/handcrafted.messages | 2114 +++++++++++++++++++++--------------------- cparser/pre_parser.mly | 8 +- 7 files changed, 1116 insertions(+), 1060 deletions(-) (limited to 'cparser') diff --git a/cparser/Cabs.v b/cparser/Cabs.v index 5f12e8a1..ff046cba 100644 --- a/cparser/Cabs.v +++ b/cparser/Cabs.v @@ -92,6 +92,7 @@ with parameter := (* The optional expression is the bitfield *) with field_group := | Field_group : list spec_elem -> list (option name * option expression) -> loc -> field_group + | Field_group_static_assert : expression -> loc -> constant -> loc -> loc -> field_group (* The decl_type is in the order in which they are printed. Only the name of * the declared identifier is pulled out. *) @@ -197,6 +198,7 @@ Inductive definition := | FUNDEF : list spec_elem -> name -> list definition -> statement -> loc -> definition | DECDEF : init_name_group -> loc -> definition (* global variable(s), or function prototype *) | PRAGMA : string -> loc -> definition + | STATIC_ASSERT : expression -> loc -> constant -> loc -> loc -> definition (* ** statements diff --git a/cparser/Cabshelper.ml b/cparser/Cabshelper.ml index 22f3b3c7..7cffef08 100644 --- a/cparser/Cabshelper.ml +++ b/cparser/Cabshelper.ml @@ -44,6 +44,7 @@ let get_definitionloc (d : definition) : loc = | FUNDEF(_, _, _, _, l) -> l | DECDEF(_, l) -> l | PRAGMA(_, l) -> l + | STATIC_ASSERT(_, _, _, _, l) -> l let get_statementloc (s : statement) : loc = begin diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 4bd0bdfa..ab91ada2 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -459,6 +459,23 @@ let elab_simple_string loc wide chars = | CStr s -> s | _ -> error loc "cannot use wide string literal in 'asm'"; "" +(** Elaboration and checking of static assertions *) + +let elab_static_assert env exp loc_exp msg loc_msg loc = + let (exp, env) = !elab_expr_f loc_exp env exp in + match Ceval.integer_expr env exp with + | None -> + error loc_exp "expression in static assertion is not an integer constant" + | Some n -> + if n = 0L then begin + match elab_constant loc_msg msg with + | CStr s -> + error loc "static assertion failed: \"%s\"" s + | _ -> + (* This can happen with a wide string literal *) + error loc "static assertion failed (cannot display associated message)" + end + (** * Elaboration of type expressions, type specifiers, name declarations *) @@ -954,7 +971,9 @@ and elab_name_group loc env (spec, namelist) = (* Elaboration of a field group *) -and elab_field_group env (Field_group (spec, fieldlist, loc)) = +and elab_field_group env = function + +| Field_group (spec, fieldlist, loc) -> let fieldlist = List.map (function (None, x) -> (Name ("", JUSTBASE, [], loc), x) @@ -1019,6 +1038,10 @@ and elab_field_group env (Field_group (spec, fieldlist, loc)) = in (mmap2 elab_bitfield env' fieldlist names) +| Field_group_static_assert(exp, loc_exp, msg, loc_msg, loc) -> + elab_static_assert env exp loc_exp msg loc_msg loc; + ([], env) + (* Elaboration of a struct or union. C99 section 6.7.2.1 *) and elab_struct_or_union_info kind loc env members attrs = @@ -2839,6 +2862,11 @@ let elab_definition (for_loop: bool) (local: bool) (nonstatic_inline: bool) emit_elab env loc (Gpragma s); ([], env) + (* static assertion *) + | STATIC_ASSERT(exp, loc_exp, msg, loc_msg, loc) -> + elab_static_assert env exp loc_exp msg loc_msg loc; + ([], env) + (* Extended asm *) let elab_asm_operand ctx loc env (ASMOPERAND(label, wide, chars, e)) = diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll index e44a330f..881d411a 100644 --- a/cparser/Lexer.mll +++ b/cparser/Lexer.mll @@ -35,6 +35,7 @@ let () = ("_Bool", fun loc -> UNDERSCORE_BOOL loc); ("_Complex", fun loc -> reserved_keyword loc "_Complex"); ("_Imaginary", fun loc -> reserved_keyword loc "_Imaginary"); + ("_Static_assert", fun loc -> STATIC_ASSERT loc); ("__alignof", fun loc -> ALIGNOF loc); ("__alignof__", fun loc -> ALIGNOF loc); ("__asm", fun loc -> ASM loc); @@ -577,6 +578,7 @@ and singleline_comment = parse | Pre_parser.SLASH loc -> loop (Parser.SLASH loc) | Pre_parser.STAR loc -> loop (Parser.STAR loc) | Pre_parser.STATIC loc -> loop (Parser.STATIC loc) + | Pre_parser.STATIC_ASSERT loc -> loop (Parser.STATIC_ASSERT loc) | Pre_parser.STRING_LITERAL (wide, str, loc) -> (* Merge consecutive string literals *) let rec doConcat wide str = diff --git a/cparser/Parser.vy b/cparser/Parser.vy index 03bfa590..93d84ecf 100644 --- a/cparser/Parser.vy +++ b/cparser/Parser.vy @@ -37,7 +37,7 @@ Require Cabs. STRUCT UNION ENUM UNDERSCORE_BOOL PACKED ALIGNAS ATTRIBUTE ASM %token CASE DEFAULT IF_ ELSE SWITCH WHILE DO FOR GOTO CONTINUE BREAK - RETURN BUILTIN_VA_ARG BUILTIN_OFFSETOF + RETURN BUILTIN_VA_ARG BUILTIN_OFFSETOF STATIC_ASSERT %token EOF @@ -55,6 +55,8 @@ Require Cabs. %type declaration_specifiers_typespec_opt %type init_declarator_list %type init_declarator +%type<(Cabs.expression * Cabs.loc) * (Cabs.constant * Cabs.loc) * Cabs.loc> + static_assert_declaration %type storage_class_specifier %type type_specifier struct_or_union_specifier enum_specifier %type struct_or_union @@ -343,6 +345,9 @@ declaration: { Cabs.DECDEF (fst decspec, rev' decls) (snd decspec) } | decspec = declaration_specifiers SEMICOLON { Cabs.DECDEF (fst decspec, []) (snd decspec) } +| asrt = static_assert_declaration + { let '((e, loc_e), (s, loc_s), loc) := asrt in + Cabs.STATIC_ASSERT e loc_e s loc_s loc } declaration_specifiers_typespec_opt: | storage = storage_class_specifier rest = declaration_specifiers_typespec_opt @@ -459,6 +464,10 @@ struct_declaration: (* Extension to C99 grammar needed to parse some GNU header files. *) | decspec = specifier_qualifier_list SEMICOLON { Cabs.Field_group (fst decspec) [(None,None)] (snd decspec) } +(* C11 static assertions *) +| asrt = static_assert_declaration + { let '((e, loc_e), (s, loc_s), loc) := asrt in + Cabs.Field_group_static_assert e loc_e s loc_s loc } specifier_qualifier_list: | typ = type_specifier rest = specifier_qualifier_list @@ -749,6 +758,14 @@ designator: | DOT id = OTHER_NAME { Cabs.INFIELD_INIT (fst id) } +(* C11 6.7.10 *) + +static_assert_declaration: +| loc = STATIC_ASSERT LPAREN expr = constant_expression + COMMA str = STRING_LITERAL RPAREN SEMICOLON + { let '((wide, chars), locs) := str in + (expr, (Cabs.CONST_STRING wide chars, locs), loc) } + (* 6.8 *) statement_dangerous: | stmt = labeled_statement(statement_dangerous) diff --git a/cparser/handcrafted.messages b/cparser/handcrafted.messages index 6d972439..a5f365dc 100644 --- a/cparser/handcrafted.messages +++ b/cparser/handcrafted.messages @@ -179,22 +179,22 @@ # ------------------------------------------------------------------------------ -translation_unit_file: ALIGNAS LPAREN INT XOR_ASSIGN +translation_unit_file: ALIGNAS LPAREN INT XOR_ASSIGN ## -## Ends in an error in state: 314. +## Ends in an error in state: 322. ## ## attribute_specifier -> ALIGNAS LPAREN type_name . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ALIGNAS LPAREN type_name +## ALIGNAS LPAREN type_name ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name) -## In state 306, spurious reduction of production option(abstract_declarator(type_name)) -> -## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) +## In state 314, spurious reduction of production option(abstract_declarator(type_name)) -> +## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) ## # Maybe the type name was not complete, but we have reduced anyway @@ -212,40 +212,40 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF LPAREN VOID XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF LPAREN VOID XOR_ASSIGN ## -## Ends in an error in state: 304. +## Ends in an error in state: 312. ## ## unary_expression -> ALIGNOF LPAREN type_name . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## ALIGNOF LPAREN type_name +## ALIGNOF LPAREN type_name ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name) -## In state 306, spurious reduction of production option(abstract_declarator(type_name)) -> -## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) +## In state 314, spurious reduction of production option(abstract_declarator(type_name)) -> +## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN VOID XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN VOID XOR_ASSIGN ## -## Ends in an error in state: 388. +## Ends in an error in state: 396. ## ## postfix_expression -> LPAREN type_name . RPAREN LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## unary_expression -> SIZEOF LPAREN type_name . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## SIZEOF LPAREN type_name +## SIZEOF LPAREN type_name ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name) -## In state 306, spurious reduction of production option(abstract_declarator(type_name)) -> -## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) +## In state 314, spurious reduction of production option(abstract_declarator(type_name)) -> +## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) ## Ill-formed use of $2. @@ -256,22 +256,22 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME COMMA VOID XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME COMMA VOID XOR_ASSIGN ## -## Ends in an error in state: 333. +## Ends in an error in state: 341. ## ## postfix_expression -> BUILTIN_VA_ARG LPAREN assignment_expression COMMA type_name . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## BUILTIN_VA_ARG LPAREN assignment_expression COMMA type_name +## BUILTIN_VA_ARG LPAREN assignment_expression COMMA type_name ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name) -## In state 306, spurious reduction of production option(abstract_declarator(type_name)) -> -## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) +## In state 314, spurious reduction of production option(abstract_declarator(type_name)) -> +## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) ## Ill-formed use of __builtin_va_arg. @@ -282,22 +282,22 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN VOID XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN VOID XOR_ASSIGN ## -## Ends in an error in state: 363. +## Ends in an error in state: 371. ## ## postfix_expression -> LPAREN type_name . RPAREN LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## LPAREN type_name +## LPAREN type_name ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name) -## In state 306, spurious reduction of production option(abstract_declarator(type_name)) -> -## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) +## In state 314, spurious reduction of production option(abstract_declarator(type_name)) -> +## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) ## # gcc simply says it expects a closing parenthesis, @@ -311,23 +311,23 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN VOID XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN VOID XOR_ASSIGN ## -## Ends in an error in state: 385. +## Ends in an error in state: 393. ## ## cast_expression -> LPAREN type_name . RPAREN cast_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## postfix_expression -> LPAREN type_name . RPAREN LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## LPAREN type_name +## LPAREN type_name ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name) -## In state 306, spurious reduction of production option(abstract_declarator(type_name)) -> -## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) +## In state 314, spurious reduction of production option(abstract_declarator(type_name)) -> +## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) ## # gcc and clang say they expect a closing parenthesis. @@ -339,35 +339,35 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ALIGNAS LPAREN PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: ALIGNAS LPAREN PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 316. +## Ends in an error in state: 324. ## ## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ] ## attribute_specifier -> ALIGNAS LPAREN argument_expression_list . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ALIGNAS LPAREN argument_expression_list +## ALIGNAS LPAREN argument_expression_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 230, spurious reduction of production argument_expression_list -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 155, spurious reduction of production argument_expression_list -> assignment_expression ## # We are trying to recognize an alignas specifier. @@ -389,27 +389,27 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ALIGNAS LPAREN INT LBRACK RPAREN +translation_unit_file: ALIGNAS LPAREN INT LBRACK RPAREN ## -## Ends in an error in state: 151. +## Ends in an error in state: 248. ## ## direct_abstract_declarator -> option(direct_abstract_declarator) LBRACK option(type_qualifier_list) . optional(assignment_expression,RBRACK) [ RPAREN LPAREN LBRACK COMMA ] ## type_qualifier_list -> option(type_qualifier_list) . type_qualifier_noattr [ VOLATILE TILDE STRING_LITERAL STAR SIZEOF RESTRICT RBRACK PRE_NAME PLUS PACKED MINUS LPAREN INC DEC CONSTANT CONST BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG ATTRIBUTE AND ALIGNOF ALIGNAS ] ## type_qualifier_list -> option(type_qualifier_list) . attribute_specifier [ VOLATILE TILDE STRING_LITERAL STAR SIZEOF RESTRICT RBRACK PRE_NAME PLUS PACKED MINUS LPAREN INC DEC CONSTANT CONST BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## option(direct_abstract_declarator) LBRACK option(type_qualifier_list) +## option(direct_abstract_declarator) LBRACK option(type_qualifier_list) ## -translation_unit_file: INT PRE_NAME VAR_NAME LBRACK RPAREN +translation_unit_file: INT PRE_NAME VAR_NAME LBRACK RPAREN ## -## Ends in an error in state: 257. +## Ends in an error in state: 265. ## ## direct_declarator -> direct_declarator LBRACK option(type_qualifier_list) . optional(assignment_expression,RBRACK) [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## type_qualifier_list -> option(type_qualifier_list) . type_qualifier_noattr [ VOLATILE TILDE STRING_LITERAL STAR SIZEOF RESTRICT RBRACK PRE_NAME PLUS PACKED MINUS LPAREN INC DEC CONSTANT CONST BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG ATTRIBUTE AND ALIGNOF ALIGNAS ] ## type_qualifier_list -> option(type_qualifier_list) . attribute_specifier [ VOLATILE TILDE STRING_LITERAL STAR SIZEOF RESTRICT RBRACK PRE_NAME PLUS PACKED MINUS LPAREN INC DEC CONSTANT CONST BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## direct_declarator LBRACK option(type_qualifier_list) +## direct_declarator LBRACK option(type_qualifier_list) ## # We are trying to recognize an array declarator. @@ -434,32 +434,32 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: ALIGNAS LPAREN INT LPAREN INT COMMA ELLIPSIS XOR_ASSIGN +translation_unit_file: ALIGNAS LPAREN INT LPAREN INT COMMA ELLIPSIS XOR_ASSIGN ## -## Ends in an error in state: 268. +## Ends in an error in state: 276. ## ## direct_abstract_declarator -> LPAREN option(context_parameter_type_list) . RPAREN [ RPAREN LPAREN LBRACK COMMA ] ## ## The known suffix of the stack is as follows: -## LPAREN option(context_parameter_type_list) +## LPAREN option(context_parameter_type_list) ## -translation_unit_file: ALIGNAS LPAREN INT LBRACK RBRACK LPAREN INT COMMA ELLIPSIS XOR_ASSIGN +translation_unit_file: ALIGNAS LPAREN INT LBRACK RBRACK LPAREN INT COMMA ELLIPSIS XOR_ASSIGN ## -## Ends in an error in state: 251. +## Ends in an error in state: 259. ## ## direct_abstract_declarator -> direct_abstract_declarator LPAREN option(context_parameter_type_list) . RPAREN [ RPAREN LPAREN LBRACK COMMA ] ## ## The known suffix of the stack is as follows: -## direct_abstract_declarator LPAREN option(context_parameter_type_list) +## direct_abstract_declarator LPAREN option(context_parameter_type_list) ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT COMMA ELLIPSIS XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT COMMA ELLIPSIS XOR_ASSIGN ## -## Ends in an error in state: 285. +## Ends in an error in state: 293. ## ## direct_declarator -> direct_declarator LPAREN context_parameter_type_list . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## direct_declarator LPAREN context_parameter_type_list +## direct_declarator LPAREN context_parameter_type_list ## # Unlikely error, since only the ELLIPSIS allows us to tell that @@ -469,20 +469,20 @@ At this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ALIGNAS LPAREN INT LPAREN LPAREN RPAREN COMMA +translation_unit_file: ALIGNAS LPAREN INT LPAREN LPAREN RPAREN COMMA ## -## Ends in an error in state: 266. +## Ends in an error in state: 274. ## ## direct_abstract_declarator -> LPAREN save_context abstract_declarator(type_name) . RPAREN [ RPAREN LPAREN LBRACK COMMA ] ## ## The known suffix of the stack is as follows: -## LPAREN save_context abstract_declarator(type_name) +## LPAREN save_context abstract_declarator(type_name) ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 259, spurious reduction of production abstract_declarator(type_name) -> direct_abstract_declarator +## In state 267, spurious reduction of production abstract_declarator(type_name) -> direct_abstract_declarator ## # # The first LPAREN in this example must be the beginning of an abstract_declarator. @@ -511,15 +511,15 @@ At this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ALIGNAS LPAREN INT LPAREN XOR_ASSIGN +translation_unit_file: ALIGNAS LPAREN INT LPAREN XOR_ASSIGN ## -## Ends in an error in state: 307. +## Ends in an error in state: 315. ## ## direct_abstract_declarator -> LPAREN . save_context abstract_declarator(type_name) RPAREN [ RPAREN LPAREN LBRACK COMMA ] ## direct_abstract_declarator -> LPAREN . option(context_parameter_type_list) RPAREN [ RPAREN LPAREN LBRACK COMMA ] ## ## The known suffix of the stack is as follows: -## LPAREN +## LPAREN ## # gcc and clang both say they want a closing parenthesis. @@ -534,16 +534,16 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT LPAREN XOR_ASSIGN ## -## Ends in an error in state: 145. +## Ends in an error in state: 242. ## ## direct_abstract_declarator -> LPAREN . save_context abstract_declarator(type_name) RPAREN [ RPAREN LPAREN LBRACK COMMA ] ## direct_abstract_declarator -> LPAREN . option(context_parameter_type_list) RPAREN [ RPAREN LPAREN LBRACK COMMA ] ## direct_declarator -> LPAREN . save_context declarator RPAREN [ RPAREN PACKED LPAREN LBRACK COMMA ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## LPAREN +## LPAREN ## # Analogous to the above, but has a third item. @@ -557,16 +557,16 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: ALIGNAS LPAREN VOLATILE ADD_ASSIGN +translation_unit_file: ALIGNAS LPAREN VOLATILE ADD_ASSIGN ## -## Ends in an error in state: 299. +## Ends in an error in state: 307. ## ## option(type_qualifier_list) -> type_qualifier_list . [ VOLATILE RESTRICT PACKED CONST ATTRIBUTE ALIGNAS ] ## specifier_qualifier_list(type_name) -> type_qualifier_list . typedef_name option(type_qualifier_list) [ STAR RPAREN LPAREN LBRACK COMMA ] ## specifier_qualifier_list(type_name) -> type_qualifier_list . type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name) [ STAR RPAREN LPAREN LBRACK COMMA ] ## ## The known suffix of the stack is as follows: -## type_qualifier_list +## type_qualifier_list ## # We are trying to recognize a specifier-qualifier-list, and have not yet seen @@ -582,7 +582,7 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: ALIGNAS LPAREN XOR_ASSIGN +translation_unit_file: ALIGNAS LPAREN XOR_ASSIGN ## ## Ends in an error in state: 61. ## @@ -590,7 +590,7 @@ translation_unit_file: ALIGNAS LPAREN XOR_ASSIGN ## attribute_specifier -> ALIGNAS LPAREN . type_name RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ALIGNAS LPAREN +## ALIGNAS LPAREN ## # This one seems easy. We have recognized ALIGNAS LPAREN, and nothing that makes sense beyond that. @@ -604,7 +604,7 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: ALIGNAS XOR_ASSIGN +translation_unit_file: ALIGNAS XOR_ASSIGN ## ## Ends in an error in state: 60. ## @@ -612,7 +612,7 @@ translation_unit_file: ALIGNAS XOR_ASSIGN ## attribute_specifier -> ALIGNAS . LPAREN type_name RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ALIGNAS +## ALIGNAS ## # Fingers in the nose. @@ -622,14 +622,14 @@ At this point, an opening parenthesis '(' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ATTRIBUTE LPAREN LPAREN COMMA XOR_ASSIGN +translation_unit_file: ATTRIBUTE LPAREN LPAREN COMMA XOR_ASSIGN ## -## Ends in an error in state: 345. +## Ends in an error in state: 353. ## ## gcc_attribute_list -> gcc_attribute_list COMMA . gcc_attribute [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## gcc_attribute_list COMMA +## gcc_attribute_list COMMA ## # We are expecting a gcc_attribute. This symbol is nullable, so @@ -644,14 +644,14 @@ At this point, a gcc attribute is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ATTRIBUTE LPAREN LPAREN RPAREN XOR_ASSIGN +translation_unit_file: ATTRIBUTE LPAREN LPAREN RPAREN XOR_ASSIGN ## -## Ends in an error in state: 343. +## Ends in an error in state: 351. ## ## attribute_specifier -> ATTRIBUTE LPAREN LPAREN gcc_attribute_list RPAREN . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ATTRIBUTE LPAREN LPAREN gcc_attribute_list RPAREN +## ATTRIBUTE LPAREN LPAREN gcc_attribute_list RPAREN ## Ill-formed attribute specifier. @@ -659,15 +659,15 @@ At this point, a second closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN RPAREN XOR_ASSIGN +translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN RPAREN XOR_ASSIGN ## -## Ends in an error in state: 342. +## Ends in an error in state: 350. ## ## attribute_specifier -> ATTRIBUTE LPAREN LPAREN gcc_attribute_list . RPAREN RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## gcc_attribute_list -> gcc_attribute_list . COMMA gcc_attribute [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## ATTRIBUTE LPAREN LPAREN gcc_attribute_list +## ATTRIBUTE LPAREN LPAREN gcc_attribute_list ## # We have a seen a (non-empty) attribute list, so we expect either @@ -682,35 +682,35 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME COMMA PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME COMMA PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 338. +## Ends in an error in state: 346. ## ## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ] ## gcc_attribute -> gcc_attribute_word LPAREN typedef_name COMMA argument_expression_list . RPAREN [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## gcc_attribute_word LPAREN typedef_name COMMA argument_expression_list +## gcc_attribute_word LPAREN typedef_name COMMA argument_expression_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 230, spurious reduction of production argument_expression_list -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 155, spurious reduction of production argument_expression_list -> assignment_expression ## # We know for sure that we are parsing a gcc attribute. @@ -726,14 +726,14 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME COMMA XOR_ASSIGN +translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME COMMA XOR_ASSIGN ## -## Ends in an error in state: 337. +## Ends in an error in state: 345. ## ## gcc_attribute -> gcc_attribute_word LPAREN typedef_name COMMA . argument_expression_list RPAREN [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## gcc_attribute_word LPAREN typedef_name COMMA +## gcc_attribute_word LPAREN typedef_name COMMA ## # gcc/clang agree. @@ -743,14 +743,14 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 336. +## Ends in an error in state: 344. ## ## gcc_attribute -> gcc_attribute_word LPAREN typedef_name . COMMA argument_expression_list RPAREN [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## gcc_attribute_word LPAREN typedef_name +## gcc_attribute_word LPAREN typedef_name ## # gcc and clang complain about the TYPEDEF_NAME, not sure why. @@ -760,7 +760,7 @@ At this point, a comma ',' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN XOR_ASSIGN +translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN XOR_ASSIGN ## ## Ends in an error in state: 47. ## @@ -768,7 +768,7 @@ translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN XOR_ASSI ## gcc_attribute -> gcc_attribute_word LPAREN . typedef_name COMMA argument_expression_list RPAREN [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## gcc_attribute_word LPAREN +## gcc_attribute_word LPAREN ## # gcc and clang just say they expect an expression. @@ -780,7 +780,7 @@ At this point, a list of expressions is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME XOR_ASSIGN +translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME XOR_ASSIGN ## ## Ends in an error in state: 46. ## @@ -789,7 +789,7 @@ translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME XOR_ASSIGN ## gcc_attribute -> gcc_attribute_word . LPAREN typedef_name COMMA argument_expression_list RPAREN [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## gcc_attribute_word +## gcc_attribute_word ## # gcc and clang say they expect a closing parenthesis (as usual). @@ -806,14 +806,14 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: ATTRIBUTE LPAREN LPAREN XOR_ASSIGN +translation_unit_file: ATTRIBUTE LPAREN LPAREN XOR_ASSIGN ## ## Ends in an error in state: 39. ## ## attribute_specifier -> ATTRIBUTE LPAREN LPAREN . gcc_attribute_list RPAREN RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ATTRIBUTE LPAREN LPAREN +## ATTRIBUTE LPAREN LPAREN ## # A non-empty attribute list is expected. @@ -828,14 +828,14 @@ At this point, a gcc attribute is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ATTRIBUTE LPAREN XOR_ASSIGN +translation_unit_file: ATTRIBUTE LPAREN XOR_ASSIGN ## ## Ends in an error in state: 38. ## ## attribute_specifier -> ATTRIBUTE LPAREN . LPAREN gcc_attribute_list RPAREN RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ATTRIBUTE LPAREN +## ATTRIBUTE LPAREN ## Ill-formed gcc attribute specifier. @@ -843,14 +843,14 @@ At this point, a second opening parenthesis '(' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ATTRIBUTE XOR_ASSIGN +translation_unit_file: ATTRIBUTE XOR_ASSIGN ## ## Ends in an error in state: 37. ## ## attribute_specifier -> ATTRIBUTE . LPAREN LPAREN gcc_attribute_list RPAREN RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ATTRIBUTE +## ATTRIBUTE ## Ill-formed gcc attribute specifier. @@ -858,15 +858,15 @@ At this point, two opening parentheses '((' are expected. # ------------------------------------------------------------------------------ -translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN +translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN ## -## Ends in an error in state: 353. +## Ends in an error in state: 361. ## ## enumerator_list -> enumerator_list COMMA . declare_varname(enumerator) [ RBRACE COMMA ] ## option(COMMA) -> COMMA . [ RBRACE ] ## ## The known suffix of the stack is as follows: -## enumerator_list COMMA +## enumerator_list COMMA ## # We omit the possibility of a closing brace. @@ -879,36 +879,36 @@ At this point, an enumerator is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME EQ CONSTANT SEMICOLON +translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME EQ CONSTANT SEMICOLON ## -## Ends in an error in state: 352. +## Ends in an error in state: 360. ## ## enum_specifier -> ENUM attribute_specifier_list option(other_identifier) LBRACE enumerator_list . option(COMMA) RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## enumerator_list -> enumerator_list . COMMA declare_varname(enumerator) [ RBRACE COMMA ] ## ## The known suffix of the stack is as follows: -## ENUM attribute_specifier_list option(other_identifier) LBRACE enumerator_list +## ENUM attribute_specifier_list option(other_identifier) LBRACE enumerator_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 154, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 357, spurious reduction of production enumerator -> enumeration_constant EQ conditional_expression -## In state 354, spurious reduction of production declare_varname(enumerator) -> enumerator -## In state 361, spurious reduction of production enumerator_list -> declare_varname(enumerator) +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 79, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 365, spurious reduction of production enumerator -> enumeration_constant EQ conditional_expression +## In state 362, spurious reduction of production declare_varname(enumerator) -> enumerator +## In state 369, spurious reduction of production enumerator_list -> declare_varname(enumerator) ## # # At first sight, it seems that the last enumerator that we have recognized @@ -937,14 +937,14 @@ then at this point, a closing brace '}' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME EQ XOR_ASSIGN +translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME EQ XOR_ASSIGN ## -## Ends in an error in state: 356. +## Ends in an error in state: 364. ## ## enumerator -> enumeration_constant EQ . conditional_expression [ RBRACE COMMA ] ## ## The known suffix of the stack is as follows: -## enumeration_constant EQ +## enumeration_constant EQ ## Ill-formed enumeration specifier. @@ -952,15 +952,15 @@ At this point, a constant expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME XOR_ASSIGN +translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME XOR_ASSIGN ## -## Ends in an error in state: 355. +## Ends in an error in state: 363. ## ## enumerator -> enumeration_constant . [ RBRACE COMMA ] ## enumerator -> enumeration_constant . EQ conditional_expression [ RBRACE COMMA ] ## ## The known suffix of the stack is as follows: -## enumeration_constant +## enumeration_constant ## # Here, both clang and gcc give an incomplete diagnostic message. @@ -973,14 +973,14 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: ENUM LBRACE XOR_ASSIGN +translation_unit_file: ENUM LBRACE XOR_ASSIGN ## -## Ends in an error in state: 350. +## Ends in an error in state: 358. ## ## enum_specifier -> ENUM attribute_specifier_list option(other_identifier) LBRACE . enumerator_list option(COMMA) RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ENUM attribute_specifier_list option(other_identifier) LBRACE +## ENUM attribute_specifier_list option(other_identifier) LBRACE ## # gcc says it expects an identifier. @@ -991,15 +991,15 @@ At this point, an enumerator is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ENUM XOR_ASSIGN +translation_unit_file: ENUM XOR_ASSIGN ## -## Ends in an error in state: 348. +## Ends in an error in state: 356. ## ## enum_specifier -> ENUM attribute_specifier_list . option(other_identifier) LBRACE enumerator_list option(COMMA) RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## enum_specifier -> ENUM attribute_specifier_list . general_identifier [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ENUM attribute_specifier_list +## ENUM attribute_specifier_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an @@ -1018,16 +1018,16 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF LPAREN XOR_ASSIGN ## ## Ends in an error in state: 65. ## ## unary_expression -> ALIGNOF LPAREN . type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## ALIGNOF LPAREN +## ALIGNOF LPAREN ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN XOR_ASSIGN ## ## Ends in an error in state: 28. ## @@ -1036,7 +1036,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN XOR_ASSIGN ## unary_expression -> SIZEOF LPAREN . type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## SIZEOF LPAREN +## SIZEOF LPAREN ## # Tricky because we could be looking at the beginning of a compound @@ -1051,14 +1051,14 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF XOR_ASSIGN ## ## Ends in an error in state: 64. ## ## unary_expression -> ALIGNOF . LPAREN type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## ALIGNOF +## ALIGNOF ## Ill-formed use of $0. @@ -1067,7 +1067,7 @@ followed with a type name. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF XOR_ASSIGN ## ## Ends in an error in state: 23. ## @@ -1075,7 +1075,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF XOR_ASSIGN ## unary_expression -> SIZEOF . LPAREN type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## SIZEOF +## SIZEOF ## # Let's not reveal that sizeof can be used without parentheses. @@ -1089,33 +1089,33 @@ followed with an expression or a type name. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 331. +## Ends in an error in state: 339. ## ## postfix_expression -> BUILTIN_VA_ARG LPAREN assignment_expression . COMMA type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## BUILTIN_VA_ARG LPAREN assignment_expression +## BUILTIN_VA_ARG LPAREN assignment_expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression ## Ill-formed use of $2. @@ -1126,14 +1126,14 @@ then at this point, a comma ',' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN ## -## Ends in an error in state: 332. +## Ends in an error in state: 340. ## ## postfix_expression -> BUILTIN_VA_ARG LPAREN assignment_expression COMMA . type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## BUILTIN_VA_ARG LPAREN assignment_expression COMMA +## BUILTIN_VA_ARG LPAREN assignment_expression COMMA ## Ill-formed use of $3. @@ -1141,14 +1141,14 @@ At this point, a type name is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN XOR_ASSIGN ## ## Ends in an error in state: 51. ## ## postfix_expression -> BUILTIN_VA_ARG LPAREN . assignment_expression COMMA type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## BUILTIN_VA_ARG LPAREN +## BUILTIN_VA_ARG LPAREN ## Ill-formed use of $1. @@ -1156,14 +1156,14 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG XOR_ASSIGN ## ## Ends in an error in state: 50. ## ## postfix_expression -> BUILTIN_VA_ARG . LPAREN assignment_expression COMMA type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## BUILTIN_VA_ARG +## BUILTIN_VA_ARG ## Ill-formed use of $0. @@ -1171,23 +1171,23 @@ At this point, an opening parenthesis '(' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ DEC XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ DEC XOR_ASSIGN ## ## Ends in an error in state: 48. ## ## unary_expression -> DEC . unary_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## DEC +## DEC ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ INC XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ INC XOR_ASSIGN ## ## Ends in an error in state: 33. ## ## unary_expression -> INC . unary_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## INC +## INC ## Ill-formed expression. @@ -1195,14 +1195,14 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN INT RPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN INT RPAREN XOR_ASSIGN ## -## Ends in an error in state: 364. +## Ends in an error in state: 372. ## ## postfix_expression -> LPAREN type_name RPAREN . LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## LPAREN type_name RPAREN +## LPAREN type_name RPAREN ## # Here, we seem to be certain that this must be the beginning of a @@ -1226,7 +1226,7 @@ If this is intended to be the beginning of a cast expression, # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN XOR_ASSIGN ## ## Ends in an error in state: 34. ## @@ -1234,7 +1234,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN XOR_ASSIGN ## primary_expression -> LPAREN . expression RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## LPAREN +## LPAREN ## # gcc and clang expect an expression. @@ -1247,35 +1247,35 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 382. +## Ends in an error in state: 390. ## ## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ] ## primary_expression -> LPAREN expression . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## LPAREN expression +## LPAREN expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 224, spurious reduction of production expression -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 149, spurious reduction of production expression -> assignment_expression ## # Since we are saying "if this expression is complete", @@ -1291,36 +1291,36 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN LBRACE PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN LBRACE PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 379. +## Ends in an error in state: 387. ## ## initializer_list -> initializer_list . COMMA option(designation) c_initializer [ RBRACE COMMA ] ## postfix_expression -> LPAREN type_name RPAREN LBRACE initializer_list . option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## LPAREN type_name RPAREN LBRACE initializer_list +## LPAREN type_name RPAREN LBRACE initializer_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 372, spurious reduction of production c_initializer -> assignment_expression -## In state 378, spurious reduction of production initializer_list -> option(designation) c_initializer +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 380, spurious reduction of production c_initializer -> assignment_expression +## In state 386, spurious reduction of production initializer_list -> option(designation) c_initializer ## # Let's ignore the fact that a comma can precede a closing brace. @@ -1333,14 +1333,14 @@ then at this point, a closing brace '}' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN LBRACE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN LBRACE XOR_ASSIGN ## -## Ends in an error in state: 365. +## Ends in an error in state: 373. ## ## postfix_expression -> LPAREN type_name RPAREN LBRACE . initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## LPAREN type_name RPAREN LBRACE +## LPAREN type_name RPAREN LBRACE ## # gcc and clang say an expression is expected, which is incomplete. @@ -1350,15 +1350,15 @@ At this point, an initializer is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN XOR_ASSIGN ## -## Ends in an error in state: 386. +## Ends in an error in state: 394. ## ## cast_expression -> LPAREN type_name RPAREN . cast_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## postfix_expression -> LPAREN type_name RPAREN . LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## LPAREN type_name RPAREN +## LPAREN type_name RPAREN ## # clang and gcc expect an expression. @@ -1372,7 +1372,7 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN XOR_ASSIGN ## ## Ends in an error in state: 30. ## @@ -1381,7 +1381,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN XOR_ASSIGN ## primary_expression -> LPAREN . expression RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## LPAREN +## LPAREN ## # clang and gcc expect an expression. @@ -1394,14 +1394,14 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ TILDE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ TILDE XOR_ASSIGN ## -## Ends in an error in state: 153. +## Ends in an error in state: 78. ## ## unary_expression -> unary_operator . cast_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## unary_operator +## unary_operator ## # clang and gcc expect an expression. @@ -1411,95 +1411,95 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME AND XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME AND XOR_ASSIGN ## -## Ends in an error in state: 213. +## Ends in an error in state: 138. ## ## and_expression -> and_expression AND . equality_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION HAT COMMA COLON BARBAR BAR ANDAND AND ] ## ## The known suffix of the stack is as follows: -## and_expression AND +## and_expression AND ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME ANDAND XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME ANDAND XOR_ASSIGN ## -## Ends in an error in state: 202. +## Ends in an error in state: 127. ## ## logical_and_expression -> logical_and_expression ANDAND . inclusive_or_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION COMMA COLON BARBAR ANDAND ] ## ## The known suffix of the stack is as follows: -## logical_and_expression ANDAND +## logical_and_expression ANDAND ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BAR XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BAR XOR_ASSIGN ## -## Ends in an error in state: 204. +## Ends in an error in state: 129. ## ## inclusive_or_expression -> inclusive_or_expression BAR . exclusive_or_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION COMMA COLON BARBAR BAR ANDAND ] ## ## The known suffix of the stack is as follows: -## inclusive_or_expression BAR +## inclusive_or_expression BAR ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BARBAR XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BARBAR XOR_ASSIGN ## -## Ends in an error in state: 225. +## Ends in an error in state: 150. ## ## logical_or_expression -> logical_or_expression BARBAR . logical_and_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION COMMA COLON BARBAR ] ## ## The known suffix of the stack is as follows: -## logical_or_expression BARBAR +## logical_or_expression BARBAR ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME HAT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME HAT XOR_ASSIGN ## -## Ends in an error in state: 206. +## Ends in an error in state: 131. ## ## exclusive_or_expression -> exclusive_or_expression HAT . and_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION HAT COMMA COLON BARBAR BAR ANDAND ] ## ## The known suffix of the stack is as follows: -## exclusive_or_expression HAT +## exclusive_or_expression HAT ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LT XOR_ASSIGN ## -## Ends in an error in state: 196. +## Ends in an error in state: 121. ## ## relational_expression -> relational_expression relational_operator . shift_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION NEQ LT LEQ HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ] ## ## The known suffix of the stack is as follows: -## relational_expression relational_operator +## relational_expression relational_operator ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME NEQ XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME NEQ XOR_ASSIGN ## -## Ends in an error in state: 210. +## Ends in an error in state: 135. ## ## equality_expression -> equality_expression equality_operator . relational_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION NEQ HAT EQEQ COMMA COLON BARBAR BAR ANDAND AND ] ## ## The known suffix of the stack is as follows: -## equality_expression equality_operator +## equality_expression equality_operator ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME PLUS XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME PLUS XOR_ASSIGN ## -## Ends in an error in state: 189. +## Ends in an error in state: 114. ## ## additive_expression -> additive_expression additive_operator . multiplicative_expression [ SEMICOLON RPAREN RIGHT RBRACK RBRACE QUESTION PLUS NEQ MINUS LT LEQ LEFT HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ] ## ## The known suffix of the stack is as follows: -## additive_expression additive_operator +## additive_expression additive_operator ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME RIGHT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME RIGHT XOR_ASSIGN ## -## Ends in an error in state: 178. +## Ends in an error in state: 103. ## ## shift_expression -> shift_expression shift_operator . additive_expression [ SEMICOLON RPAREN RIGHT RBRACK RBRACE QUESTION NEQ LT LEQ LEFT HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ] ## ## The known suffix of the stack is as follows: -## shift_expression shift_operator +## shift_expression shift_operator ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME STAR XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME STAR XOR_ASSIGN ## -## Ends in an error in state: 183. +## Ends in an error in state: 108. ## ## multiplicative_expression -> multiplicative_expression multiplicative_operator . cast_expression [ STAR SLASH SEMICOLON RPAREN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT NEQ MINUS LT LEQ LEFT HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ] ## ## The known suffix of the stack is as follows: -## multiplicative_expression multiplicative_operator +## multiplicative_expression multiplicative_operator ## # clang and gcc expect an expression. @@ -1509,14 +1509,14 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME XOR_ASSIGN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME XOR_ASSIGN XOR_ASSIGN ## -## Ends in an error in state: 174. +## Ends in an error in state: 99. ## ## assignment_expression -> unary_expression assignment_operator . assignment_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ] ## ## The known suffix of the stack is as follows: -## unary_expression assignment_operator +## unary_expression assignment_operator ## # clang and gcc expect an expression. @@ -1526,14 +1526,14 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN ## -## Ends in an error in state: 232. +## Ends in an error in state: 157. ## ## argument_expression_list -> argument_expression_list COMMA . assignment_expression [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## argument_expression_list COMMA +## argument_expression_list COMMA ## # Here, we could say more about the context if we parameterized @@ -1547,23 +1547,23 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME DOT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME DOT XOR_ASSIGN ## -## Ends in an error in state: 238. +## Ends in an error in state: 163. ## ## postfix_expression -> postfix_expression DOT . general_identifier [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## postfix_expression DOT +## postfix_expression DOT ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME PTR XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME PTR XOR_ASSIGN ## -## Ends in an error in state: 159. +## Ends in an error in state: 84. ## ## postfix_expression -> postfix_expression PTR . general_identifier [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## postfix_expression PTR +## postfix_expression PTR ## # clang and gcc expect an identifier. @@ -1573,35 +1573,35 @@ At this point, the name of a struct or union member is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LBRACK PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LBRACK PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 235. +## Ends in an error in state: 160. ## ## expression -> expression . COMMA assignment_expression [ RBRACK COMMA ] ## postfix_expression -> postfix_expression LBRACK expression . RBRACK [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## postfix_expression LBRACK expression +## postfix_expression LBRACK expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 224, spurious reduction of production expression -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 149, spurious reduction of production expression -> assignment_expression ## # We know for sure that an array subscript expression has begun, and @@ -1618,14 +1618,14 @@ then at this point, a closing bracket ']' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LBRACK XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LBRACK XOR_ASSIGN ## -## Ends in an error in state: 234. +## Ends in an error in state: 159. ## ## postfix_expression -> postfix_expression LBRACK . expression RBRACK [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## postfix_expression LBRACK +## postfix_expression LBRACK ## Ill-formed expression. @@ -1633,35 +1633,35 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 231. +## Ends in an error in state: 156. ## ## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ] ## option(argument_expression_list) -> argument_expression_list . [ RPAREN ] ## ## The known suffix of the stack is as follows: -## argument_expression_list +## argument_expression_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 230, spurious reduction of production argument_expression_list -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 155, spurious reduction of production argument_expression_list -> assignment_expression ## Up to this point, a list of expressions has been recognized: @@ -1671,14 +1671,14 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN XOR_ASSIGN ## -## Ends in an error in state: 161. +## Ends in an error in state: 86. ## ## postfix_expression -> postfix_expression LPAREN . option(argument_expression_list) RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## postfix_expression LPAREN +## postfix_expression LPAREN ## # gcc and clang expect an expression: this is incomplete. @@ -1689,23 +1689,23 @@ followed with a closing parenthesis ')', is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_NAME VAR_NAME COLON XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_NAME VAR_NAME COLON XOR_ASSIGN ## -## Ends in an error in state: 222. +## Ends in an error in state: 147. ## ## conditional_expression -> logical_or_expression QUESTION expression COLON . conditional_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ] ## ## The known suffix of the stack is as follows: -## logical_or_expression QUESTION expression COLON +## logical_or_expression QUESTION expression COLON ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION XOR_ASSIGN ## -## Ends in an error in state: 200. +## Ends in an error in state: 125. ## ## conditional_expression -> logical_or_expression QUESTION . expression COLON conditional_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ] ## ## The known suffix of the stack is as follows: -## logical_or_expression QUESTION +## logical_or_expression QUESTION ## Ill-formed conditional expression. @@ -1713,35 +1713,35 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 218. +## Ends in an error in state: 143. ## ## conditional_expression -> logical_or_expression QUESTION expression . COLON conditional_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ] ## expression -> expression . COMMA assignment_expression [ COMMA COLON ] ## ## The known suffix of the stack is as follows: -## logical_or_expression QUESTION expression +## logical_or_expression QUESTION expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 224, spurious reduction of production expression -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 149, spurious reduction of production expression -> assignment_expression ## # gcc and clang simply expect a colon. @@ -1756,35 +1756,35 @@ then at this point, a colon ':' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: PACKED LPAREN PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: PACKED LPAREN PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 391. +## Ends in an error in state: 399. ## ## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ] ## attribute_specifier -> PACKED LPAREN argument_expression_list . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## PACKED LPAREN argument_expression_list +## PACKED LPAREN argument_expression_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 230, spurious reduction of production argument_expression_list -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 155, spurious reduction of production argument_expression_list -> assignment_expression ## Ill-formed $2 attribute. @@ -1795,14 +1795,14 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: PACKED LPAREN XOR_ASSIGN +translation_unit_file: PACKED LPAREN XOR_ASSIGN ## ## Ends in an error in state: 19. ## ## attribute_specifier -> PACKED LPAREN . argument_expression_list RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## PACKED LPAREN +## PACKED LPAREN ## # clang expects a "parameter declarator" (?). @@ -1814,14 +1814,14 @@ At this point, a list of expressions is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME TYPEDEF_NAME +translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME TYPEDEF_NAME ## ## Ends in an error in state: 24. ## ## primary_expression -> PRE_NAME . VAR_NAME [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## PRE_NAME +## PRE_NAME ## Ill-formed expression. @@ -1830,14 +1830,14 @@ The following identifier is used as a variable, but has been defined as a type: # ------------------------------------------------------------------------------ -translation_unit_file: PACKED XOR_ASSIGN +translation_unit_file: PACKED XOR_ASSIGN ## ## Ends in an error in state: 18. ## ## attribute_specifier -> PACKED . LPAREN argument_expression_list RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## PACKED +## PACKED ## # This one seems important, since CompCert currently does not support __packed__ @@ -1850,15 +1850,15 @@ is expected. # ------------------------------------------------------------------------------ -translation_unit_file: XOR_ASSIGN +translation_unit_file: XOR_ASSIGN ## ## Ends in an error in state: 2. ## -## list(translation_item) -> list(translation_item) . translation_item [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PRAGMA PACKED NORETURN LONG INT INLINE FLOAT EXTERN EOF ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] +## list(translation_item) -> list(translation_item) . translation_item [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC_ASSERT STATIC SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PRAGMA PACKED NORETURN LONG INT INLINE FLOAT EXTERN EOF ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## translation_unit_file -> list(translation_item) . EOF [ # ] ## ## The known suffix of the stack is as follows: -## list(translation_item) +## list(translation_item) ## # We are at the toplevel. @@ -1873,9 +1873,9 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 394. +## Ends in an error in state: 402. ## ## declaration_specifiers_typedef -> TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] @@ -1884,11 +1884,11 @@ translation_unit_file: TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) +## TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) ## -translation_unit_file: PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN +translation_unit_file: PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN ## -## Ends in an error in state: 403. +## Ends in an error in state: 411. ## ## declaration_specifiers_typedef -> typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] @@ -1897,11 +1897,11 @@ translation_unit_file: PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) +## typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) ## -translation_unit_file: VOLATILE TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: VOLATILE TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 413. +## Ends in an error in state: 422. ## ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] @@ -1910,11 +1910,11 @@ translation_unit_file: VOLATILE TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) +## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) ## -translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN +translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN ## -## Ends in an error in state: 419. +## Ends in an error in state: 428. ## ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] @@ -1923,47 +1923,47 @@ translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) +## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) ## -translation_unit_file: TYPEDEF INT XOR_ASSIGN +translation_unit_file: TYPEDEF INT XOR_ASSIGN ## -## Ends in an error in state: 396. +## Ends in an error in state: 404. ## ## declaration_specifiers_typedef -> TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) +## TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) ## -translation_unit_file: INT TYPEDEF XOR_ASSIGN +translation_unit_file: INT TYPEDEF XOR_ASSIGN ## -## Ends in an error in state: 407. +## Ends in an error in state: 415. ## ## declaration_specifiers_typedef -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) +## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) ## -translation_unit_file: VOLATILE TYPEDEF INT XOR_ASSIGN +translation_unit_file: VOLATILE TYPEDEF INT XOR_ASSIGN ## -## Ends in an error in state: 415. +## Ends in an error in state: 424. ## ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) +## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) ## -translation_unit_file: VOLATILE INT TYPEDEF XOR_ASSIGN +translation_unit_file: VOLATILE INT TYPEDEF XOR_ASSIGN ## -## Ends in an error in state: 423. +## Ends in an error in state: 432. ## ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) +## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) ## # We have begun a type definition (a.k.a. declaration_specifiers_typedef). @@ -1994,7 +1994,7 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: TYPEDEF XOR_ASSIGN +translation_unit_file: TYPEDEF XOR_ASSIGN ## ## Ends in an error in state: 9. ## @@ -2006,11 +2006,11 @@ translation_unit_file: TYPEDEF XOR_ASSIGN ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT RESTRICT REGISTER PRE_NAME PACKED NORETURN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## TYPEDEF list(declaration_specifier_no_type) +## TYPEDEF list(declaration_specifier_no_type) ## -translation_unit_file: VOLATILE TYPEDEF XOR_ASSIGN +translation_unit_file: VOLATILE TYPEDEF XOR_ASSIGN ## -## Ends in an error in state: 411. +## Ends in an error in state: 420. ## ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ] @@ -2020,7 +2020,7 @@ translation_unit_file: VOLATILE TYPEDEF XOR_ASSIGN ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT RESTRICT REGISTER PRE_NAME PACKED NORETURN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) +## rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) ## # We have seen the TYPEDEF keyword, and possibly some declaration_specifiers_no_type. @@ -2042,21 +2042,21 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE XOR_ASSIGN ## -## Ends in an error in state: 133. +## Ends in an error in state: 230. ## ## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ] ## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) +## rlist(declaration_specifier_no_type) ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr +## In state 222, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr ## # Analogous to the above, except we are in the context of a parameter declaration, @@ -2078,9 +2078,9 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 401. +## Ends in an error in state: 409. ## ## declaration_specifiers(declaration(external_declaration)) -> typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers_typedef -> typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ] @@ -2090,11 +2090,11 @@ translation_unit_file: PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## typedef_name list(declaration_specifier_no_type) +## typedef_name list(declaration_specifier_no_type) ## -translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 417. +## Ends in an error in state: 426. ## ## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ] @@ -2104,29 +2104,29 @@ translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) +## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) ## -translation_unit_file: INT XOR_ASSIGN +translation_unit_file: INT XOR_ASSIGN ## -## Ends in an error in state: 405. +## Ends in an error in state: 413. ## ## declaration_specifiers(declaration(external_declaration)) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers_typedef -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) +## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) ## -translation_unit_file: VOLATILE INT XOR_ASSIGN +translation_unit_file: VOLATILE INT XOR_ASSIGN ## -## Ends in an error in state: 421. +## Ends in an error in state: 430. ## ## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) +## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) ## # We have seen a TYPEDEF_NAME or a primitive type specifier, @@ -2178,9 +2178,9 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 112. +## Ends in an error in state: 209. ## ## declaration_specifiers(parameter_declaration) -> typedef_name list(declaration_specifier_no_type) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ] ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ] @@ -2189,11 +2189,11 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_AS ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## typedef_name list(declaration_specifier_no_type) +## typedef_name list(declaration_specifier_no_type) ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 135. +## Ends in an error in state: 232. ## ## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ] ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ] @@ -2202,27 +2202,27 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE PRE_NAME TYPEDEF_NA ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) +## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT XOR_ASSIGN ## -## Ends in an error in state: 118. +## Ends in an error in state: 215. ## ## declaration_specifiers(parameter_declaration) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) +## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE INT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE INT XOR_ASSIGN ## -## Ends in an error in state: 137. +## Ends in an error in state: 234. ## ## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) +## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) ## # Analogous to the above situation, except this time, we are in the @@ -2263,9 +2263,9 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: VOLATILE XOR_ASSIGN +translation_unit_file: VOLATILE XOR_ASSIGN ## -## Ends in an error in state: 409. +## Ends in an error in state: 418. ## ## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ] @@ -2275,13 +2275,13 @@ translation_unit_file: VOLATILE XOR_ASSIGN ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) +## rlist(declaration_specifier_no_type) ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr +## In state 222, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr ## # We have seen some specifiers or qualifiers. We have probably seen at least @@ -2308,9 +2308,9 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE XOR_ASSIGN ## -## Ends in an error in state: 518. +## Ends in an error in state: 528. ## ## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ] @@ -2320,13 +2320,13 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) +## rlist(declaration_specifier_no_type) ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr +## In state 222, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr ## # Identical to the previous one, except we are not at the top level, # so we know this cannot be the beginning of a function definition. @@ -2339,9 +2339,9 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME TYPEDEF_NAME VOLATILE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME TYPEDEF_NAME VOLATILE XOR_ASSIGN ## -## Ends in an error in state: 515. +## Ends in an error in state: 524. ## ## declaration_specifiers(declaration(block_item)) -> typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers_typedef -> typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ] @@ -2351,11 +2351,11 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## typedef_name list(declaration_specifier_no_type) +## typedef_name list(declaration_specifier_no_type) ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 520. +## Ends in an error in state: 530. ## ## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ] @@ -2365,29 +2365,29 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) +## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE INT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE INT XOR_ASSIGN ## -## Ends in an error in state: 517. +## Ends in an error in state: 526. ## ## declaration_specifiers(declaration(block_item)) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers_typedef -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) +## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE INT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE INT XOR_ASSIGN ## -## Ends in an error in state: 522. +## Ends in an error in state: 532. ## ## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) +## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) ## # This is analogous to the error sentence TYPEDEF_NAME VOLATILE XOR_ASSIGN, @@ -2418,20 +2418,20 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: UNION LBRACE PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: UNION LBRACE PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 92. +## Ends in an error in state: 189. ## -## struct_declaration -> specifier_qualifier_list(struct_declaration) . option(struct_declarator_list) SEMICOLON [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT SIGNED SHORT RESTRICT RBRACE PRE_NAME PACKED LONG INT FLOAT ENUM DOUBLE CONST CHAR ATTRIBUTE ALIGNAS ] +## struct_declaration -> specifier_qualifier_list(struct_declaration) . option(struct_declarator_list) SEMICOLON [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC_ASSERT SIGNED SHORT RESTRICT RBRACE PRE_NAME PACKED LONG INT FLOAT ENUM DOUBLE CONST CHAR ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## specifier_qualifier_list(struct_declaration) +## specifier_qualifier_list(struct_declaration) ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 78, spurious reduction of production specifier_qualifier_list(struct_declaration) -> typedef_name option(type_qualifier_list) +## In state 174, spurious reduction of production specifier_qualifier_list(struct_declaration) -> typedef_name option(type_qualifier_list) ## # We have (spuriously) recognized a specifier_qualifier_list, @@ -2463,35 +2463,35 @@ at this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: UNION LBRACE LONG COLON CONSTANT RPAREN +translation_unit_file: UNION LBRACE LONG COLON CONSTANT RPAREN ## -## Ends in an error in state: 287. +## Ends in an error in state: 295. ## ## option(struct_declarator_list) -> struct_declarator_list . [ SEMICOLON ] ## struct_declarator_list -> struct_declarator_list . COMMA struct_declarator [ SEMICOLON COMMA ] ## ## The known suffix of the stack is as follows: -## struct_declarator_list +## struct_declarator_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 154, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 292, spurious reduction of production struct_declarator -> option(declarator) COLON conditional_expression -## In state 294, spurious reduction of production struct_declarator_list -> struct_declarator +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 79, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 300, spurious reduction of production struct_declarator -> option(declarator) COLON conditional_expression +## In state 302, spurious reduction of production struct_declarator_list -> struct_declarator ## # We have seen a non-empty struct_declarator_list. @@ -2507,14 +2507,14 @@ then at this point, a semicolon ';' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: UNION LBRACE INT COLON XOR_ASSIGN +translation_unit_file: UNION LBRACE INT COLON XOR_ASSIGN ## -## Ends in an error in state: 291. +## Ends in an error in state: 299. ## ## struct_declarator -> option(declarator) COLON . conditional_expression [ SEMICOLON COMMA ] ## ## The known suffix of the stack is as follows: -## option(declarator) COLON +## option(declarator) COLON ## Ill-formed struct declarator. @@ -2522,14 +2522,14 @@ At this point, a constant expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: UNION LBRACE INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN +translation_unit_file: UNION LBRACE INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN ## -## Ends in an error in state: 288. +## Ends in an error in state: 296. ## ## struct_declarator_list -> struct_declarator_list COMMA . struct_declarator [ SEMICOLON COMMA ] ## ## The known suffix of the stack is as follows: -## struct_declarator_list COMMA +## struct_declarator_list COMMA ## Ill-formed struct declaration. @@ -2537,23 +2537,23 @@ At this point, a struct declarator is expected. # ------------------------------------------------------------------------------ -translation_unit_file: UNION LBRACE INT PRE_NAME VAR_NAME RPAREN +translation_unit_file: UNION LBRACE INT PRE_NAME VAR_NAME RPAREN ## -## Ends in an error in state: 293. +## Ends in an error in state: 301. ## ## option(declarator) -> declarator . [ COLON ] ## struct_declarator -> declarator . [ SEMICOLON COMMA ] ## ## The known suffix of the stack is as follows: -## declarator +## declarator ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator -## In state 260, spurious reduction of production attribute_specifier_list -> -## In state 261, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list +## In state 263, spurious reduction of production declarator_noattrend -> direct_declarator +## In state 268, spurious reduction of production attribute_specifier_list -> +## In state 269, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list ## # Assuming the declarator so far is complete, we expect @@ -2574,16 +2574,16 @@ then at this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: UNION LBRACE VOLATILE ADD_ASSIGN +translation_unit_file: UNION LBRACE VOLATILE ADD_ASSIGN ## -## Ends in an error in state: 86. +## Ends in an error in state: 182. ## ## option(type_qualifier_list) -> type_qualifier_list . [ VOLATILE RESTRICT PACKED CONST ATTRIBUTE ALIGNAS ] ## specifier_qualifier_list(struct_declaration) -> type_qualifier_list . typedef_name option(type_qualifier_list) [ STAR SEMICOLON PRE_NAME LPAREN COLON ] ## specifier_qualifier_list(struct_declaration) -> type_qualifier_list . type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN COLON ] ## ## The known suffix of the stack is as follows: -## type_qualifier_list +## type_qualifier_list ## # A list of qualifiers has been read. @@ -2597,15 +2597,15 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: UNION LBRACE XOR_ASSIGN +translation_unit_file: UNION LBRACE XOR_ASSIGN ## ## Ends in an error in state: 75. ## -## struct_declaration_list -> struct_declaration_list . struct_declaration [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT SIGNED SHORT RESTRICT RBRACE PRE_NAME PACKED LONG INT FLOAT ENUM DOUBLE CONST CHAR ATTRIBUTE ALIGNAS ] +## struct_declaration_list -> struct_declaration_list . struct_declaration [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC_ASSERT SIGNED SHORT RESTRICT RBRACE PRE_NAME PACKED LONG INT FLOAT ENUM DOUBLE CONST CHAR ATTRIBUTE ALIGNAS ] ## struct_or_union_specifier -> struct_or_union attribute_specifier_list option(other_identifier) LBRACE struct_declaration_list . RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## struct_or_union attribute_specifier_list option(other_identifier) LBRACE struct_declaration_list +## struct_or_union attribute_specifier_list option(other_identifier) LBRACE struct_declaration_list ## # gcc and clang do not seem prepared to accept a struct or union with @@ -2617,7 +2617,7 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: UNION XOR_ASSIGN +translation_unit_file: UNION XOR_ASSIGN ## ## Ends in an error in state: 72. ## @@ -2625,7 +2625,7 @@ translation_unit_file: UNION XOR_ASSIGN ## struct_or_union_specifier -> struct_or_union attribute_specifier_list . general_identifier [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## struct_or_union attribute_specifier_list +## struct_or_union attribute_specifier_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an @@ -2646,22 +2646,22 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT LPAREN PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT LPAREN PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 264. +## Ends in an error in state: 272. ## ## direct_declarator -> LPAREN save_context declarator . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## LPAREN save_context declarator +## LPAREN save_context declarator ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator -## In state 260, spurious reduction of production attribute_specifier_list -> -## In state 261, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list +## In state 263, spurious reduction of production declarator_noattrend -> direct_declarator +## In state 268, spurious reduction of production attribute_specifier_list -> +## In state 269, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list ## Up to this point, a declarator has been recognized: @@ -2671,14 +2671,14 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT LPAREN XOR_ASSIGN +translation_unit_file: INT LPAREN XOR_ASSIGN ## -## Ends in an error in state: 98. +## Ends in an error in state: 195. ## ## direct_declarator -> LPAREN save_context . declarator RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## LPAREN save_context +## LPAREN save_context ## # clang and gcc expect identifier or '(', as usual. @@ -2688,15 +2688,15 @@ At this point, a declarator is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME XOR_ASSIGN ## -## Ends in an error in state: 281. +## Ends in an error in state: 289. ## ## identifier_list -> identifier_list . COMMA PRE_NAME VAR_NAME [ RPAREN COMMA ] ## option(identifier_list) -> identifier_list . [ RPAREN ] ## ## The known suffix of the stack is as follows: -## identifier_list +## identifier_list ## Ill-formed K&R function definition. @@ -2707,15 +2707,15 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN XOR_ASSIGN ## -## Ends in an error in state: 104. +## Ends in an error in state: 201. ## ## context_parameter_type_list -> save_context . parameter_type_list save_context [ RPAREN ] ## direct_declarator -> direct_declarator LPAREN save_context . option(identifier_list) RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## direct_declarator LPAREN save_context +## direct_declarator LPAREN save_context ## # Ignore K&R syntax, just request ANSI syntax. @@ -2731,9 +2731,9 @@ followed with a closing parenthesis ')', is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT STAR RPAREN +translation_unit_file: INT STAR RPAREN ## -## Ends in an error in state: 101. +## Ends in an error in state: 198. ## ## declarator_noattrend -> list(pointer1) STAR option(type_qualifier_list) . direct_declarator [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LONG LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## list(pointer1) -> list(pointer1) STAR option(type_qualifier_list) . [ STAR ] @@ -2741,7 +2741,7 @@ translation_unit_file: INT STAR RPAREN ## type_qualifier_list -> option(type_qualifier_list) . attribute_specifier [ VOLATILE STAR RESTRICT PRE_NAME PACKED LPAREN CONST ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## list(pointer1) STAR option(type_qualifier_list) +## list(pointer1) STAR option(type_qualifier_list) ## # If the pointer isn't finished, we expect @@ -2764,26 +2764,26 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: TYPEDEF INT PRE_NAME VAR_NAME XOR_ASSIGN +translation_unit_file: TYPEDEF INT PRE_NAME VAR_NAME XOR_ASSIGN ## -## Ends in an error in state: 534. +## Ends in an error in state: 544. ## ## option(typedef_declarator_list) -> typedef_declarator_list . [ SEMICOLON ] ## typedef_declarator_list -> typedef_declarator_list . COMMA typedef_declarator [ SEMICOLON COMMA ] ## ## The known suffix of the stack is as follows: -## typedef_declarator_list +## typedef_declarator_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator -## In state 260, spurious reduction of production attribute_specifier_list -> -## In state 261, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list -## In state 538, spurious reduction of production declare_typename(declarator) -> declarator -## In state 537, spurious reduction of production typedef_declarator -> declare_typename(declarator) -## In state 539, spurious reduction of production typedef_declarator_list -> typedef_declarator +## In state 263, spurious reduction of production declarator_noattrend -> direct_declarator +## In state 268, spurious reduction of production attribute_specifier_list -> +## In state 269, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list +## In state 548, spurious reduction of production declare_typename(declarator) -> declarator +## In state 547, spurious reduction of production typedef_declarator -> declare_typename(declarator) +## In state 549, spurious reduction of production typedef_declarator_list -> typedef_declarator ## # Because attribute_specifier_list, declarator and declarator_noattrend have been marked @@ -2807,28 +2807,28 @@ then at this point, a semicolon ';' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: TYPEDEF INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN +translation_unit_file: TYPEDEF INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN ## -## Ends in an error in state: 535. +## Ends in an error in state: 545. ## ## typedef_declarator_list -> typedef_declarator_list COMMA . typedef_declarator [ SEMICOLON COMMA ] ## ## The known suffix of the stack is as follows: -## typedef_declarator_list COMMA +## typedef_declarator_list COMMA ## At this point, a declarator is expected. # ------------------------------------------------------------------------------ -translation_unit_file: ALIGNAS LPAREN INT LPAREN RPAREN LPAREN XOR_ASSIGN +translation_unit_file: ALIGNAS LPAREN INT LPAREN RPAREN LPAREN XOR_ASSIGN ## -## Ends in an error in state: 249. +## Ends in an error in state: 257. ## ## direct_abstract_declarator -> direct_abstract_declarator LPAREN . option(context_parameter_type_list) RPAREN [ RPAREN LPAREN LBRACK COMMA ] ## ## The known suffix of the stack is as follows: -## direct_abstract_declarator LPAREN +## direct_abstract_declarator LPAREN ## At this point, a list of parameter declarations, @@ -2836,32 +2836,32 @@ followed with a closing parenthesis ')', is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM CONST XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM CONST XOR_ASSIGN ## -## Ends in an error in state: 450. +## Ends in an error in state: 459. ## ## asm_attributes -> CONST . asm_attributes [ LPAREN ] ## ## The known suffix of the stack is as follows: -## CONST +## CONST ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM VOLATILE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM VOLATILE XOR_ASSIGN ## -## Ends in an error in state: 449. +## Ends in an error in state: 458. ## ## asm_attributes -> VOLATILE . asm_attributes [ LPAREN ] ## ## The known suffix of the stack is as follows: -## VOLATILE +## VOLATILE ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM XOR_ASSIGN ## -## Ends in an error in state: 448. +## Ends in an error in state: 457. ## -## asm_statement -> ASM . asm_attributes LPAREN string_literals_list asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## asm_statement -> ASM . asm_attributes LPAREN string_literals_list asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ASM +## ASM ## Ill-formed assembly statement. @@ -2871,26 +2871,26 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON STRING_LITERAL COMMA XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON STRING_LITERAL COMMA XOR_ASSIGN ## -## Ends in an error in state: 474. +## Ends in an error in state: 483. ## ## asm_flags -> asm_flags COMMA . string_literals_list [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## asm_flags COMMA +## asm_flags COMMA ## # We are in the clobber list. # We have seen a comma, so we expect a string literal. # first(asm_flags) = STRING_LITERAL -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON XOR_ASSIGN ## -## Ends in an error in state: 471. +## Ends in an error in state: 480. ## ## asm_arguments -> COLON asm_operands COLON asm_operands COLON . asm_flags [ RPAREN ] ## ## The known suffix of the stack is as follows: -## COLON asm_operands COLON asm_operands COLON +## COLON asm_operands COLON asm_operands COLON ## # We are at the beginning of the clobber list. # first(asm_flags) = STRING_LITERAL @@ -2903,21 +2903,21 @@ Examples of clobbered resources: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON STRING_LITERAL XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON STRING_LITERAL XOR_ASSIGN ## -## Ends in an error in state: 473. +## Ends in an error in state: 482. ## ## asm_arguments -> COLON asm_operands COLON asm_operands COLON asm_flags . [ RPAREN ] ## asm_flags -> asm_flags . COMMA string_literals_list [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## COLON asm_operands COLON asm_operands COLON asm_flags +## COLON asm_operands COLON asm_operands COLON asm_flags ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 472, spurious reduction of production asm_flags -> string_literals_list +## In state 481, spurious reduction of production asm_flags -> string_literals_list ## # Let's ignore the possibility of concatenating string literals. @@ -2932,22 +2932,22 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN CONSTANT RPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN CONSTANT RPAREN XOR_ASSIGN ## -## Ends in an error in state: 468. +## Ends in an error in state: 477. ## ## asm_arguments -> COLON asm_operands . [ RPAREN ] ## asm_arguments -> COLON asm_operands . COLON asm_operands [ RPAREN ] ## asm_arguments -> COLON asm_operands . COLON asm_operands COLON asm_flags [ RPAREN ] ## ## The known suffix of the stack is as follows: -## COLON asm_operands +## COLON asm_operands ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 460, spurious reduction of production asm_operands -> asm_operands_ne +## In state 469, spurious reduction of production asm_operands -> asm_operands_ne ## # We have seen one COLON, hence the outputs. (The list of outputs may be empty.) @@ -2962,21 +2962,21 @@ then at this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON XOR_ASSIGN ## -## Ends in an error in state: 470. +## Ends in an error in state: 479. ## ## asm_arguments -> COLON asm_operands COLON asm_operands . [ RPAREN ] ## asm_arguments -> COLON asm_operands COLON asm_operands . COLON asm_flags [ RPAREN ] ## ## The known suffix of the stack is as follows: -## COLON asm_operands COLON asm_operands +## COLON asm_operands COLON asm_operands ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 469, spurious reduction of production asm_operands -> +## In state 478, spurious reduction of production asm_operands -> ## # We have seen two COLONs, hence the outputs and inputs. (The list of inputs may be empty.) @@ -2994,14 +2994,14 @@ then at this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK PRE_NAME VAR_NAME RBRACK XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK PRE_NAME VAR_NAME RBRACK XOR_ASSIGN ## -## Ends in an error in state: 463. +## Ends in an error in state: 472. ## ## asm_operand -> asm_op_name . string_literals_list LPAREN expression RPAREN [ RPAREN COMMA COLON ] ## ## The known suffix of the stack is as follows: -## asm_op_name +## asm_op_name ## # Example of asm_operand: [oldval]"=r"(res) @@ -3013,14 +3013,14 @@ At this point, a string literal, representing a constraint, is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK PRE_NAME VAR_NAME XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK PRE_NAME VAR_NAME XOR_ASSIGN ## -## Ends in an error in state: 458. +## Ends in an error in state: 467. ## ## asm_op_name -> LBRACK general_identifier . RBRACK [ STRING_LITERAL ] ## ## The known suffix of the stack is as follows: -## LBRACK general_identifier +## LBRACK general_identifier ## Ill-formed assembly operand. @@ -3028,14 +3028,14 @@ At this point, a closing bracket ']' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK XOR_ASSIGN ## -## Ends in an error in state: 457. +## Ends in an error in state: 466. ## ## asm_op_name -> LBRACK . general_identifier RBRACK [ STRING_LITERAL ] ## ## The known suffix of the stack is as follows: -## LBRACK +## LBRACK ## Ill-formed assembly operand. @@ -3043,14 +3043,14 @@ At this point, an identifier is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN CONSTANT RPAREN COMMA XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN CONSTANT RPAREN COMMA XOR_ASSIGN ## -## Ends in an error in state: 461. +## Ends in an error in state: 470. ## ## asm_operands_ne -> asm_operands_ne COMMA . asm_operand [ RPAREN COMMA COLON ] ## ## The known suffix of the stack is as follows: -## asm_operands_ne COMMA +## asm_operands_ne COMMA ## # clang and gcc request a string literal (which is incomplete). @@ -3060,35 +3060,35 @@ At this point, an assembly operand is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 466. +## Ends in an error in state: 475. ## ## asm_operand -> asm_op_name string_literals_list LPAREN expression . RPAREN [ RPAREN COMMA COLON ] ## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## asm_op_name string_literals_list LPAREN expression +## asm_op_name string_literals_list LPAREN expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 224, spurious reduction of production expression -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 149, spurious reduction of production expression -> assignment_expression ## Ill-formed assembly operand. @@ -3099,14 +3099,14 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN XOR_ASSIGN ## -## Ends in an error in state: 465. +## Ends in an error in state: 474. ## ## asm_operand -> asm_op_name string_literals_list LPAREN . expression RPAREN [ RPAREN COMMA COLON ] ## ## The known suffix of the stack is as follows: -## asm_op_name string_literals_list LPAREN +## asm_op_name string_literals_list LPAREN ## Ill-formed assembly operand. @@ -3114,15 +3114,15 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL XOR_ASSIGN ## -## Ends in an error in state: 464. +## Ends in an error in state: 473. ## ## asm_operand -> asm_op_name string_literals_list . LPAREN expression RPAREN [ RPAREN COMMA COLON ] ## string_literals_list -> string_literals_list . STRING_LITERAL [ STRING_LITERAL LPAREN ] ## ## The known suffix of the stack is as follows: -## asm_op_name string_literals_list +## asm_op_name string_literals_list ## # If we disregard the concatenation of string literals, then @@ -3134,15 +3134,15 @@ followed with an expression and a closing parenthesis ')', is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL XOR_ASSIGN ## -## Ends in an error in state: 455. +## Ends in an error in state: 464. ## -## asm_statement -> ASM asm_attributes LPAREN string_literals_list . asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## asm_statement -> ASM asm_attributes LPAREN string_literals_list . asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## string_literals_list -> string_literals_list . STRING_LITERAL [ STRING_LITERAL RPAREN COLON ] ## ## The known suffix of the stack is as follows: -## ASM asm_attributes LPAREN string_literals_list +## ASM asm_attributes LPAREN string_literals_list ## # Expecting either one more string literal, or COLON, or RPAREN. @@ -3156,14 +3156,14 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN XOR_ASSIGN ## -## Ends in an error in state: 454. +## Ends in an error in state: 463. ## -## asm_statement -> ASM asm_attributes LPAREN . string_literals_list asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## asm_statement -> ASM asm_attributes LPAREN . string_literals_list asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ASM asm_attributes LPAREN +## ASM asm_attributes LPAREN ## Ill-formed assembly statement. @@ -3171,50 +3171,50 @@ At this point, a string literal, representing an instruction, is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE BREAK XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE BREAK XOR_ASSIGN ## -## Ends in an error in state: 446. +## Ends in an error in state: 455. ## -## jump_statement -> BREAK . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## jump_statement -> BREAK . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## BREAK +## BREAK ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CONTINUE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CONTINUE XOR_ASSIGN ## -## Ends in an error in state: 441. +## Ends in an error in state: 450. ## -## jump_statement -> CONTINUE . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## jump_statement -> CONTINUE . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## CONTINUE +## CONTINUE ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN ## -## Ends in an error in state: 565. +## Ends in an error in state: 575. ## -## iteration_statement -> save_context do_statement1 WHILE LPAREN expression RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context do_statement1 WHILE LPAREN expression RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context do_statement1 WHILE LPAREN expression RPAREN +## save_context do_statement1 WHILE LPAREN expression RPAREN ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE GOTO PRE_NAME VAR_NAME XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE GOTO PRE_NAME VAR_NAME XOR_ASSIGN ## -## Ends in an error in state: 437. +## Ends in an error in state: 446. ## -## jump_statement -> GOTO general_identifier . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## jump_statement -> GOTO general_identifier . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## GOTO general_identifier +## GOTO general_identifier ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL RPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL RPAREN XOR_ASSIGN ## -## Ends in an error in state: 478. +## Ends in an error in state: 487. ## -## asm_statement -> ASM asm_attributes LPAREN string_literals_list asm_arguments RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## asm_statement -> ASM asm_attributes LPAREN string_literals_list asm_arguments RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## ASM asm_attributes LPAREN string_literals_list asm_arguments RPAREN +## ASM asm_attributes LPAREN string_literals_list asm_arguments RPAREN ## Ill-formed statement. @@ -3222,32 +3222,32 @@ At this point, a semicolon ';' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE CONSTANT COLON XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE CONSTANT COLON XOR_ASSIGN ## -## Ends in an error in state: 445. +## Ends in an error in state: 454. ## -## labeled_statement -> CASE conditional_expression COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## labeled_statement -> CASE conditional_expression COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## CASE conditional_expression COLON +## CASE conditional_expression COLON ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DEFAULT COLON XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DEFAULT COLON XOR_ASSIGN ## -## Ends in an error in state: 440. +## Ends in an error in state: 449. ## -## labeled_statement -> DEFAULT COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## labeled_statement -> DEFAULT COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## DEFAULT COLON +## DEFAULT COLON ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME VAR_NAME COLON XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME VAR_NAME COLON XOR_ASSIGN ## -## Ends in an error in state: 494. +## Ends in an error in state: 503. ## -## labeled_statement -> general_identifier COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## labeled_statement -> general_identifier COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## general_identifier COLON +## general_identifier COLON ## # gcc and clang request an expression, which seems misleading (incomplete). @@ -3257,32 +3257,32 @@ At this point, a statement is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE CONSTANT SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE CONSTANT SEMICOLON ## -## Ends in an error in state: 444. +## Ends in an error in state: 453. ## -## labeled_statement -> CASE conditional_expression . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## labeled_statement -> CASE conditional_expression . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## CASE conditional_expression +## CASE conditional_expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 154, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 79, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression ## Ill-formed labeled statement. @@ -3293,14 +3293,14 @@ then at this point, a colon ':' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE XOR_ASSIGN ## -## Ends in an error in state: 443. +## Ends in an error in state: 452. ## -## labeled_statement -> CASE . conditional_expression COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## labeled_statement -> CASE . conditional_expression COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## CASE +## CASE ## Ill-formed labeled statement. @@ -3308,23 +3308,23 @@ At this point, a constant expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DEFAULT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DEFAULT XOR_ASSIGN ## -## Ends in an error in state: 439. +## Ends in an error in state: 448. ## -## labeled_statement -> DEFAULT . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## labeled_statement -> DEFAULT . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## DEFAULT +## DEFAULT ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 493. +## Ends in an error in state: 502. ## -## labeled_statement -> general_identifier . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## labeled_statement -> general_identifier . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## general_identifier +## general_identifier ## # gcc and clang apparently do not allow a TYPEDEF_NAME to be reclassified as a label. @@ -3334,35 +3334,35 @@ At this point, a colon ':' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 564. +## Ends in an error in state: 574. ## ## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ] -## iteration_statement -> save_context do_statement1 WHILE LPAREN expression . RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context do_statement1 WHILE LPAREN expression . RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context do_statement1 WHILE LPAREN expression +## save_context do_statement1 WHILE LPAREN expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 224, spurious reduction of production expression -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 149, spurious reduction of production expression -> assignment_expression ## Ill-formed 'do' ... 'while' statement. @@ -3373,14 +3373,14 @@ then at this point, a closing parenthesis ')' and a semicolon ';' are expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN XOR_ASSIGN ## -## Ends in an error in state: 563. +## Ends in an error in state: 573. ## -## iteration_statement -> save_context do_statement1 WHILE LPAREN . expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context do_statement1 WHILE LPAREN . expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context do_statement1 WHILE LPAREN +## save_context do_statement1 WHILE LPAREN ## Ill-formed 'do' ... 'while' statement. @@ -3388,14 +3388,14 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE XOR_ASSIGN ## -## Ends in an error in state: 562. +## Ends in an error in state: 572. ## -## iteration_statement -> save_context do_statement1 WHILE . LPAREN expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context do_statement1 WHILE . LPAREN expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context do_statement1 WHILE +## save_context do_statement1 WHILE ## Ill-formed 'do' ... 'while' statement. @@ -3403,14 +3403,14 @@ At this point, an opening parenthesis '(' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON XOR_ASSIGN ## -## Ends in an error in state: 561. +## Ends in an error in state: 571. ## -## iteration_statement -> save_context do_statement1 . WHILE LPAREN expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context do_statement1 . WHILE LPAREN expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context do_statement1 +## save_context do_statement1 ## # Quite nicely, in this case, there is no doubt that the statement is @@ -3424,14 +3424,14 @@ At this point, a 'while' keyword is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO XOR_ASSIGN ## -## Ends in an error in state: 557. +## Ends in an error in state: 567. ## ## do_statement1 -> save_context DO . statement [ WHILE ] ## ## The known suffix of the stack is as follows: -## save_context DO +## save_context DO ## # gcc and clang expect an expression. @@ -3441,14 +3441,14 @@ At this point, a statement (the loop body) is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON RPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON RPAREN XOR_ASSIGN ## -## Ends in an error in state: 527. +## Ends in an error in state: 537. ## -## iteration_statement -> save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) +## save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) ## Ill-formed 'for' statement. @@ -3456,35 +3456,35 @@ At this point, a statement (the loop body) is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 529. +## Ends in an error in state: 539. ## ## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ] ## optional(expression,RPAREN) -> expression . RPAREN [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ] ## ## The known suffix of the stack is as follows: -## expression +## expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 224, spurious reduction of production expression -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 149, spurious reduction of production expression -> assignment_expression ## # The use of optional(expression,RPAREN) tells us that we are in a FOR statement. @@ -3498,14 +3498,14 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON XOR_ASSIGN ## -## Ends in an error in state: 525. +## Ends in an error in state: 535. ## -## iteration_statement -> save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) . optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) . optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) +## save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) ## # Expecting the third part of the loop header -- the expression @@ -3518,14 +3518,14 @@ followed with a closing parenthesis ')', is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON XOR_ASSIGN ## -## Ends in an error in state: 524. +## Ends in an error in state: 534. ## -## iteration_statement -> save_context FOR LPAREN for_statement_header . optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context FOR LPAREN for_statement_header . optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context FOR LPAREN for_statement_header +## save_context FOR LPAREN for_statement_header ## # Expecting the second part of the loop header -- the controlling expression. @@ -3537,35 +3537,35 @@ followed with a semicolon ';', is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN PRE_NAME VAR_NAME RPAREN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN PRE_NAME VAR_NAME RPAREN ## -## Ends in an error in state: 531. +## Ends in an error in state: 541. ## ## expression -> expression . COMMA assignment_expression [ SEMICOLON COMMA ] ## optional(expression,SEMICOLON) -> expression . SEMICOLON [ TILDE STRING_LITERAL STAR SIZEOF SEMICOLON RPAREN PRE_NAME PLUS MINUS LPAREN INC DEC CONSTANT BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AND ALIGNOF ] ## ## The known suffix of the stack is as follows: -## expression +## expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 224, spurious reduction of production expression -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 149, spurious reduction of production expression -> assignment_expression ## # At the time of writing, optional(expression,SEMICOLON) is used only in FOR @@ -3579,14 +3579,14 @@ then at this point, a semicolon ';' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN XOR_ASSIGN ## -## Ends in an error in state: 512. +## Ends in an error in state: 521. ## -## iteration_statement -> save_context FOR LPAREN . for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context FOR LPAREN . for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context FOR LPAREN +## save_context FOR LPAREN ## # gcc and clang say they expect an expression, which is incomplete. @@ -3600,14 +3600,14 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR XOR_ASSIGN ## -## Ends in an error in state: 511. +## Ends in an error in state: 520. ## -## iteration_statement -> save_context FOR . LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context FOR . LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context FOR +## save_context FOR ## Ill-formed 'for' statement. @@ -3615,14 +3615,14 @@ At this point, an opening parenthesis '(' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE GOTO XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE GOTO XOR_ASSIGN ## -## Ends in an error in state: 436. +## Ends in an error in state: 445. ## -## jump_statement -> GOTO . general_identifier SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## jump_statement -> GOTO . general_identifier SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## GOTO +## GOTO ## Ill-formed 'goto' statement. @@ -3630,14 +3630,14 @@ At this point, an identifier (a 'goto' label) is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO IF LPAREN CONSTANT RPAREN SEMICOLON ELSE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO IF LPAREN CONSTANT RPAREN SEMICOLON ELSE XOR_ASSIGN ## -## Ends in an error in state: 559. +## Ends in an error in state: 569. ## -## selection_statement -> save_context ifelse_statement1 . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## selection_statement -> save_context ifelse_statement1 . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context ifelse_statement1 +## save_context ifelse_statement1 ## Ill-formed 'if' ... 'else' statement. @@ -3645,15 +3645,15 @@ At this point, a statement is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN ## -## Ends in an error in state: 508. +## Ends in an error in state: 517. ## ## ifelse_statement1 -> IF LPAREN expression RPAREN save_context . statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ] -## selection_statement -> save_context IF LPAREN expression RPAREN save_context . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## selection_statement -> save_context IF LPAREN expression RPAREN save_context . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context IF LPAREN expression RPAREN save_context +## save_context IF LPAREN expression RPAREN save_context ## Ill-formed 'if' statement. @@ -3661,36 +3661,36 @@ At this point, a statement is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 506. +## Ends in an error in state: 515. ## ## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ] ## ifelse_statement1 -> IF LPAREN expression . RPAREN save_context statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ] -## selection_statement -> save_context IF LPAREN expression . RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## selection_statement -> save_context IF LPAREN expression . RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context IF LPAREN expression +## save_context IF LPAREN expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 224, spurious reduction of production expression -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 149, spurious reduction of production expression -> assignment_expression ## Ill-formed 'if' statement. @@ -3701,15 +3701,15 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN XOR_ASSIGN ## -## Ends in an error in state: 505. +## Ends in an error in state: 514. ## ## ifelse_statement1 -> IF LPAREN . expression RPAREN save_context statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ] -## selection_statement -> save_context IF LPAREN . expression RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## selection_statement -> save_context IF LPAREN . expression RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context IF LPAREN +## save_context IF LPAREN ## Ill-formed 'if' statement. @@ -3717,15 +3717,15 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF XOR_ASSIGN ## -## Ends in an error in state: 504. +## Ends in an error in state: 513. ## ## ifelse_statement1 -> IF . LPAREN expression RPAREN save_context statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ] -## selection_statement -> save_context IF . LPAREN expression RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## selection_statement -> save_context IF . LPAREN expression RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context IF +## save_context IF ## Ill-formed 'if' statement. @@ -3733,14 +3733,14 @@ At this point, an opening parenthesis '(' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN ## -## Ends in an error in state: 502. +## Ends in an error in state: 511. ## -## selection_statement -> save_context SWITCH LPAREN expression RPAREN . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## selection_statement -> save_context SWITCH LPAREN expression RPAREN . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context SWITCH LPAREN expression RPAREN +## save_context SWITCH LPAREN expression RPAREN ## @@ -3757,35 +3757,35 @@ enclosed within braces '{' and '}'. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 501. +## Ends in an error in state: 510. ## ## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ] -## selection_statement -> save_context SWITCH LPAREN expression . RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## selection_statement -> save_context SWITCH LPAREN expression . RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context SWITCH LPAREN expression +## save_context SWITCH LPAREN expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 224, spurious reduction of production expression -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 149, spurious reduction of production expression -> assignment_expression ## Ill-formed 'switch' statement. @@ -3796,14 +3796,14 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN XOR_ASSIGN ## -## Ends in an error in state: 500. +## Ends in an error in state: 509. ## -## selection_statement -> save_context SWITCH LPAREN . expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## selection_statement -> save_context SWITCH LPAREN . expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context SWITCH LPAREN +## save_context SWITCH LPAREN ## Ill-formed 'switch' statement. @@ -3811,14 +3811,14 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH XOR_ASSIGN ## -## Ends in an error in state: 499. +## Ends in an error in state: 508. ## -## selection_statement -> save_context SWITCH . LPAREN expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## selection_statement -> save_context SWITCH . LPAREN expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context SWITCH +## save_context SWITCH ## Ill-formed 'switch' statement. @@ -3826,14 +3826,14 @@ At this point, an opening parenthesis '(' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN ## -## Ends in an error in state: 486. +## Ends in an error in state: 495. ## -## iteration_statement -> save_context WHILE LPAREN expression RPAREN . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context WHILE LPAREN expression RPAREN . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context WHILE LPAREN expression RPAREN +## save_context WHILE LPAREN expression RPAREN ## Ill-formed 'while' statement. @@ -3841,35 +3841,35 @@ At this point, a statement (the loop body) is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 485. +## Ends in an error in state: 494. ## ## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ] -## iteration_statement -> save_context WHILE LPAREN expression . RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context WHILE LPAREN expression . RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context WHILE LPAREN expression +## save_context WHILE LPAREN expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 224, spurious reduction of production expression -> assignment_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 149, spurious reduction of production expression -> assignment_expression ## Ill-formed 'while' statement. @@ -3880,14 +3880,14 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN XOR_ASSIGN ## -## Ends in an error in state: 484. +## Ends in an error in state: 493. ## -## iteration_statement -> save_context WHILE LPAREN . expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context WHILE LPAREN . expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context WHILE LPAREN +## save_context WHILE LPAREN ## Ill-formed 'while' statement. @@ -3895,14 +3895,14 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE XOR_ASSIGN ## -## Ends in an error in state: 483. +## Ends in an error in state: 492. ## -## iteration_statement -> save_context WHILE . LPAREN expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## iteration_statement -> save_context WHILE . LPAREN expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context WHILE +## save_context WHILE ## Ill-formed 'while' statement. @@ -3910,15 +3910,15 @@ At this point, an opening parenthesis '(' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE XOR_ASSIGN ## -## Ends in an error in state: 427. +## Ends in an error in state: 436. ## -## block_item_list -> option(block_item_list) . block_item [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] -## compound_statement -> save_context LBRACE option(block_item_list) . RBRACE [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## block_item_list -> option(block_item_list) . block_item [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## compound_statement -> save_context LBRACE option(block_item_list) . RBRACE [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## save_context LBRACE option(block_item_list) +## save_context LBRACE option(block_item_list) ## # We are possibly at the end of a block. # @@ -3938,14 +3938,14 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE RETURN XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE RETURN XOR_ASSIGN ## -## Ends in an error in state: 428. +## Ends in an error in state: 437. ## -## jump_statement -> RETURN . option(expression) SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## jump_statement -> RETURN . option(expression) SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## RETURN +## RETURN ## # clang and gcc expect an expression. @@ -3957,37 +3957,37 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE STRING_LITERAL RPAREN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE STRING_LITERAL RPAREN ## -## Ends in an error in state: 431. +## Ends in an error in state: 440. ## ## expression -> expression . COMMA assignment_expression [ SEMICOLON COMMA ] ## option(expression) -> expression . [ SEMICOLON ] ## ## The known suffix of the stack is as follows: -## expression +## expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 155, spurious reduction of production primary_expression -> string_literals_list -## In state 157, spurious reduction of production postfix_expression -> primary_expression -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 224, spurious reduction of production expression -> assignment_expression +## In state 80, spurious reduction of production primary_expression -> string_literals_list +## In state 82, spurious reduction of production postfix_expression -> primary_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 149, spurious reduction of production expression -> assignment_expression ## Up to this point, an expression has been recognized: @@ -3997,16 +3997,16 @@ then at this point, a semicolon ';' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 568. +## Ends in an error in state: 578. ## ## declaration_specifiers(declaration(block_item)) -> typedef_name . list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers_typedef -> typedef_name . list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ] ## general_identifier -> typedef_name . [ COLON ] ## ## The known suffix of the stack is as follows: -## typedef_name +## typedef_name ## # We see a type name "foo" at the beginning of a block_item, it seems. @@ -4032,14 +4032,14 @@ at this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN ## -## Ends in an error in state: 219. +## Ends in an error in state: 144. ## ## expression -> expression COMMA . assignment_expression [ SEMICOLON RPAREN RBRACK COMMA COLON ] ## ## The known suffix of the stack is as follows: -## expression COMMA +## expression COMMA ## Ill-formed use of the sequencing operator ','. @@ -4047,26 +4047,26 @@ At this point, an expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME COMMA PRE_NAME VAR_NAME RPAREN +translation_unit_file: INT PRE_NAME VAR_NAME COMMA PRE_NAME VAR_NAME RPAREN ## -## Ends in an error in state: 545. +## Ends in an error in state: 555. ## ## init_declarator_list -> init_declarator_list . COMMA init_declarator [ SEMICOLON COMMA ] ## option(init_declarator_list) -> init_declarator_list . [ SEMICOLON ] ## ## The known suffix of the stack is as follows: -## init_declarator_list +## init_declarator_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator -## In state 553, spurious reduction of production declare_varname(declarator_noattrend) -> declarator_noattrend -## In state 548, spurious reduction of production save_context -> -## In state 549, spurious reduction of production attribute_specifier_list -> -## In state 550, spurious reduction of production init_declarator -> declare_varname(declarator_noattrend) save_context attribute_specifier_list -## In state 547, spurious reduction of production init_declarator_list -> init_declarator_list COMMA init_declarator +## In state 263, spurious reduction of production declarator_noattrend -> direct_declarator +## In state 563, spurious reduction of production declare_varname(declarator_noattrend) -> declarator_noattrend +## In state 558, spurious reduction of production save_context -> +## In state 559, spurious reduction of production attribute_specifier_list -> +## In state 560, spurious reduction of production init_declarator -> declare_varname(declarator_noattrend) save_context attribute_specifier_list +## In state 557, spurious reduction of production init_declarator_list -> init_declarator_list COMMA init_declarator ## Up to this point, a list of declarators has been recognized: @@ -4076,14 +4076,14 @@ then at this point, a semicolon ';' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN ## -## Ends in an error in state: 546. +## Ends in an error in state: 556. ## ## init_declarator_list -> init_declarator_list COMMA . init_declarator [ SEMICOLON COMMA ] ## ## The known suffix of the stack is as follows: -## init_declarator_list COMMA +## init_declarator_list COMMA ## Ill-formed declaration. @@ -4091,23 +4091,23 @@ At this point, an init declarator is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT PRE_NAME VAR_NAME EQ ALIGNAS +translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT PRE_NAME VAR_NAME EQ ALIGNAS ## -## Ends in an error in state: 366. +## Ends in an error in state: 374. ## ## initializer_list -> option(designation) . c_initializer [ RBRACE COMMA ] ## ## The known suffix of the stack is as follows: -## option(designation) +## option(designation) ## -translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE PRE_NAME VAR_NAME COMMA DOT PRE_NAME VAR_NAME EQ ALIGNAS +translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE PRE_NAME VAR_NAME COMMA DOT PRE_NAME VAR_NAME EQ ALIGNAS ## -## Ends in an error in state: 370. +## Ends in an error in state: 378. ## ## initializer_list -> initializer_list COMMA option(designation) . c_initializer [ RBRACE COMMA ] ## ## The known suffix of the stack is as follows: -## initializer_list COMMA option(designation) +## initializer_list COMMA option(designation) ## Ill-formed initializer list. @@ -4115,15 +4115,15 @@ At this point, an initializer is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT PRE_NAME VAR_NAME XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT PRE_NAME VAR_NAME XOR_ASSIGN ## -## Ends in an error in state: 373. +## Ends in an error in state: 381. ## ## designation -> designator_list . EQ [ TILDE STRING_LITERAL STAR SIZEOF PRE_NAME PLUS MINUS LPAREN LBRACE INC DEC CONSTANT BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AND ALIGNOF ] ## option(designator_list) -> designator_list . [ LBRACK DOT ] ## ## The known suffix of the stack is as follows: -## designator_list +## designator_list ## # We are expecting either one more designator, @@ -4137,14 +4137,14 @@ then at this point, an equals sign '=' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT XOR_ASSIGN ## -## Ends in an error in state: 326. +## Ends in an error in state: 334. ## ## designator -> DOT . general_identifier [ RPAREN LBRACK EQ DOT ] ## ## The known suffix of the stack is as follows: -## DOT +## DOT ## # clang gives examples of designators. @@ -4154,32 +4154,32 @@ At this point, the name of a struct or union member is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE LBRACK PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE LBRACK PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 324. +## Ends in an error in state: 332. ## ## designator -> LBRACK conditional_expression . RBRACK [ RPAREN LBRACK EQ DOT ] ## ## The known suffix of the stack is as follows: -## LBRACK conditional_expression +## LBRACK conditional_expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 154, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 79, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression ## Ill-formed designator. @@ -4190,14 +4190,14 @@ then at this point, a closing bracket ']' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE LBRACK XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE LBRACK XOR_ASSIGN ## -## Ends in an error in state: 323. +## Ends in an error in state: 331. ## ## designator -> LBRACK . conditional_expression RBRACK [ RPAREN LBRACK EQ DOT ] ## ## The known suffix of the stack is as follows: -## LBRACK +## LBRACK ## Ill-formed designator. @@ -4205,15 +4205,15 @@ At this point, a constant expression is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN ## -## Ends in an error in state: 369. +## Ends in an error in state: 377. ## ## initializer_list -> initializer_list COMMA . option(designation) c_initializer [ RBRACE COMMA ] ## option(COMMA) -> COMMA . [ RBRACE ] ## ## The known suffix of the stack is as follows: -## initializer_list COMMA +## initializer_list COMMA ## # This could be a trailing comma, in which case a closing brace is legal. @@ -4226,36 +4226,36 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE CONSTANT SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE CONSTANT SEMICOLON ## -## Ends in an error in state: 368. +## Ends in an error in state: 376. ## ## c_initializer -> LBRACE initializer_list . option(COMMA) RBRACE [ SEMICOLON RBRACE COMMA ] ## initializer_list -> initializer_list . COMMA option(designation) c_initializer [ RBRACE COMMA ] ## ## The known suffix of the stack is as follows: -## LBRACE initializer_list +## LBRACE initializer_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression -## In state 372, spurious reduction of production c_initializer -> assignment_expression -## In state 378, spurious reduction of production initializer_list -> option(designation) c_initializer +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression +## In state 380, spurious reduction of production c_initializer -> assignment_expression +## In state 386, spurious reduction of production initializer_list -> option(designation) c_initializer ## # Omitting the fact that the closing brace can be preceded with a comma. @@ -4268,14 +4268,14 @@ then at this point, a closing brace '}' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE XOR_ASSIGN ## -## Ends in an error in state: 367. +## Ends in an error in state: 375. ## ## c_initializer -> LBRACE . initializer_list option(COMMA) RBRACE [ SEMICOLON RBRACE COMMA ] ## ## The known suffix of the stack is as follows: -## LBRACE +## LBRACE ## # An initializer list is expected. @@ -4289,14 +4289,14 @@ followed with an initializer, is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME EQ XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME EQ XOR_ASSIGN ## -## Ends in an error in state: 551. +## Ends in an error in state: 561. ## ## init_declarator -> declare_varname(declarator_noattrend) save_context attribute_specifier_list EQ . c_initializer [ SEMICOLON COMMA ] ## ## The known suffix of the stack is as follows: -## declare_varname(declarator_noattrend) save_context attribute_specifier_list EQ +## declare_varname(declarator_noattrend) save_context attribute_specifier_list EQ ## # clang and gcc expect an expression (incomplete). @@ -4306,33 +4306,33 @@ At this point, an initializer is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LBRACK CONSTANT SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME LBRACK CONSTANT SEMICOLON ## -## Ends in an error in state: 243. +## Ends in an error in state: 251. ## ## optional(assignment_expression,RBRACK) -> assignment_expression . RBRACK [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## assignment_expression +## assignment_expression ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 158, spurious reduction of production unary_expression -> postfix_expression -## In state 162, spurious reduction of production cast_expression -> unary_expression -## In state 185, spurious reduction of production multiplicative_expression -> cast_expression -## In state 179, spurious reduction of production additive_expression -> multiplicative_expression -## In state 198, spurious reduction of production shift_expression -> additive_expression -## In state 175, spurious reduction of production relational_expression -> shift_expression -## In state 191, spurious reduction of production equality_expression -> relational_expression -## In state 207, spurious reduction of production and_expression -> equality_expression -## In state 215, spurious reduction of production exclusive_or_expression -> and_expression -## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 199, spurious reduction of production conditional_expression -> logical_or_expression -## In state 220, spurious reduction of production assignment_expression -> conditional_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 87, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 145, spurious reduction of production assignment_expression -> conditional_expression ## # At the time of writing, optional(expression,RBRACK) is used only in direct @@ -4348,14 +4348,14 @@ then at this point, a closing bracket ']' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN ## -## Ends in an error in state: 282. +## Ends in an error in state: 290. ## ## identifier_list -> identifier_list COMMA . PRE_NAME VAR_NAME [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## identifier_list COMMA +## identifier_list COMMA ## # Strangely, gcc requests ')'. @@ -4365,14 +4365,14 @@ At this point, an identifier is expected. # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA PRE_NAME TYPEDEF_NAME +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA PRE_NAME TYPEDEF_NAME ## -## Ends in an error in state: 283. +## Ends in an error in state: 291. ## ## identifier_list -> identifier_list COMMA PRE_NAME . VAR_NAME [ RPAREN COMMA ] ## ## The known suffix of the stack is as follows: -## identifier_list COMMA PRE_NAME +## identifier_list COMMA PRE_NAME ## Ill-formed K&R function definition. @@ -4381,29 +4381,29 @@ The following type name is used as a K&R parameter name: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN INT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN INT XOR_ASSIGN ## -## Ends in an error in state: 586. +## Ends in an error in state: 596. ## ## declaration_specifiers(declaration(block_item)) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) +## type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE INT XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE INT XOR_ASSIGN ## -## Ends in an error in state: 591. +## Ends in an error in state: 601. ## ## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) +## rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 584. +## Ends in an error in state: 594. ## ## declaration_specifiers(declaration(block_item)) -> typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] @@ -4412,11 +4412,11 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN PRE ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## typedef_name list(declaration_specifier_no_type) +## typedef_name list(declaration_specifier_no_type) ## -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 589. +## Ends in an error in state: 599. ## ## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ] ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] @@ -4425,7 +4425,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOL ## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . attribute_specifier [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) +## rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) ## # We omit the case of the empty list of declarators @@ -4439,21 +4439,21 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE XOR_ASSIGN ## -## Ends in an error in state: 587. +## Ends in an error in state: 597. ## ## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ] ## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ] ## ## The known suffix of the stack is as follows: -## rlist(declaration_specifier_no_type) +## rlist(declaration_specifier_no_type) ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr +## In state 222, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr ## Ill-formed K&R parameter declaration. @@ -4464,16 +4464,16 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: VOID PRE_NAME TYPEDEF_NAME PACKED LPAREN CONSTANT RPAREN XOR_ASSIGN +translation_unit_file: VOID PRE_NAME TYPEDEF_NAME PACKED LPAREN CONSTANT RPAREN XOR_ASSIGN ## -## Ends in an error in state: 600. +## Ends in an error in state: 610. ## ## attribute_specifier_list -> attribute_specifier . attribute_specifier_list [ SEMICOLON LBRACE EQ COMMA ] ## rlist(declaration_specifier_no_type) -> attribute_specifier . [ VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT SIGNED SHORT PRE_NAME LONG INT FLOAT ENUM DOUBLE CHAR ] ## rlist(declaration_specifier_no_type) -> attribute_specifier . rlist(declaration_specifier_no_type) [ VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT SIGNED SHORT PRE_NAME LONG INT FLOAT ENUM DOUBLE CHAR ] ## ## The known suffix of the stack is as follows: -## attribute_specifier +## attribute_specifier ## # We have just parsed a list of attribute specifiers, but we cannot @@ -4497,15 +4497,15 @@ If this is the parameter declaration of a K&R function definition, # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT COMMA XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT COMMA XOR_ASSIGN ## -## Ends in an error in state: 141. +## Ends in an error in state: 238. ## ## parameter_list -> parameter_list COMMA . parameter_declaration [ RPAREN COMMA ] ## parameter_type_list -> parameter_list COMMA . ELLIPSIS [ RPAREN ] ## ## The known suffix of the stack is as follows: -## parameter_list COMMA +## parameter_list COMMA ## At this point, one of the following is expected: @@ -4514,27 +4514,27 @@ At this point, one of the following is expected: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME SEMICOLON +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME SEMICOLON ## -## Ends in an error in state: 140. +## Ends in an error in state: 237. ## ## parameter_list -> parameter_list . COMMA parameter_declaration [ RPAREN COMMA ] ## parameter_type_list -> parameter_list . [ RPAREN ] ## parameter_type_list -> parameter_list . COMMA ELLIPSIS [ RPAREN ] ## ## The known suffix of the stack is as follows: -## parameter_list +## parameter_list ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator -## In state 260, spurious reduction of production attribute_specifier_list -> -## In state 261, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list -## In state 277, spurious reduction of production declare_varname(declarator) -> declarator -## In state 276, spurious reduction of production parameter_declaration -> declaration_specifiers(parameter_declaration) declare_varname(declarator) -## In state 148, spurious reduction of production parameter_list -> parameter_declaration +## In state 263, spurious reduction of production declarator_noattrend -> direct_declarator +## In state 268, spurious reduction of production attribute_specifier_list -> +## In state 269, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list +## In state 285, spurious reduction of production declare_varname(declarator) -> declarator +## In state 284, spurious reduction of production parameter_declaration -> declaration_specifiers(parameter_declaration) declare_varname(declarator) +## In state 245, spurious reduction of production parameter_list -> parameter_declaration ## # We omit the possibility of an ellipsis. @@ -4550,14 +4550,14 @@ then at this point, a closing parenthesis ')' is expected. # ------------------------------------------------------------------------------ -translation_unit_file: PRE_NAME VAR_NAME +translation_unit_file: PRE_NAME VAR_NAME ## ## Ends in an error in state: 16. ## ## typedef_name -> PRE_NAME . TYPEDEF_NAME [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA COLON AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## PRE_NAME +## PRE_NAME ## # This can only happen in a declaration @@ -4568,15 +4568,15 @@ The following identifier is used as a type, but has not been defined as such: # ------------------------------------------------------------------------------ -translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN INT SEMICOLON XOR_ASSIGN +translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN INT SEMICOLON XOR_ASSIGN ## -## Ends in an error in state: 596. +## Ends in an error in state: 606. ## ## declaration_list -> declaration_list . kr_param_declaration [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT RESTRICT REGISTER PRE_NAME PACKED NORETURN LONG LBRACE INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ] ## function_definition1 -> declaration_specifiers(declaration(external_declaration)) declare_varname(declarator_noattrend) save_context declaration_list . [ LBRACE ] ## ## The known suffix of the stack is as follows: -## declaration_specifiers(declaration(external_declaration)) declare_varname(declarator_noattrend) save_context declaration_list +## declaration_specifiers(declaration(external_declaration)) declare_varname(declarator_noattrend) save_context declaration_list ## # clang requests the function body; gcc requests a declaration :-) @@ -4587,7 +4587,7 @@ At this point, one of the following is expected: #------------------------------------------------------------------------------ -translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF XOR_ASSIGN +translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF XOR_ASSIGN ## ## Ends in an error in state: 52. ## @@ -4595,7 +4595,7 @@ translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF XOR_ASSIGN ## postfix_expression -> BUILTIN_OFFSETOF . LPAREN type_name COMMA general_identifier designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## BUILTIN_OFFSETOF +## BUILTIN_OFFSETOF ## Ill-formed __builtin_offsetof. @@ -4603,7 +4603,7 @@ At this point, an opening parenthesis '(' is expected. #------------------------------------------------------------------------------ -translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN XOR_ASSIGN +translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN XOR_ASSIGN ## ## Ends in an error in state: 53. ## @@ -4611,7 +4611,7 @@ translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN XOR_ASSIGN ## postfix_expression -> BUILTIN_OFFSETOF LPAREN . type_name COMMA general_identifier designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## BUILTIN_OFFSETOF LPAREN +## BUILTIN_OFFSETOF LPAREN ## Ill-formed __builtin_offsetof. @@ -4619,23 +4619,23 @@ At this point, a struct or union name is expected. #------------------------------------------------------------------------------ -translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID XOR_ASSIGN +translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID XOR_ASSIGN ## -## Ends in an error in state: 318. +## Ends in an error in state: 326. ## ## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name . COMMA general_identifier RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name . COMMA general_identifier designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## BUILTIN_OFFSETOF LPAREN type_name +## BUILTIN_OFFSETOF LPAREN type_name ## ## WARNING: This example involves spurious reductions. ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name) -## In state 306, spurious reduction of production option(abstract_declarator(type_name)) -> -## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) +## In state 314, spurious reduction of production option(abstract_declarator(type_name)) -> +## In state 320, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name)) ## Ill-formed __builtin_offsetof. @@ -4643,15 +4643,15 @@ At this point, a colon ',' is expected #------------------------------------------------------------------------------ -translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA XOR_ASSIGN +translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA XOR_ASSIGN ## -## Ends in an error in state: 319. +## Ends in an error in state: 327. ## ## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA . general_identifier RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA . general_identifier designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## BUILTIN_OFFSETOF LPAREN type_name COMMA +## BUILTIN_OFFSETOF LPAREN type_name COMMA ## Ill-formed __builtin_offsetof. @@ -4659,15 +4659,15 @@ At this point, a member-designator is expected. #------------------------------------------------------------------------------ -translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA PRE_NAME TYPEDEF_NAME XOR_ASSIGN +translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA PRE_NAME TYPEDEF_NAME XOR_ASSIGN ## -## Ends in an error in state: 320. +## Ends in an error in state: 328. ## ## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier . designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier +## BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier ## Ill-formed __builtin_offsetof. @@ -4675,15 +4675,15 @@ At this point, a member-designator is expected. #------------------------------------------------------------------------------ -translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA PRE_NAME TYPEDEF_NAME LBRACK STRING_LITERAL RBRACK XOR_ASSIGN +translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA PRE_NAME TYPEDEF_NAME LBRACK STRING_LITERAL RBRACK XOR_ASSIGN ## -## Ends in an error in state: 329. +## Ends in an error in state: 337. ## ## option(designator_list) -> designator_list . [ LBRACK DOT ] ## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier designator_list . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier designator_list +## BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier designator_list ## @@ -4692,7 +4692,7 @@ At this point, a member-designator is expected. #------------------------------------------------------------------------------ -translation_unit_file: ALIGNAS LPAREN PRE_NAME XOR_ASSIGN +translation_unit_file: ALIGNAS LPAREN PRE_NAME XOR_ASSIGN ## ## Ends in an error in state: 29. ## @@ -4700,20 +4700,20 @@ translation_unit_file: ALIGNAS LPAREN PRE_NAME XOR_ASSIGN ## typedef_name -> PRE_NAME . TYPEDEF_NAME [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## PRE_NAME +## PRE_NAME ## -translation_unit_file: ALIGNAS LPAREN VOID LPAREN VOID LPAREN PRE_NAME XOR_ASSIGN +translation_unit_file: ALIGNAS LPAREN VOID LPAREN VOID LPAREN PRE_NAME XOR_ASSIGN ## -## Ends in an error in state: 147. +## Ends in an error in state: 244. ## ## declarator_identifier -> PRE_NAME . low_prec TYPEDEF_NAME [ RPAREN PACKED LPAREN LBRACK ATTRIBUTE ALIGNAS ] ## declarator_identifier -> PRE_NAME . VAR_NAME [ RPAREN PACKED LPAREN LBRACK ATTRIBUTE ALIGNAS ] ## typedef_name -> PRE_NAME . TYPEDEF_NAME [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## PRE_NAME +## PRE_NAME ## -translation_unit_file: UNION PRE_NAME XOR_ASSIGN +translation_unit_file: UNION PRE_NAME XOR_ASSIGN ## ## Ends in an error in state: 40. ## @@ -4721,38 +4721,38 @@ translation_unit_file: UNION PRE_NAME XOR_ASSIGN ## typedef_name -> PRE_NAME . TYPEDEF_NAME [ XOR_ASSIGN VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF SUB_ASSIGN STRUCT STATIC STAR SLASH SIGNED SHORT SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RESTRICT REGISTER RBRACK RBRACE QUESTION PTR PRE_NAME PLUS PERCENT PACKED OR_ASSIGN NORETURN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LONG LEQ LEFT_ASSIGN LEFT LBRACK LBRACE INT INLINE INC HAT GT GEQ FLOAT EXTERN EQEQ EQ ENUM DOUBLE DOT DIV_ASSIGN DEC CONST COMMA COLON CHAR BARBAR BAR AUTO ATTRIBUTE AND_ASSIGN ANDAND AND ALIGNAS ADD_ASSIGN ] ## ## The known suffix of the stack is as follows: -## PRE_NAME +## PRE_NAME ## -translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LBRACE PRE_NAME XOR_ASSIGN +translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LBRACE PRE_NAME XOR_ASSIGN ## -## Ends in an error in state: 433. +## Ends in an error in state: 442. ## ## general_identifier -> PRE_NAME . VAR_NAME [ COLON ] ## primary_expression -> PRE_NAME . VAR_NAME [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RIGHT_ASSIGN RIGHT QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ] ## typedef_name -> PRE_NAME . TYPEDEF_NAME [ VOLATILE TYPEDEF STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST COLON AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## PRE_NAME +## PRE_NAME ## -translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LPAREN PRE_NAME XOR_ASSIGN +translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LPAREN PRE_NAME XOR_ASSIGN ## -## Ends in an error in state: 105. +## Ends in an error in state: 202. ## ## identifier_list -> PRE_NAME . VAR_NAME [ RPAREN COMMA ] ## typedef_name -> PRE_NAME . TYPEDEF_NAME [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## PRE_NAME +## PRE_NAME ## -translation_unit_file: VOID PRE_NAME XOR_ASSIGN +translation_unit_file: VOID PRE_NAME XOR_ASSIGN ## -## Ends in an error in state: 93. +## Ends in an error in state: 190. ## ## declarator_identifier -> PRE_NAME . low_prec TYPEDEF_NAME [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## declarator_identifier -> PRE_NAME . VAR_NAME [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ] ## ## The known suffix of the stack is as follows: -## PRE_NAME +## PRE_NAME ## # This is not supposed to be possible, since the Lexer can only emit a diff --git a/cparser/pre_parser.mly b/cparser/pre_parser.mly index 669ecf5e..6ba7ee39 100644 --- a/cparser/pre_parser.mly +++ b/cparser/pre_parser.mly @@ -57,7 +57,7 @@ AUTO REGISTER INLINE NORETURN CHAR SHORT INT LONG SIGNED UNSIGNED FLOAT DOUBLE UNDERSCORE_BOOL CONST VOLATILE VOID STRUCT UNION ENUM CASE DEFAULT IF ELSE SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN BUILTIN_VA_ARG ALIGNOF - ATTRIBUTE ALIGNAS PACKED ASM BUILTIN_OFFSETOF + ATTRIBUTE ALIGNAS PACKED ASM BUILTIN_OFFSETOF STATIC_ASSERT %token EOF @@ -404,6 +404,7 @@ expression: declaration(phantom): | declaration_specifiers(declaration(phantom)) init_declarator_list? SEMICOLON | declaration_specifiers_typedef typedef_declarator_list? SEMICOLON +| static_assert_declaration {} init_declarator_list: @@ -518,6 +519,7 @@ struct_declaration_list: struct_declaration: | specifier_qualifier_list(struct_declaration) struct_declarator_list? SEMICOLON +| static_assert_declaration {} (* As in the standard, except it also encodes the constraint described @@ -607,6 +609,10 @@ gcc_attribute_word: | PACKED {} +static_assert_declaration: +| STATIC_ASSERT LPAREN constant_expression COMMA STRING_LITERAL RPAREN SEMICOLON + {} + function_specifier: | INLINE | NORETURN -- cgit From 2af7c98c3d8cbe466ef78145ed09d20bc70669a6 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 21 Jul 2020 18:42:44 +0200 Subject: Updated handcrafted.messages. Added error descriptions for the new syntax errors introduced by '_Static_assert'. --- cparser/handcrafted.messages | 108 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) (limited to 'cparser') diff --git a/cparser/handcrafted.messages b/cparser/handcrafted.messages index a5f365dc..605e04dc 100644 --- a/cparser/handcrafted.messages +++ b/cparser/handcrafted.messages @@ -4689,6 +4689,114 @@ translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA PRE_NAME Ill-formed __builtin_offsetof. At this point, a member-designator is expected. +# ------------------------------------------------------------------------------ + +translation_unit_file: STATIC_ASSERT XOR_ASSIGN +## +## Ends in an error in state: 76. +## +## static_assert_declaration -> STATIC_ASSERT . LPAREN conditional_expression COMMA STRING_LITERAL RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## +## The known suffix of the stack is as follows: +## STATIC_ASSERT +## +Ill-formed _Static_assert. +At this point, an opening parenthesis '(' is expected. + +#------------------------------------------------------------------------------ + +translation_unit_file: STATIC_ASSERT LPAREN XOR_ASSIGN +## +## Ends in an error in state: 77. +## +## static_assert_declaration -> STATIC_ASSERT LPAREN . conditional_expression COMMA STRING_LITERAL RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## +## The known suffix of the stack is as follows: +## STATIC_ASSERT LPAREN +## + +Ill-formed _Static_assert. +At this point, a constant expression is expected. + +#------------------------------------------------------------------------------ + +translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL XOR_ASSIGN +## +## Ends in an error in state: 167. +## +## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression . COMMA STRING_LITERAL RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## +## The known suffix of the stack is as follows: +## STATIC_ASSERT LPAREN conditional_expression +## +## WARNING: This example involves spurious reductions. +## This implies that, although the LR(1) items shown above provide an +## accurate view of the past (what has been recognized so far), they +## may provide an INCOMPLETE view of the future (what was expected next). +## In state 80, spurious reduction of production primary_expression -> string_literals_list +## In state 82, spurious reduction of production postfix_expression -> primary_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 79, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## + +Ill-formed _Static_assert. +At this point, a comma ',' is expected. + +#------------------------------------------------------------------------------ + +translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL COMMA XOR_ASSIGN +## +## Ends in an error in state: 168. +## +## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA . STRING_LITERAL RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## +## The known suffix of the stack is as follows: +## STATIC_ASSERT LPAREN conditional_expression COMMA +## + +Ill-formed _Static_assert. +At this point, a string literal is expected. + +#------------------------------------------------------------------------------ + +translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL COMMA STRING_LITERAL XOR_ASSIGN +## +## Ends in an error in state: 169. +## +## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA STRING_LITERAL . RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## +## The known suffix of the stack is as follows: +## STATIC_ASSERT LPAREN conditional_expression COMMA STRING_LITERAL +## + +Ill-formed _Static_assert. +At this point, a closing parenthesis ')' is expected. + +#------------------------------------------------------------------------------ + +translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL COMMA STRING_LITERAL RPAREN XOR_ASSIGN +## +## Ends in an error in state: 170. +## +## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA STRING_LITERAL RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## +## The known suffix of the stack is as follows: +## STATIC_ASSERT LPAREN conditional_expression COMMA STRING_LITERAL RPAREN +## + +Ill-formed _Static_assert. +At this point, a semicolon ';' is expected. #------------------------------------------------------------------------------ -- cgit From b23f94bd3a81dd585901d203f8939f494495674f Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 21 Jul 2020 19:20:48 +0200 Subject: cparser/handcrafted.messages: missing blank line --- cparser/handcrafted.messages | 1 + 1 file changed, 1 insertion(+) (limited to 'cparser') diff --git a/cparser/handcrafted.messages b/cparser/handcrafted.messages index 605e04dc..9b565b27 100644 --- a/cparser/handcrafted.messages +++ b/cparser/handcrafted.messages @@ -4700,6 +4700,7 @@ translation_unit_file: STATIC_ASSERT XOR_ASSIGN ## The known suffix of the stack is as follows: ## STATIC_ASSERT ## + Ill-formed _Static_assert. At this point, an opening parenthesis '(' is expected. -- cgit From 907a9042ffb8d21fece6fc8e663ce23d32aa8fa1 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 21 Jul 2020 19:47:42 +0200 Subject: More checks for __builtin_va_start (#250) We check that this builtin function is only called from within a variadic function and has the correct number of arguments. --- cparser/Elab.ml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'cparser') diff --git a/cparser/Elab.ml b/cparser/Elab.ml index ab91ada2..940c6f14 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -1808,14 +1808,18 @@ let elab_expr ctx loc env a = (preprocessing) --> __builtin_va_arg(ap, ty) (elaboration) --> __builtin_va_arg(ap, sizeof(ty)) *) - | CALL((VARIABLE "__builtin_va_start" as a1), [a2; a3]) -> + | CALL((VARIABLE "__builtin_va_start" as a1), args) -> if not ctx.ctx_vararg then error "'va_start' used in function with fixed args"; - let b1,env = elab env a1 in - let b2,env = elab env a2 in - let _b3,env = elab env a3 in - { edesc = ECall(b1, [b2]); - etyp = TVoid [] },env + let b1, env = elab env a1 in + begin match args with + | [a2; a3] -> + let b2,env = elab env a2 in + let _b3,env = elab env a3 in + { edesc = ECall(b1, [b2]); + etyp = TVoid [] },env + | _ -> fatal_error "'__builtin_va_start' expects 2 arguments" + end | BUILTIN_VA_ARG (a2, a3) -> let ident = -- cgit From 0132b8aa669adc10e6ca953d10d5c0b861f304b1 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 27 Jul 2020 19:05:27 +0200 Subject: Allow string_literals_list in _Static_assert. Not all pre-processors concatenate string literal lists, however they are allowed in _Static_assert. This is similar to the rules for inline assembly etc. --- cparser/handcrafted.messages | 47 ++++++++++++++++++++++---------------------- cparser/pre_parser.mly | 2 +- 2 files changed, 25 insertions(+), 24 deletions(-) (limited to 'cparser') diff --git a/cparser/handcrafted.messages b/cparser/handcrafted.messages index 9b565b27..23e90b3e 100644 --- a/cparser/handcrafted.messages +++ b/cparser/handcrafted.messages @@ -4695,7 +4695,7 @@ translation_unit_file: STATIC_ASSERT XOR_ASSIGN ## ## Ends in an error in state: 76. ## -## static_assert_declaration -> STATIC_ASSERT . LPAREN conditional_expression COMMA STRING_LITERAL RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## static_assert_declaration -> STATIC_ASSERT . LPAREN conditional_expression COMMA string_literals_list RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: ## STATIC_ASSERT @@ -4710,7 +4710,7 @@ translation_unit_file: STATIC_ASSERT LPAREN XOR_ASSIGN ## ## Ends in an error in state: 77. ## -## static_assert_declaration -> STATIC_ASSERT LPAREN . conditional_expression COMMA STRING_LITERAL RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## static_assert_declaration -> STATIC_ASSERT LPAREN . conditional_expression COMMA string_literals_list RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: ## STATIC_ASSERT LPAREN @@ -4725,7 +4725,7 @@ translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL XOR_ASSIGN ## ## Ends in an error in state: 167. ## -## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression . COMMA STRING_LITERAL RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression . COMMA string_literals_list RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: ## STATIC_ASSERT LPAREN conditional_expression @@ -4734,21 +4734,21 @@ translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL XOR_ASSIGN ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 80, spurious reduction of production primary_expression -> string_literals_list -## In state 82, spurious reduction of production postfix_expression -> primary_expression -## In state 83, spurious reduction of production unary_expression -> postfix_expression -## In state 79, spurious reduction of production cast_expression -> unary_expression -## In state 110, spurious reduction of production multiplicative_expression -> cast_expression -## In state 104, spurious reduction of production additive_expression -> multiplicative_expression -## In state 123, spurious reduction of production shift_expression -> additive_expression -## In state 100, spurious reduction of production relational_expression -> shift_expression -## In state 116, spurious reduction of production equality_expression -> relational_expression -## In state 132, spurious reduction of production and_expression -> equality_expression -## In state 140, spurious reduction of production exclusive_or_expression -> and_expression -## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression -## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression -## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression -## In state 124, spurious reduction of production conditional_expression -> logical_or_expression +## In state 80, spurious reduction of production primary_expression -> string_literals_list +## In state 82, spurious reduction of production postfix_expression -> primary_expression +## In state 83, spurious reduction of production unary_expression -> postfix_expression +## In state 79, spurious reduction of production cast_expression -> unary_expression +## In state 110, spurious reduction of production multiplicative_expression -> cast_expression +## In state 104, spurious reduction of production additive_expression -> multiplicative_expression +## In state 123, spurious reduction of production shift_expression -> additive_expression +## In state 100, spurious reduction of production relational_expression -> shift_expression +## In state 116, spurious reduction of production equality_expression -> relational_expression +## In state 132, spurious reduction of production and_expression -> equality_expression +## In state 140, spurious reduction of production exclusive_or_expression -> and_expression +## In state 141, spurious reduction of production inclusive_or_expression -> exclusive_or_expression +## In state 142, spurious reduction of production logical_and_expression -> inclusive_or_expression +## In state 126, spurious reduction of production logical_or_expression -> logical_and_expression +## In state 124, spurious reduction of production conditional_expression -> logical_or_expression ## Ill-formed _Static_assert. @@ -4760,7 +4760,7 @@ translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL COMMA XOR_ASSIGN ## ## Ends in an error in state: 168. ## -## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA . STRING_LITERAL RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA . string_literals_list RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: ## STATIC_ASSERT LPAREN conditional_expression COMMA @@ -4775,10 +4775,11 @@ translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL COMMA STRING_LITERAL ## ## Ends in an error in state: 169. ## -## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA STRING_LITERAL . RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA string_literals_list . RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## string_literals_list -> string_literals_list . STRING_LITERAL [ STRING_LITERAL RPAREN ] ## ## The known suffix of the stack is as follows: -## STATIC_ASSERT LPAREN conditional_expression COMMA STRING_LITERAL +## STATIC_ASSERT LPAREN conditional_expression COMMA string_literals_list ## Ill-formed _Static_assert. @@ -4790,10 +4791,10 @@ translation_unit_file: STATIC_ASSERT LPAREN STRING_LITERAL COMMA STRING_LITERAL ## ## Ends in an error in state: 170. ## -## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA STRING_LITERAL RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] +## static_assert_declaration -> STATIC_ASSERT LPAREN conditional_expression COMMA string_literals_list RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: -## STATIC_ASSERT LPAREN conditional_expression COMMA STRING_LITERAL RPAREN +## STATIC_ASSERT LPAREN conditional_expression COMMA string_literals_list RPAREN ## Ill-formed _Static_assert. diff --git a/cparser/pre_parser.mly b/cparser/pre_parser.mly index 6ba7ee39..4b62b235 100644 --- a/cparser/pre_parser.mly +++ b/cparser/pre_parser.mly @@ -610,7 +610,7 @@ gcc_attribute_word: {} static_assert_declaration: -| STATIC_ASSERT LPAREN constant_expression COMMA STRING_LITERAL RPAREN SEMICOLON +| STATIC_ASSERT LPAREN constant_expression COMMA string_literals_list RPAREN SEMICOLON {} function_specifier: -- cgit From 970c5aa11a629d81abc893e7f0428b53e556ab30 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Thu, 30 Jul 2020 10:59:25 +0200 Subject: Add comments we missed to sync to GitHub --- cparser/Elab.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cparser') diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 940c6f14..5c03410f 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -985,6 +985,7 @@ and elab_field_group env = function elab_name_group loc env (spec, List.map fst fieldlist) in if sto <> Storage_default then + (* This should actually never be triggered, catched by pre-parser *) error loc "non-default storage in struct or union"; if fieldlist = [] then (* This should actually never be triggered, empty structs are captured earlier *) @@ -2853,6 +2854,7 @@ let elab_definition (for_loop: bool) (local: bool) (nonstatic_inline: bool) (* "int f(int x) { ... }" *) (* "int f(x, y) double y; { ... }" *) | FUNDEF(spec, name, defs, body, loc) -> + (* This should actually never be triggered, catched by pre-parser *) if local then error loc "function definition is not allowed here"; let env1 = elab_fundef env spec name defs body loc in ([], env1) -- cgit From b6a7b8ee4a5711911b66be6ea4dba3742601b03c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 4 Aug 2020 10:50:37 +0200 Subject: Add new static-assert token for deLexer utility; bug 29273 --- cparser/deLexer.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'cparser') diff --git a/cparser/deLexer.ml b/cparser/deLexer.ml index de0e9b6e..ee6976d4 100644 --- a/cparser/deLexer.ml +++ b/cparser/deLexer.ml @@ -116,6 +116,7 @@ let delex (symbol : string) : string = | "DOT" -> "." | "PRAGMA" -> "#pragma \n" | "BUILTIN_OFFSETOF" -> "__builtin_offsetof" + | "STATIC_ASSERT" -> "_Static_assert" | "EOF" -> "" (* this should be ok *) | _ -> raise Not_found (* this should not happen *) -- cgit From e7b938f620ddc1e10542727f7ec142f47f7090bf Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 27 Aug 2020 18:07:15 +0200 Subject: Check ptr arithmetic for ++ and -- Also: improve check for ptr - integer. (Added by Xavier Leroy ) --- cparser/Elab.ml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'cparser') diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 5c03410f..bb9f8aca 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -1710,11 +1710,12 @@ let elab_expr ctx loc env a = let check_ptr_arith env ty s = match unroll env ty with | TVoid _ -> - error "illegal arithmetic on a pointer to void in binary '%c'" s + error "illegal arithmetic on a pointer to void in %s" s | TFun _ -> - error "illegal arithmetic on a pointer to the function type %a in binary '%c'" (print_typ env) ty s - | _ -> if incomplete_type env ty then - error "arithmetic on a pointer to an incomplete type %a in binary '%c'" (print_typ env) ty s + error "illegal arithmetic on a pointer to the function type %a in %s" (print_typ env) ty s + | _ -> + if incomplete_type env ty then + error "arithmetic on a pointer to an incomplete type %a in %s" (print_typ env) ty s in let check_static_var env id sto ty = @@ -2120,7 +2121,7 @@ let elab_expr ctx loc env a = | _, _ -> fatal_error "invalid operands to binary '+' (%a and %a)" (print_typ env) b1.etyp (print_typ env) b2.etyp in - check_ptr_arith env ty '+'; + check_ptr_arith env ty "binary '+'"; TPtr(ty, []) end in { edesc = EBinop(Oadd, b1, b2, tyres); etyp = tyres },env @@ -2135,20 +2136,20 @@ let elab_expr ctx loc env a = end else begin match wrap unroll loc env b1.etyp, wrap unroll loc env b2.etyp with | (TPtr(ty, a) | TArray(ty, _, a)), (TInt _ | TEnum _) -> - if not (wrap pointer_arithmetic_ok loc env ty) then - error "illegal pointer arithmetic in binary '-'"; + check_ptr_arith env ty "binary '-'"; (TPtr(ty, []), TPtr(ty, [])) | (TPtr(ty1, a1) | TArray(ty1, _, a1)), (TPtr(ty2, a2) | TArray(ty2, _, a2)) -> if not (compatible_types AttrIgnoreAll env ty1 ty2) then error "%a and %a are not pointers to compatible types" (print_typ env) b1.etyp (print_typ env) b1.etyp; - check_ptr_arith env ty1 '-'; - check_ptr_arith env ty2 '-'; + check_ptr_arith env ty1 "binary '-'"; + check_ptr_arith env ty2 "binary '-'"; if wrap sizeof loc env ty1 = Some 0 then error "subtraction between two pointers to zero-sized objects"; (TPtr(ty1, []), TInt(ptrdiff_t_ikind(), [])) - | _, _ -> fatal_error "invalid operands to binary '-' (%a and %a)" + | _, _ -> + fatal_error "invalid operands to binary '-' (%a and %a)" (print_typ env) b1.etyp (print_typ env) b2.etyp end in { edesc = EBinop(Osub, b1, b2, tyop); etyp = tyres },env @@ -2306,6 +2307,11 @@ let elab_expr ctx loc env a = error "expression is not assignable"; if not (is_scalar_type env b1.etyp) then error "cannot %s value of type %a" msg (print_typ env) b1.etyp; + begin match unroll env b1.etyp with + | TPtr (ty, _) | TArray (ty, _ , _) -> + check_ptr_arith env ty ("unary " ^ msg) + | _ -> () + end; { edesc = EUnop(op, b1); etyp = b1.etyp },env (* Elaboration of binary operators over integers *) -- cgit