diff --git a/backend/cn/parse.ml b/backend/cn/parse.ml index 5afc2fe4d..ba45ee9c6 100644 --- a/backend/cn/parse.ml +++ b/backend/cn/parse.ml @@ -34,7 +34,7 @@ let fiddle_at_hack string = fix ss let debug_tokens loc string = - let (toks, pos) = C_parser_driver.diagnostic_get_tokens ~inside_cn:true loc string in + let (toks, pos) = C_parser_driver.diagnostic_get_cn_tokens loc string in let pp_int_pair (x, y) = Pp.(parens (int x ^^ comma ^^^ int y)) in Pp.item "failed to parse tokens" (Pp.braces (Pp.list Pp.string toks)) ^/^ Pp.item "(line, col)" (Pp.braces (Pp.list pp_int_pair pos)) @@ -54,13 +54,13 @@ let parse parser_start (loc, string) = let cn_statements annots = annots |> get_cerb_magic_attr - |> ListM.concat_mapM (parse C_parser.cn_statements) + |> ListM.concat_mapM (parse Cn_parser.cn_statements) let function_spec (Attrs attributes) = let@ conditions = [Aattrs (Attrs (List.rev attributes))] |> get_cerb_magic_attr - |> ListM.concat_mapM (parse C_parser.function_spec) in + |> ListM.concat_mapM (parse Cn_parser.function_spec) in ListM.fold_leftM (fun acc cond -> match cond, acc with | (Cn.CN_trusted loc), (_, [], [], [], []) -> @@ -86,7 +86,7 @@ let loop_spec attrs = [Aattrs attrs] |> get_cerb_magic_attr |> ListM.concat_mapM (fun (loc, arg) -> - let@ (Cn.CN_inv (_loc, conds)) = parse C_parser.loop_spec (loc, arg) in + let@ (Cn.CN_inv (_loc, conds)) = parse Cn_parser.loop_spec (loc, arg) in return conds) diff --git a/parsers/c/c_lexer.mll b/parsers/c/c_lexer.mll index def0bdeca..936790f77 100644 --- a/parsers/c/c_lexer.mll +++ b/parsers/c/c_lexer.mll @@ -7,7 +7,6 @@ open Tokens exception Error of Errors.cparser_cause type flags = { - inside_cn : bool; magic_comment_char : char; at_magic_comments : bool; } @@ -91,74 +90,6 @@ let lexicon: (string, token) Hashtbl.t = let add (key, builder) = Hashtbl.add lexicon key builder in List.iter add keywords; lexicon - -(* BEGIN CN *) -let cn_keywords: (string * Tokens.token) list = [ - "good" , CN_GOOD; - "bool" , CN_BOOL; - "boolean" , CN_BOOL; - "CN_bool" , CN_BOOL; - "integer" , CN_INTEGER; - "u8" , CN_BITS (`U,8); - "u16" , CN_BITS (`U,16); - "u32" , CN_BITS (`U,32); - "u64" , CN_BITS (`U,64); - "u128" , CN_BITS (`U,128); - "i8" , CN_BITS (`I,8); - "i16" , CN_BITS (`I,16); - "i32" , CN_BITS (`I,32); - "i64" , CN_BITS (`I,64); - "i128" , CN_BITS (`I,128); - "real" , CN_REAL; - "pointer" , CN_POINTER; - "alloc_id" , CN_ALLOC_ID; - "map" , CN_MAP; - "list" , CN_LIST; - "tuple" , CN_TUPLE; - "set" , CN_SET; - "let" , CN_LET; - "take" , CN_TAKE; - "Owned" , CN_OWNED; - "Block" , CN_BLOCK; - "each" , CN_EACH; - "NULL" , CN_NULL; - "true" , CN_TRUE; - "false" , CN_FALSE; - "requires" , CN_REQUIRES; - "ensures" , CN_ENSURES; - "inv" , CN_INV; - "accesses" , CN_ACCESSES; - "trusted" , CN_TRUSTED; - "cn_function" , CN_FUNCTION; - "spec" , CN_SPEC; - "unchanged" , CN_UNCHANGED; - "pack" , CN_PACK; - "unpack" , CN_UNPACK; - "instantiate" , CN_INSTANTIATE; - "print" , CN_PRINT; - "split_case" , CN_SPLIT_CASE; - "extract" , CN_EXTRACT; - "array_shift" , CN_ARRAY_SHIFT; - "member_shift" , CN_MEMBER_SHIFT; - "have" , CN_HAVE; - "unfold" , CN_UNFOLD; - "apply" , CN_APPLY; - "match" , CN_MATCH; - "predicate" , CN_PREDICATE; - "function" , CN_FUNCTION; - "lemma" , CN_LEMMA; - "datatype" , CN_DATATYPE; - "type_synonym" , CN_TYPE_SYNONYM; - "_" , CN_WILD; - ] - -let cn_lexicon: (string, token) Hashtbl.t = - let cn_lexicon = Hashtbl.create 0 in - let add (key, builder) = Hashtbl.add cn_lexicon key builder in - List.iter add cn_keywords; cn_lexicon -(* END CN *) - - let lex_comment remainder lexbuf = let ch = lexeme_char lexbuf 0 in if ch = '\n' then new_line lexbuf; @@ -339,9 +270,6 @@ let whitespace_char = [' ' '\t' (*'\n'*) '\012' '\r'] let lbrack_lbrack = '[' whitespace_char* '[' (*let rbrack_rbrack = ']' whitespace_char* ']'*) -(* For CN *) -let cn_integer_width = ("8" | "16" | "32" | "64" | "128") - (* ========================================================================== *) rule s_char_sequence = parse @@ -437,12 +365,6 @@ and initial flags = parse { CONSTANT (Cabs.CabsInteger_const (str, Some Cabs.CabsSuffix_UL)) } | (integer_constant as str) long_long_suffix unsigned_suffix { CONSTANT (Cabs.CabsInteger_const (str, Some Cabs.CabsSuffix_ULL)) } - (* For CN. Copying and adjusting Kayvan's code from above. *) - | (integer_constant as str) 'u' (cn_integer_width as n) - { CN_CONSTANT (str, `U, int_of_string n) } - | (integer_constant as str) 'i' (cn_integer_width as n) - { CN_CONSTANT (str, `I, int_of_string n) } - (* /For CN. *) | (integer_constant as str) { CONSTANT (Cabs.CabsInteger_const (str, None)) } @@ -550,26 +472,10 @@ and initial flags = parse | "|||" { PIPES } | "}-}" { RBRACES } - (* copied over from backend/cn/assertion_lexer.mll *) - | ['A'-'Z']['0'-'9' 'A'-'Z' 'a'-'z' '_']* as id - { - if flags.inside_cn then - try Hashtbl.find cn_lexicon id - with Not_found -> - UNAME id - else - UNAME id - } - | identifier as id { try Hashtbl.find lexicon id with Not_found -> - if flags.inside_cn then - try Hashtbl.find cn_lexicon id - with Not_found -> - LNAME id - else LNAME id } | eof @@ -586,7 +492,7 @@ type lexer_state = let lexer_state = ref LSRegular -let lexer : inside_cn:bool -> lexbuf -> token = fun ~inside_cn lexbuf -> +let lexer : lexbuf -> token = fun lexbuf -> match !lexer_state with | LSRegular -> let at_magic_comments = Switches.(has_switch SW_at_magic_comments) in @@ -595,7 +501,7 @@ let lexer : inside_cn:bool -> lexbuf -> token = fun ~inside_cn lexbuf -> then '$' else '@' in - begin match initial { inside_cn; at_magic_comments; magic_comment_char } lexbuf with + begin match initial { at_magic_comments; magic_comment_char } lexbuf with | LNAME i as tok -> lexer_state := LSIdentifier i; tok | UNAME i as tok -> lexer_state := LSIdentifier i; tok | _ as tok -> lexer_state := LSRegular; tok diff --git a/parsers/c/c_parser.mly b/parsers/c/c_parser.mly index 27f29661b..be2e4a1a6 100644 --- a/parsers/c/c_parser.mly +++ b/parsers/c/c_parser.mly @@ -316,6 +316,7 @@ type asm_qualifier = located_string_literal %start translation_unit +%start type_name_eof %start function_spec %start loop_spec %start cn_statements @@ -1778,6 +1779,10 @@ balanced_token: { strs } ; +type_name_eof: +| ty= type_name EOF + { ty } + (* BEGIN CN *) (* CN assertion language *****************************************************) (* diff --git a/parsers/c/c_parser_driver.ml b/parsers/c/c_parser_driver.ml index 096c0cf1c..df2dd48a9 100644 --- a/parsers/c/c_parser_driver.ml +++ b/parsers/c/c_parser_driver.ml @@ -1,4 +1,5 @@ open Cerb_frontend +[@@@warning "-33"] open Cn_lexer (* TODO: working-in-progress. this is to get the module built *) let after_before_msg offset buffer (lexbuf : Lexing.lexbuf) = let show_token (start, curr) = @@ -50,21 +51,22 @@ let start_pos = function | Loc_regions ((loc, _) :: _, _) -> Some loc | _ -> None -let diagnostic_get_tokens ~inside_cn loc string = +(* TODO(K): move this to the CN backend *) +let diagnostic_get_cn_tokens loc string = (* `C_lexer.magic_token' ensures `loc` is a region *) let start_pos = Option.get @@ start_pos loc in let lexbuf = Lexing.from_string string in let rec relex (toks, pos) = try - match C_lexer.lexer ~inside_cn lexbuf with - | Tokens.EOF -> (List.rev ("EOF" :: toks), List.rev pos) + match Cn_lexer.lexer lexbuf with + | Cn_tokens.EOF -> (List.rev ("EOF" :: toks), List.rev pos) | t -> let Lexing.{ pos_lnum; pos_bol; pos_cnum; _ } = lexbuf.lex_start_p in let (line, col) = (* the first line needs to have columns shifted by /*@ but the rest do not *) let col_off = if pos_lnum > 1 then 1 else start_pos.pos_cnum - start_pos.pos_bol + 1 in (pos_lnum + start_pos.pos_lnum, col_off + pos_cnum - pos_bol) in - relex (Tokens.string_of_token t :: toks, (line, col) :: pos) + relex (Cn_tokens.string_of_token t :: toks, (line, col) :: pos) with C_lexer.Error err -> (List.rev (Pp_errors.string_of_cparser_cause err :: toks), List.rev pos) @@ -79,7 +81,7 @@ let parse_loc_string parse (loc, str) = Lexing.set_filename lexbuf (Option.value ~default:"" (Cerb_location.get_filename loc)); handle parse - (MenhirLib.ErrorReports.wrap (C_lexer.lexer ~inside_cn:true)) + (MenhirLib.ErrorReports.wrap (Cn_lexer.lexer)) ~offset:start_pos.pos_cnum lexbuf @@ -114,7 +116,7 @@ let update_enclosing_region payload_region xs = let magic_comments_to_cn_toplevel (Cabs.TUnit decls) = let magic_comments_to_cn_toplevel = function | Cabs.EDecl_magic (loc, str) -> - parse_loc_string C_parser.cn_toplevel (loc, str) + parse_loc_string Cn_parser.cn_toplevel (loc, str) |> Exception.except_fmap (update_enclosing_region loc) | decl -> Exception.except_return [decl] in @@ -125,7 +127,7 @@ let magic_comments_to_cn_toplevel (Cabs.TUnit decls) = let parse_with_magic_comments lexbuf = handle C_parser.translation_unit - (MenhirLib.ErrorReports.wrap (C_lexer.lexer ~inside_cn:false)) + (MenhirLib.ErrorReports.wrap (C_lexer.lexer)) ~offset:0 lexbuf diff --git a/parsers/c/c_parser_error.messages b/parsers/c/c_parser_error.messages index 4d1786d6f..5af1c61fb 100644 --- a/parsers/c/c_parser_error.messages +++ b/parsers/c/c_parser_error.messages @@ -111,7 +111,7 @@ translation_unit: UNAME WHILE ## ## Ends in an error in state: 28. ## -## typedef_name -> UNAME . TYPE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## typedef_name -> UNAME . TYPE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## UNAME @@ -291,7 +291,7 @@ translation_unit: LNAME WHILE ## ## Ends in an error in state: 57. ## -## typedef_name -> LNAME . TYPE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## typedef_name -> LNAME . TYPE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## LNAME @@ -303,7 +303,7 @@ translation_unit: LBRACK_LBRACK VA_START ## ## Ends in an error in state: 65. ## -## attribute_specifier -> LBRACK_LBRACK . attribute_list RBRACK RBRACK [ WHILE VOLATILE VOID VA_START VA_END VA_COPY VA_ARG UNSIGNED UNION UNAME TYPEOF TYPEDEF TILDE THREAD_LOCAL SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RETURN RESTRICT REGISTER RBRACE PRINT_TYPE PLUS_PLUS PLUS OFFSETOF NORETURN MINUS_MINUS MINUS LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE IF GT GOTO GENERIC FOR FLOAT EXTERN EQ ENUM DOUBLE DO DEFAULT CONTINUE CONSTANT CONST COMPLEX COMMA COLON CHAR CERB_MAGIC CASE BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BREAK BOOL BMC_ASSUME BANG AUTO ATOMIC ASSERT ASM AMPERSAND ALIGNOF ALIGNAS ] +## attribute_specifier -> LBRACK_LBRACK . attribute_list RBRACK RBRACK [ WHILE VOLATILE VOID VA_START VA_END VA_COPY VA_ARG UNSIGNED UNION UNAME TYPEOF TYPEDEF TILDE THREAD_LOCAL SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RETURN RESTRICT REGISTER RBRACE PRINT_TYPE PLUS_PLUS PLUS OFFSETOF NORETURN MINUS_MINUS MINUS LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE IF GT GOTO GENERIC FOR FLOAT EXTERN EQ EOF ENUM DOUBLE DO DEFAULT CONTINUE CONSTANT CONST COMPLEX COMMA COLON CHAR CERB_MAGIC CASE BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BREAK BOOL BMC_ASSUME BANG AUTO ATOMIC ASSERT ASM AMPERSAND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: ## LBRACK_LBRACK @@ -387,7 +387,7 @@ translation_unit: LBRACK_LBRACK ALIGNAS RBRACK WHILE ## ## Ends in an error in state: 140. ## -## attribute_specifier -> LBRACK_LBRACK attribute_list RBRACK . RBRACK [ WHILE VOLATILE VOID VA_START VA_END VA_COPY VA_ARG UNSIGNED UNION UNAME TYPEOF TYPEDEF TILDE THREAD_LOCAL SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RETURN RESTRICT REGISTER RBRACE PRINT_TYPE PLUS_PLUS PLUS OFFSETOF NORETURN MINUS_MINUS MINUS LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE IF GT GOTO GENERIC FOR FLOAT EXTERN EQ ENUM DOUBLE DO DEFAULT CONTINUE CONSTANT CONST COMPLEX COMMA COLON CHAR CERB_MAGIC CASE BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BREAK BOOL BMC_ASSUME BANG AUTO ATOMIC ASSERT ASM AMPERSAND ALIGNOF ALIGNAS ] +## attribute_specifier -> LBRACK_LBRACK attribute_list RBRACK . RBRACK [ WHILE VOLATILE VOID VA_START VA_END VA_COPY VA_ARG UNSIGNED UNION UNAME TYPEOF TYPEDEF TILDE THREAD_LOCAL SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RETURN RESTRICT REGISTER RBRACE PRINT_TYPE PLUS_PLUS PLUS OFFSETOF NORETURN MINUS_MINUS MINUS LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE IF GT GOTO GENERIC FOR FLOAT EXTERN EQ EOF ENUM DOUBLE DO DEFAULT CONTINUE CONSTANT CONST COMPLEX COMMA COLON CHAR CERB_MAGIC CASE BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BREAK BOOL BMC_ASSUME BANG AUTO ATOMIC ASSERT ASM AMPERSAND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: ## LBRACK_LBRACK attribute_list RBRACK @@ -423,7 +423,7 @@ translation_unit: ENUM LBRACE WHILE ## ## Ends in an error in state: 149. ## -## enum_specifier -> ENUM option(general_identifier) LBRACE . enumerator_list option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM option(general_identifier) LBRACE . enumerator_list option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## ENUM option(general_identifier) LBRACE @@ -471,7 +471,7 @@ translation_unit: ATOMIC LPAREN WHILE ## ## Ends in an error in state: 175. ## -## atomic_type_specifier -> ATOMIC LPAREN . type_name RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## atomic_type_specifier -> ATOMIC LPAREN . type_name RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## ATOMIC LPAREN @@ -675,7 +675,7 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK STATIC WHILE ## ## Ends in an error in state: 238. ## -## array_abstract_declarator -> LBRACK STATIC . option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> LBRACK STATIC . option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## LBRACK STATIC @@ -1035,7 +1035,7 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK ATOMIC STATIC WHILE ## ## Ends in an error in state: 340. ## -## array_abstract_declarator -> LBRACK type_qualifier_list STATIC . assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> LBRACK type_qualifier_list STATIC . assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## LBRACK type_qualifier_list STATIC @@ -1047,7 +1047,7 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LPAREN WHILE ## ## Ends in an error in state: 356. ## -## function_abstract_declarator -> direct_abstract_declarator LPAREN . option(scoped(parameter_type_list)) RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## function_abstract_declarator -> direct_abstract_declarator LPAREN . option(scoped(parameter_type_list)) RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## direct_abstract_declarator LPAREN @@ -1107,7 +1107,7 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK STATIC WHILE ## ## Ends in an error in state: 423. ## -## array_abstract_declarator -> direct_abstract_declarator LBRACK STATIC . option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK STATIC . option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## direct_abstract_declarator LBRACK STATIC @@ -1119,7 +1119,7 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK ATOMIC STATIC WHILE ## ## Ends in an error in state: 430. ## -## array_abstract_declarator -> direct_abstract_declarator LBRACK type_qualifier_list STATIC . assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK type_qualifier_list STATIC . assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## direct_abstract_declarator LBRACK type_qualifier_list STATIC @@ -1131,7 +1131,7 @@ translation_unit: ALIGNAS LPAREN BOOL LPAREN BOOL COMMA ELLIPSIS WHILE ## ## Ends in an error in state: 448. ## -## function_abstract_declarator -> LPAREN option(scoped(parameter_type_list)) . RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## function_abstract_declarator -> LPAREN option(scoped(parameter_type_list)) . RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## LPAREN option(scoped(parameter_type_list)) @@ -1143,7 +1143,7 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LPAREN BOOL COMMA ELLIPSIS W ## ## Ends in an error in state: 453. ## -## function_abstract_declarator -> direct_abstract_declarator LPAREN option(scoped(parameter_type_list)) . RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## function_abstract_declarator -> direct_abstract_declarator LPAREN option(scoped(parameter_type_list)) . RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## direct_abstract_declarator LPAREN option(scoped(parameter_type_list)) @@ -2116,7 +2116,7 @@ translation_unit: ENUM LBRACK_LBRACK ALIGNAS RBRACK RBRACK LBRACE WHILE ## ## Ends in an error in state: 815. ## -## enum_specifier -> ENUM attribute_specifier_sequence option(general_identifier) LBRACE . enumerator_list option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM attribute_specifier_sequence option(general_identifier) LBRACE . enumerator_list option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## ENUM attribute_specifier_sequence option(general_identifier) LBRACE @@ -7309,6 +7309,18 @@ cn_statements: CN_EXTRACT AMPERSAND LPAREN LPAREN WHILE parsing "prim_expr": seen "LPAREN", expecting "expr RPAREN" +translation_unit: ALIGNAS LPAREN LPAREN LBRACE IF LPAREN STRING_LITERAL RPAREN VOLATILE +## +## Ends in an error in state: 658. +## +## scoped(statement) -> save_context . statement [ WHILE VOLATILE VOID VA_START VA_END VA_COPY VA_ARG UNSIGNED UNION UNAME TYPEOF TYPEDEF TILDE THREAD_LOCAL SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACES RBRACE PRINT_TYPE PLUS_PLUS PLUS PIPES OFFSETOF NORETURN MINUS_MINUS MINUS LPAREN LONG LNAME LBRACK_LBRACK LBRACES LBRACE INT INLINE IF GOTO GENERIC FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT CONTINUE CONSTANT CONST COMPLEX CHAR CERB_MAGIC CASE BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BREAK BOOL BMC_ASSUME BANG AUTO ATOMIC ASSERT ASM AMPERSAND ALIGNOF ALIGNAS ] +## +## The known suffix of the stack is as follows: +## save_context +## + +parsing "scoped(statement)": seen "save_context", expecting "statement" + cn_statements: INLINE UNAME WHILE ## ## Ends in an error in state: 2. @@ -7427,8 +7439,8 @@ translation_unit: TYPEOF WHILE ## ## Ends in an error in state: 30. ## -## type_specifier_unique -> TYPEOF . LPAREN expression RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] -## type_specifier_unique -> TYPEOF . LPAREN type_name RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## type_specifier_unique -> TYPEOF . LPAREN expression RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## type_specifier_unique -> TYPEOF . LPAREN type_name RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## TYPEOF @@ -7440,8 +7452,8 @@ translation_unit: TYPEOF LPAREN WHILE ## ## Ends in an error in state: 31. ## -## type_specifier_unique -> TYPEOF LPAREN . expression RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] -## type_specifier_unique -> TYPEOF LPAREN . type_name RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## type_specifier_unique -> TYPEOF LPAREN . expression RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## type_specifier_unique -> TYPEOF LPAREN . type_name RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## TYPEOF LPAREN @@ -7466,10 +7478,10 @@ translation_unit: ENUM WHILE ## ## Ends in an error in state: 61. ## -## enum_specifier -> ENUM . option(general_identifier) LBRACE enumerator_list option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] -## enum_specifier -> ENUM . attribute_specifier_sequence option(general_identifier) LBRACE enumerator_list option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] -## enum_specifier -> ENUM . general_identifier [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] -## enum_specifier -> ENUM . attribute_specifier_sequence general_identifier [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM . option(general_identifier) LBRACE enumerator_list option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM . attribute_specifier_sequence option(general_identifier) LBRACE enumerator_list option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM . general_identifier [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM . attribute_specifier_sequence general_identifier [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## ENUM @@ -7481,8 +7493,8 @@ translation_unit: BOOL UNAME WHILE ## ## Ends in an error in state: 62. ## -## typedef_name -> UNAME . TYPE [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC_ASSERT STATIC STAR_EQ STAR SLASH_EQ SLASH SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK RBRACE QUESTION_COLON QUESTION PLUS_PLUS PLUS_EQ PLUS PIPE_PIPE PIPE_EQ PIPE PERCENT_EQ PERCENT NORETURN MINUS_MINUS MINUS_GT MINUS_EQ MINUS LT_LT_EQ LT_LT LT_EQ LT LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE GT_GT_EQ GT_GT GT_EQ GT FLOAT EXTERN EQ_EQ EQ ENUM ELLIPSIS DOUBLE DOT CONST COMPLEX COMMA COLON_COLON COLON CHAR CERB_MAGIC CARET_EQ CARET BOOL BANG_EQ AUTO ATOMIC ASM AMPERSAND_EQ AMPERSAND_AMPERSAND AMPERSAND ALIGNAS ] -## var_name -> UNAME . VARIABLE [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC_ASSERT STATIC STAR_EQ STAR SLASH_EQ SLASH SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK RBRACE QUESTION_COLON QUESTION PLUS_PLUS PLUS_EQ PLUS PIPE_PIPE PIPE_EQ PIPE PERCENT_EQ PERCENT NORETURN MINUS_MINUS MINUS_GT MINUS_EQ MINUS LT_LT_EQ LT_LT LT_EQ LT LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE GT_GT_EQ GT_GT GT_EQ GT FLOAT EXTERN EQ_EQ EQ ENUM ELLIPSIS DOUBLE DOT CONST COMPLEX COMMA COLON_COLON COLON CHAR CERB_MAGIC CARET_EQ CARET BOOL BANG_EQ AUTO ATOMIC ASM AMPERSAND_EQ AMPERSAND_AMPERSAND AMPERSAND ALIGNAS ] +## typedef_name -> UNAME . TYPE [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC_ASSERT STATIC STAR_EQ STAR SLASH_EQ SLASH SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK RBRACE QUESTION_COLON QUESTION PLUS_PLUS PLUS_EQ PLUS PIPE_PIPE PIPE_EQ PIPE PERCENT_EQ PERCENT NORETURN MINUS_MINUS MINUS_GT MINUS_EQ MINUS LT_LT_EQ LT_LT LT_EQ LT LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE GT_GT_EQ GT_GT GT_EQ GT FLOAT EXTERN EQ_EQ EQ EOF ENUM ELLIPSIS DOUBLE DOT CONST COMPLEX COMMA COLON_COLON COLON CHAR CERB_MAGIC CARET_EQ CARET BOOL BANG_EQ AUTO ATOMIC ASM AMPERSAND_EQ AMPERSAND_AMPERSAND AMPERSAND ALIGNAS ] +## var_name -> UNAME . VARIABLE [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC_ASSERT STATIC STAR_EQ STAR SLASH_EQ SLASH SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK RBRACE QUESTION_COLON QUESTION PLUS_PLUS PLUS_EQ PLUS PIPE_PIPE PIPE_EQ PIPE PERCENT_EQ PERCENT NORETURN MINUS_MINUS MINUS_GT MINUS_EQ MINUS LT_LT_EQ LT_LT LT_EQ LT LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE GT_GT_EQ GT_GT GT_EQ GT FLOAT EXTERN EQ_EQ EQ EOF ENUM ELLIPSIS DOUBLE DOT CONST COMPLEX COMMA COLON_COLON COLON CHAR CERB_MAGIC CARET_EQ CARET BOOL BANG_EQ AUTO ATOMIC ASM AMPERSAND_EQ AMPERSAND_AMPERSAND AMPERSAND ALIGNAS ] ## ## The known suffix of the stack is as follows: ## UNAME @@ -7494,8 +7506,8 @@ translation_unit: BOOL LNAME WHILE ## ## Ends in an error in state: 63. ## -## typedef_name -> LNAME . TYPE [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC_ASSERT STATIC STAR_EQ STAR SLASH_EQ SLASH SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK RBRACE QUESTION_COLON QUESTION PLUS_PLUS PLUS_EQ PLUS PIPE_PIPE PIPE_EQ PIPE PERCENT_EQ PERCENT NORETURN MINUS_MINUS MINUS_GT MINUS_EQ MINUS LT_LT_EQ LT_LT LT_EQ LT LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE GT_GT_EQ GT_GT GT_EQ GT FLOAT EXTERN EQ_EQ EQ ENUM ELLIPSIS DOUBLE DOT CONST COMPLEX COMMA COLON_COLON COLON CHAR CERB_MAGIC CARET_EQ CARET BOOL BANG_EQ AUTO ATOMIC ASM AMPERSAND_EQ AMPERSAND_AMPERSAND AMPERSAND ALIGNAS ] -## var_name -> LNAME . VARIABLE [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC_ASSERT STATIC STAR_EQ STAR SLASH_EQ SLASH SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK RBRACE QUESTION_COLON QUESTION PLUS_PLUS PLUS_EQ PLUS PIPE_PIPE PIPE_EQ PIPE PERCENT_EQ PERCENT NORETURN MINUS_MINUS MINUS_GT MINUS_EQ MINUS LT_LT_EQ LT_LT LT_EQ LT LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE GT_GT_EQ GT_GT GT_EQ GT FLOAT EXTERN EQ_EQ EQ ENUM ELLIPSIS DOUBLE DOT CONST COMPLEX COMMA COLON_COLON COLON CHAR CERB_MAGIC CARET_EQ CARET BOOL BANG_EQ AUTO ATOMIC ASM AMPERSAND_EQ AMPERSAND_AMPERSAND AMPERSAND ALIGNAS ] +## typedef_name -> LNAME . TYPE [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC_ASSERT STATIC STAR_EQ STAR SLASH_EQ SLASH SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK RBRACE QUESTION_COLON QUESTION PLUS_PLUS PLUS_EQ PLUS PIPE_PIPE PIPE_EQ PIPE PERCENT_EQ PERCENT NORETURN MINUS_MINUS MINUS_GT MINUS_EQ MINUS LT_LT_EQ LT_LT LT_EQ LT LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE GT_GT_EQ GT_GT GT_EQ GT FLOAT EXTERN EQ_EQ EQ EOF ENUM ELLIPSIS DOUBLE DOT CONST COMPLEX COMMA COLON_COLON COLON CHAR CERB_MAGIC CARET_EQ CARET BOOL BANG_EQ AUTO ATOMIC ASM AMPERSAND_EQ AMPERSAND_AMPERSAND AMPERSAND ALIGNAS ] +## var_name -> LNAME . VARIABLE [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC_ASSERT STATIC STAR_EQ STAR SLASH_EQ SLASH SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK RBRACE QUESTION_COLON QUESTION PLUS_PLUS PLUS_EQ PLUS PIPE_PIPE PIPE_EQ PIPE PERCENT_EQ PERCENT NORETURN MINUS_MINUS MINUS_GT MINUS_EQ MINUS LT_LT_EQ LT_LT LT_EQ LT LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE GT_GT_EQ GT_GT GT_EQ GT FLOAT EXTERN EQ_EQ EQ EOF ENUM ELLIPSIS DOUBLE DOT CONST COMPLEX COMMA COLON_COLON COLON CHAR CERB_MAGIC CARET_EQ CARET BOOL BANG_EQ AUTO ATOMIC ASM AMPERSAND_EQ AMPERSAND_AMPERSAND AMPERSAND ALIGNAS ] ## ## The known suffix of the stack is as follows: ## LNAME @@ -7638,7 +7650,7 @@ translation_unit: LBRACK_LBRACK ALIGNAS LPAREN STRING_LITERAL RPAREN WHILE ## Ends in an error in state: 139. ## ## attribute_list -> attribute_list . COMMA attribute [ RBRACK COMMA ] -## attribute_specifier -> LBRACK_LBRACK attribute_list . RBRACK RBRACK [ WHILE VOLATILE VOID VA_START VA_END VA_COPY VA_ARG UNSIGNED UNION UNAME TYPEOF TYPEDEF TILDE THREAD_LOCAL SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RETURN RESTRICT REGISTER RBRACE PRINT_TYPE PLUS_PLUS PLUS OFFSETOF NORETURN MINUS_MINUS MINUS LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE IF GT GOTO GENERIC FOR FLOAT EXTERN EQ ENUM DOUBLE DO DEFAULT CONTINUE CONSTANT CONST COMPLEX COMMA COLON CHAR CERB_MAGIC CASE BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BREAK BOOL BMC_ASSUME BANG AUTO ATOMIC ASSERT ASM AMPERSAND ALIGNOF ALIGNAS ] +## attribute_specifier -> LBRACK_LBRACK attribute_list . RBRACK RBRACK [ WHILE VOLATILE VOID VA_START VA_END VA_COPY VA_ARG UNSIGNED UNION UNAME TYPEOF TYPEDEF TILDE THREAD_LOCAL SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RETURN RESTRICT REGISTER RBRACE PRINT_TYPE PLUS_PLUS PLUS OFFSETOF NORETURN MINUS_MINUS MINUS LPAREN LONG LNAME LBRACK_LBRACK LBRACK LBRACES LBRACE INT INLINE IF GT GOTO GENERIC FOR FLOAT EXTERN EQ EOF ENUM DOUBLE DO DEFAULT CONTINUE CONSTANT CONST COMPLEX COMMA COLON CHAR CERB_MAGIC CASE BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BREAK BOOL BMC_ASSUME BANG AUTO ATOMIC ASSERT ASM AMPERSAND ALIGNOF ALIGNAS ] ## ## The known suffix of the stack is as follows: ## LBRACK_LBRACK attribute_list @@ -7663,7 +7675,7 @@ translation_unit: ENUM LBRACE LNAME TYPE EQ STRING_LITERAL RPAREN ## ## Ends in an error in state: 151. ## -## enum_specifier -> ENUM option(general_identifier) LBRACE enumerator_list . option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM option(general_identifier) LBRACE enumerator_list . option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## enumerator_list -> enumerator_list . COMMA enumerator [ RBRACE COMMA ] ## ## The known suffix of the stack is as follows: @@ -7771,7 +7783,7 @@ translation_unit: ATOMIC WHILE ## ## Ends in an error in state: 174. ## -## atomic_type_specifier -> ATOMIC . LPAREN type_name RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## atomic_type_specifier -> ATOMIC . LPAREN type_name RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## type_qualifier -> ATOMIC . [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC SIGNED SHORT RESTRICT REGISTER NORETURN LONG LNAME LBRACK_LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMPLEX CHAR BOOL AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: @@ -7784,8 +7796,8 @@ translation_unit: ALIGNAS WHILE ## ## Ends in an error in state: 176. ## -## alignment_specifier -> ALIGNAS . LPAREN type_name RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] -## alignment_specifier -> ALIGNAS . LPAREN constant_expression RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] +## alignment_specifier -> ALIGNAS . LPAREN type_name RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] +## alignment_specifier -> ALIGNAS . LPAREN constant_expression RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## ALIGNAS @@ -7797,8 +7809,8 @@ translation_unit: ALIGNAS LPAREN WHILE ## ## Ends in an error in state: 177. ## -## alignment_specifier -> ALIGNAS LPAREN . type_name RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] -## alignment_specifier -> ALIGNAS LPAREN . constant_expression RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] +## alignment_specifier -> ALIGNAS LPAREN . type_name RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] +## alignment_specifier -> ALIGNAS LPAREN . constant_expression RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## ALIGNAS LPAREN @@ -7810,8 +7822,8 @@ translation_unit: BOOL WHILE ## ## Ends in an error in state: 186. ## -## attribute_type_specifier_unique -> type_specifier_unique . [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] -## attribute_type_specifier_unique -> type_specifier_unique . attribute_specifier_sequence [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## attribute_type_specifier_unique -> type_specifier_unique . [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## attribute_type_specifier_unique -> type_specifier_unique . attribute_specifier_sequence [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## type_specifier_unique @@ -7823,8 +7835,8 @@ translation_unit: BOOL LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE ## ## Ends in an error in state: 187. ## -## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] -## attribute_type_specifier_unique -> type_specifier_unique attribute_specifier_sequence . [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## attribute_type_specifier_unique -> type_specifier_unique attribute_specifier_sequence . [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## type_specifier_unique attribute_specifier_sequence @@ -7836,8 +7848,8 @@ translation_unit: CHAR WHILE ## ## Ends in an error in state: 190. ## -## attribute_type_specifier_nonunique -> type_specifier_nonunique . [ VOLATILE UNSIGNED UNAME TYPEDEF THREAD_LOCAL STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK INT INLINE GT FLOAT EXTERN DOUBLE CONST COMPLEX COMMA COLON CHAR AUTO ATOMIC ALIGNAS ] -## attribute_type_specifier_nonunique -> type_specifier_nonunique . attribute_specifier_sequence [ VOLATILE UNSIGNED UNAME TYPEDEF THREAD_LOCAL STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK INT INLINE GT FLOAT EXTERN DOUBLE CONST COMPLEX COMMA COLON CHAR AUTO ATOMIC ALIGNAS ] +## attribute_type_specifier_nonunique -> type_specifier_nonunique . [ VOLATILE UNSIGNED UNAME TYPEDEF THREAD_LOCAL STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK INT INLINE GT FLOAT EXTERN EOF DOUBLE CONST COMPLEX COMMA COLON CHAR AUTO ATOMIC ALIGNAS ] +## attribute_type_specifier_nonunique -> type_specifier_nonunique . attribute_specifier_sequence [ VOLATILE UNSIGNED UNAME TYPEDEF THREAD_LOCAL STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK INT INLINE GT FLOAT EXTERN EOF DOUBLE CONST COMPLEX COMMA COLON CHAR AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## type_specifier_nonunique @@ -7849,8 +7861,8 @@ translation_unit: CHAR LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE ## ## Ends in an error in state: 191. ## -## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ VOLATILE UNSIGNED UNAME TYPEDEF THREAD_LOCAL STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN DOUBLE CONST COMPLEX COMMA COLON CHAR AUTO ATOMIC ALIGNAS ] -## attribute_type_specifier_nonunique -> type_specifier_nonunique attribute_specifier_sequence . [ VOLATILE UNSIGNED UNAME TYPEDEF THREAD_LOCAL STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK INT INLINE GT FLOAT EXTERN DOUBLE CONST COMPLEX COMMA COLON CHAR AUTO ATOMIC ALIGNAS ] +## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ VOLATILE UNSIGNED UNAME TYPEDEF THREAD_LOCAL STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN EOF DOUBLE CONST COMPLEX COMMA COLON CHAR AUTO ATOMIC ALIGNAS ] +## attribute_type_specifier_nonunique -> type_specifier_nonunique attribute_specifier_sequence . [ VOLATILE UNSIGNED UNAME TYPEDEF THREAD_LOCAL STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK INT INLINE GT FLOAT EXTERN EOF DOUBLE CONST COMPLEX COMMA COLON CHAR AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## type_specifier_nonunique attribute_specifier_sequence @@ -7858,12 +7870,12 @@ translation_unit: CHAR LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE -translation_unit: ALIGNAS LPAREN ATOMIC TYPEDEF +type_name_eof: ATOMIC TYPEDEF ## ## Ends in an error in state: 192. ## -## attribute_type_qualifier -> type_qualifier . [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] -## attribute_type_qualifier -> type_qualifier . attribute_specifier_sequence [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] +## attribute_type_qualifier -> type_qualifier . [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] +## attribute_type_qualifier -> type_qualifier . attribute_specifier_sequence [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## type_qualifier @@ -7877,12 +7889,12 @@ translation_unit: ALIGNAS LPAREN ATOMIC TYPEDEF -translation_unit: ALIGNAS LPAREN ATOMIC LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE +type_name_eof: ATOMIC LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE ## ## Ends in an error in state: 193. ## -## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT GT FLOAT ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] -## attribute_type_qualifier -> type_qualifier attribute_specifier_sequence . [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] +## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT GT FLOAT EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] +## attribute_type_qualifier -> type_qualifier attribute_specifier_sequence . [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## type_qualifier attribute_specifier_sequence @@ -7940,9 +7952,9 @@ translation_unit: STRUCT WHILE ## ## Ends in an error in state: 199. ## -## struct_or_union_specifier -> struct_or_union . option(attribute_specifier_sequence) option(general_identifier) LBRACE boption(nonempty_list(SEMICOLON)) struct_declaration_list RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] -## struct_or_union_specifier -> struct_or_union . option(attribute_specifier_sequence) general_identifier [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] -## struct_or_union_specifier -> struct_or_union . option(attribute_specifier_sequence) option(general_identifier) LBRACE RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## struct_or_union_specifier -> struct_or_union . option(attribute_specifier_sequence) option(general_identifier) LBRACE boption(nonempty_list(SEMICOLON)) struct_declaration_list RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## struct_or_union_specifier -> struct_or_union . option(attribute_specifier_sequence) general_identifier [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## struct_or_union_specifier -> struct_or_union . option(attribute_specifier_sequence) option(general_identifier) LBRACE RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## struct_or_union @@ -7954,8 +7966,8 @@ translation_unit: STRUCT LBRACE WHILE ## ## Ends in an error in state: 202. ## -## struct_or_union_specifier -> struct_or_union option(attribute_specifier_sequence) option(general_identifier) LBRACE . boption(nonempty_list(SEMICOLON)) struct_declaration_list RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] -## struct_or_union_specifier -> struct_or_union option(attribute_specifier_sequence) option(general_identifier) LBRACE . RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## struct_or_union_specifier -> struct_or_union option(attribute_specifier_sequence) option(general_identifier) LBRACE . boption(nonempty_list(SEMICOLON)) struct_declaration_list RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## struct_or_union_specifier -> struct_or_union option(attribute_specifier_sequence) option(general_identifier) LBRACE . RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## struct_or_union option(attribute_specifier_sequence) option(general_identifier) LBRACE @@ -7980,7 +7992,7 @@ translation_unit: STRUCT LBRACE SEMICOLON RBRACE ## ## Ends in an error in state: 207. ## -## struct_or_union_specifier -> struct_or_union option(attribute_specifier_sequence) option(general_identifier) LBRACE boption(nonempty_list(SEMICOLON)) . struct_declaration_list RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## struct_or_union_specifier -> struct_or_union option(attribute_specifier_sequence) option(general_identifier) LBRACE boption(nonempty_list(SEMICOLON)) . struct_declaration_list RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## struct_or_union option(attribute_specifier_sequence) option(general_identifier) LBRACE boption(nonempty_list(SEMICOLON)) @@ -8018,11 +8030,11 @@ translation_unit: ALIGNAS LPAREN ALIGNOF LPAREN BOOL GT -translation_unit: ALIGNAS LPAREN BOOL SEMICOLON +type_name_eof: BOOL SEMICOLON ## ## Ends in an error in state: 222. ## -## type_name -> specifier_qualifier_list . option(abstract_declarator) [ RPAREN GT COMMA COLON ] +## type_name -> specifier_qualifier_list . option(abstract_declarator) [ RPAREN GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## specifier_qualifier_list @@ -8043,8 +8055,8 @@ translation_unit: BOOL STAR WHILE ## ## Ends in an error in state: 223. ## -## pointer -> STAR . option(type_qualifier_list) option(pointer) [ UNAME RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] -## pointer -> STAR . attribute_specifier_sequence option(type_qualifier_list) option(pointer) [ UNAME RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## pointer -> STAR . option(type_qualifier_list) option(pointer) [ UNAME RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] +## pointer -> STAR . attribute_specifier_sequence option(type_qualifier_list) option(pointer) [ UNAME RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## STAR @@ -8056,8 +8068,8 @@ translation_unit: BOOL STAR ATOMIC WHILE ## ## Ends in an error in state: 225. ## -## option(type_qualifier_list) -> type_qualifier_list . [ VA_START VA_END VA_COPY VA_ARG UNAME TILDE STRING_LITERAL STAR SIZEOF RPAREN PRINT_TYPE PLUS_PLUS PLUS OFFSETOF MINUS_MINUS MINUS LPAREN LNAME LBRACK GT GENERIC CONSTANT COMMA COLON BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BMC_ASSUME BANG ASSERT AMPERSAND ALIGNOF ] -## type_qualifier_list -> type_qualifier_list . type_qualifier [ VOLATILE VA_START VA_END VA_COPY VA_ARG UNAME TILDE STRING_LITERAL STAR SIZEOF RPAREN RESTRICT PRINT_TYPE PLUS_PLUS PLUS OFFSETOF MINUS_MINUS MINUS LPAREN LNAME LBRACK GT GENERIC CONSTANT CONST COMMA COLON BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BMC_ASSUME BANG ATOMIC ASSERT AMPERSAND ALIGNOF ] +## option(type_qualifier_list) -> type_qualifier_list . [ VA_START VA_END VA_COPY VA_ARG UNAME TILDE STRING_LITERAL STAR SIZEOF RPAREN PRINT_TYPE PLUS_PLUS PLUS OFFSETOF MINUS_MINUS MINUS LPAREN LNAME LBRACK GT GENERIC EOF CONSTANT COMMA COLON BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BMC_ASSUME BANG ASSERT AMPERSAND ALIGNOF ] +## type_qualifier_list -> type_qualifier_list . type_qualifier [ VOLATILE VA_START VA_END VA_COPY VA_ARG UNAME TILDE STRING_LITERAL STAR SIZEOF RPAREN RESTRICT PRINT_TYPE PLUS_PLUS PLUS OFFSETOF MINUS_MINUS MINUS LPAREN LNAME LBRACK GT GENERIC EOF CONSTANT CONST COMMA COLON BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BMC_ASSUME BANG ATOMIC ASSERT AMPERSAND ALIGNOF ] ## ## The known suffix of the stack is as follows: ## type_qualifier_list @@ -8069,7 +8081,7 @@ translation_unit: BOOL STAR ATOMIC VA_START ## ## Ends in an error in state: 228. ## -## pointer -> STAR option(type_qualifier_list) . option(pointer) [ UNAME RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## pointer -> STAR option(type_qualifier_list) . option(pointer) [ UNAME RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## STAR option(type_qualifier_list) @@ -8087,8 +8099,8 @@ translation_unit: BOOL STAR LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE ## ## Ends in an error in state: 231. ## -## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ VOLATILE UNAME STAR RPAREN RESTRICT LPAREN LNAME LBRACK_LBRACK LBRACK GT CONST COMMA COLON ATOMIC ] -## pointer -> STAR attribute_specifier_sequence . option(type_qualifier_list) option(pointer) [ UNAME RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ VOLATILE UNAME STAR RPAREN RESTRICT LPAREN LNAME LBRACK_LBRACK LBRACK GT EOF CONST COMMA COLON ATOMIC ] +## pointer -> STAR attribute_specifier_sequence . option(type_qualifier_list) option(pointer) [ UNAME RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## STAR attribute_specifier_sequence @@ -8100,7 +8112,7 @@ translation_unit: BOOL STAR LBRACK_LBRACK ALIGNAS RBRACK RBRACK ATOMIC VA_START ## ## Ends in an error in state: 232. ## -## pointer -> STAR attribute_specifier_sequence option(type_qualifier_list) . option(pointer) [ UNAME RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## pointer -> STAR attribute_specifier_sequence option(type_qualifier_list) . option(pointer) [ UNAME RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## STAR attribute_specifier_sequence option(type_qualifier_list) @@ -8114,12 +8126,12 @@ translation_unit: BOOL STAR LBRACK_LBRACK ALIGNAS RBRACK RBRACK ATOMIC VA_START -translation_unit: ALIGNAS LPAREN BOOL LPAREN WHILE +type_name_eof: BOOL LPAREN WHILE ## ## Ends in an error in state: 234. ## -## direct_abstract_declarator -> LPAREN . save_context abstract_declarator RPAREN [ RPAREN LPAREN LBRACK GT COMMA COLON ] -## function_abstract_declarator -> LPAREN . option(scoped(parameter_type_list)) RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## direct_abstract_declarator -> LPAREN . save_context abstract_declarator RPAREN [ RPAREN LPAREN LBRACK GT EOF COMMA COLON ] +## function_abstract_declarator -> LPAREN . option(scoped(parameter_type_list)) RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## LPAREN @@ -8127,15 +8139,15 @@ translation_unit: ALIGNAS LPAREN BOOL LPAREN WHILE -translation_unit: ALIGNAS LPAREN BOOL LBRACK WHILE +type_name_eof: BOOL LBRACK WHILE ## ## Ends in an error in state: 237. ## -## array_abstract_declarator -> LBRACK . option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> LBRACK . type_qualifier_list option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> LBRACK . STATIC option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> LBRACK . type_qualifier_list STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> LBRACK . STAR RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> LBRACK . option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> LBRACK . type_qualifier_list option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> LBRACK . STATIC option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> LBRACK . type_qualifier_list STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> LBRACK . STAR RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## LBRACK @@ -8143,11 +8155,11 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK WHILE -translation_unit: ALIGNAS LPAREN BOOL LBRACK STATIC ATOMIC RPAREN +type_name_eof: BOOL LBRACK STATIC ATOMIC RPAREN ## ## Ends in an error in state: 239. ## -## array_abstract_declarator -> LBRACK STATIC option(type_qualifier_list) . assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> LBRACK STATIC option(type_qualifier_list) . assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## LBRACK STATIC option(type_qualifier_list) @@ -8394,11 +8406,11 @@ translation_unit: ALIGNAS LPAREN STRING_LITERAL LBRACK STRING_LITERAL RPAREN -translation_unit: ALIGNAS LPAREN BOOL LBRACK STATIC STRING_LITERAL RPAREN +type_name_eof: BOOL LBRACK STATIC STRING_LITERAL RPAREN ## ## Ends in an error in state: 335. ## -## array_abstract_declarator -> LBRACK STATIC option(type_qualifier_list) assignment_expression . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> LBRACK STATIC option(type_qualifier_list) assignment_expression . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## LBRACK STATIC option(type_qualifier_list) assignment_expression @@ -8429,11 +8441,11 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK STATIC STRING_LITERAL RPAREN -translation_unit: ALIGNAS LPAREN BOOL LBRACK STAR WHILE +type_name_eof: BOOL LBRACK STAR WHILE ## ## Ends in an error in state: 337. ## -## array_abstract_declarator -> LBRACK STAR . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> LBRACK STAR . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## unary_operator -> STAR . [ VA_START VA_END VA_COPY VA_ARG UNAME TILDE STRING_LITERAL STAR SIZEOF PRINT_TYPE PLUS_PLUS PLUS OFFSETOF MINUS_MINUS MINUS LPAREN LNAME GENERIC CONSTANT BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BMC_ASSUME BANG ASSERT AMPERSAND ALIGNOF ] ## ## The known suffix of the stack is as follows: @@ -8442,12 +8454,12 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK STAR WHILE -translation_unit: ALIGNAS LPAREN BOOL LBRACK ATOMIC WHILE +type_name_eof: BOOL LBRACK ATOMIC WHILE ## ## Ends in an error in state: 339. ## -## array_abstract_declarator -> LBRACK type_qualifier_list . option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> LBRACK type_qualifier_list . STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> LBRACK type_qualifier_list . option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> LBRACK type_qualifier_list . STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## type_qualifier_list -> type_qualifier_list . type_qualifier [ VOLATILE VA_START VA_END VA_COPY VA_ARG UNAME TILDE STRING_LITERAL STATIC STAR SIZEOF RESTRICT RBRACK PRINT_TYPE PLUS_PLUS PLUS OFFSETOF MINUS_MINUS MINUS LPAREN LNAME GENERIC CONSTANT CONST BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BMC_ASSUME BANG ATOMIC ASSERT AMPERSAND ALIGNOF ] ## ## The known suffix of the stack is as follows: @@ -8456,11 +8468,11 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK ATOMIC WHILE -translation_unit: ALIGNAS LPAREN BOOL LBRACK ATOMIC STATIC STRING_LITERAL RPAREN +type_name_eof: BOOL LBRACK ATOMIC STATIC STRING_LITERAL RPAREN ## ## Ends in an error in state: 341. ## -## array_abstract_declarator -> LBRACK type_qualifier_list STATIC assignment_expression . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> LBRACK type_qualifier_list STATIC assignment_expression . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## LBRACK type_qualifier_list STATIC assignment_expression @@ -8491,11 +8503,11 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK ATOMIC STATIC STRING_LITERAL RPAREN -translation_unit: ALIGNAS LPAREN BOOL LBRACK ATOMIC STRING_LITERAL RPAREN +type_name_eof: BOOL LBRACK ATOMIC STRING_LITERAL RPAREN ## ## Ends in an error in state: 343. ## -## array_abstract_declarator -> LBRACK type_qualifier_list option(assignment_expression) . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> LBRACK type_qualifier_list option(assignment_expression) . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## LBRACK type_qualifier_list option(assignment_expression) @@ -8527,11 +8539,11 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK ATOMIC STRING_LITERAL RPAREN -translation_unit: ALIGNAS LPAREN BOOL LBRACK STRING_LITERAL RPAREN +type_name_eof: BOOL LBRACK STRING_LITERAL RPAREN ## ## Ends in an error in state: 346. ## -## array_abstract_declarator -> LBRACK option(assignment_expression) . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> LBRACK option(assignment_expression) . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## LBRACK option(assignment_expression) @@ -8615,12 +8627,12 @@ translation_unit: AUTO LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE -translation_unit: ALIGNAS LPAREN BOOL STAR UNAME +type_name_eof: BOOL STAR UNAME ## ## Ends in an error in state: 352. ## -## abstract_declarator -> pointer . [ RPAREN GT COMMA COLON ] -## abstract_declarator -> pointer . direct_abstract_declarator [ RPAREN GT COMMA COLON ] +## abstract_declarator -> pointer . [ RPAREN GT EOF COMMA COLON ] +## abstract_declarator -> pointer . direct_abstract_declarator [ RPAREN GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## pointer @@ -8636,12 +8648,12 @@ translation_unit: ALIGNAS LPAREN BOOL STAR UNAME -translation_unit: ALIGNAS LPAREN BOOL LPAREN RPAREN WHILE +type_name_eof: BOOL LPAREN RPAREN WHILE ## ## Ends in an error in state: 353. ## -## direct_abstract_declarator -> function_abstract_declarator . [ RPAREN LPAREN LBRACK GT COMMA COLON ] -## direct_abstract_declarator -> function_abstract_declarator . attribute_specifier_sequence [ RPAREN LPAREN LBRACK GT COMMA COLON ] +## direct_abstract_declarator -> function_abstract_declarator . [ RPAREN LPAREN LBRACK GT EOF COMMA COLON ] +## direct_abstract_declarator -> function_abstract_declarator . attribute_specifier_sequence [ RPAREN LPAREN LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## function_abstract_declarator @@ -8649,12 +8661,12 @@ translation_unit: ALIGNAS LPAREN BOOL LPAREN RPAREN WHILE -translation_unit: ALIGNAS LPAREN BOOL LPAREN RPAREN LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE +type_name_eof: BOOL LPAREN RPAREN LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE ## ## Ends in an error in state: 354. ## -## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## direct_abstract_declarator -> function_abstract_declarator attribute_specifier_sequence . [ RPAREN LPAREN LBRACK GT COMMA COLON ] +## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## direct_abstract_declarator -> function_abstract_declarator attribute_specifier_sequence . [ RPAREN LPAREN LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## function_abstract_declarator attribute_specifier_sequence @@ -8662,17 +8674,17 @@ translation_unit: ALIGNAS LPAREN BOOL LPAREN RPAREN LBRACK_LBRACK ALIGNAS RBRACK -translation_unit: ALIGNAS LPAREN BOOL STAR LPAREN STAR RPAREN WHILE +type_name_eof: BOOL STAR LPAREN STAR RPAREN WHILE ## ## Ends in an error in state: 355. ## -## abstract_declarator -> pointer direct_abstract_declarator . [ RPAREN GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator . LBRACK option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator . LBRACK type_qualifier_list option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator . LBRACK STATIC option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator . LBRACK type_qualifier_list STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator . LBRACK STAR RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## function_abstract_declarator -> direct_abstract_declarator . LPAREN option(scoped(parameter_type_list)) RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## abstract_declarator -> pointer direct_abstract_declarator . [ RPAREN GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator . LBRACK option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator . LBRACK type_qualifier_list option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator . LBRACK STATIC option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator . LBRACK type_qualifier_list STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator . LBRACK STAR RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## function_abstract_declarator -> direct_abstract_declarator . LPAREN option(scoped(parameter_type_list)) RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## pointer direct_abstract_declarator @@ -8680,7 +8692,7 @@ translation_unit: ALIGNAS LPAREN BOOL STAR LPAREN STAR RPAREN WHILE -translation_unit: BOOL LNAME TYPE LPAREN BOOL LNAME TYPE VOLATILE +type_name_eof: BOOL LPAREN BOOL LNAME TYPE VOLATILE ## ## Ends in an error in state: 359. ## @@ -8704,7 +8716,7 @@ translation_unit: BOOL LNAME TYPE LPAREN BOOL LNAME TYPE VOLATILE -translation_unit: BOOL LNAME TYPE LPAREN BOOL COMMA WHILE +type_name_eof: BOOL LPAREN BOOL COMMA WHILE ## ## Ends in an error in state: 360. ## @@ -8743,7 +8755,7 @@ translation_unit: INLINE LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE -translation_unit: BOOL LNAME TYPE LPAREN BOOL SEMICOLON +type_name_eof: BOOL LPAREN BOOL SEMICOLON ## ## Ends in an error in state: 369. ## @@ -8766,7 +8778,7 @@ translation_unit: BOOL LNAME TYPE LPAREN BOOL SEMICOLON -translation_unit: BOOL LNAME TYPE LPAREN BOOL LPAREN WHILE +type_name_eof: BOOL LPAREN BOOL LPAREN WHILE ## ## Ends in an error in state: 370. ## @@ -8793,7 +8805,7 @@ translation_unit: ALIGNAS LPAREN LPAREN LBRACE LNAME TYPE WHILE -translation_unit: BOOL LNAME TYPE LPAREN BOOL STAR GT +type_name_eof: BOOL LPAREN BOOL STAR GT ## ## Ends in an error in state: 373. ## @@ -9032,7 +9044,7 @@ translation_unit: CHAR TYPEDEF INLINE VOID -translation_unit: BOOL LNAME TYPE LPAREN LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE +type_name_eof: BOOL LPAREN LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE ## ## Ends in an error in state: 404. ## @@ -9047,7 +9059,7 @@ translation_unit: BOOL LNAME TYPE LPAREN LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHI -translation_unit: BOOL LNAME TYPE LPAREN LBRACK_LBRACK ALIGNAS RBRACK RBRACK BOOL SEMICOLON +type_name_eof: BOOL LPAREN LBRACK_LBRACK ALIGNAS RBRACK RBRACK BOOL SEMICOLON ## ## Ends in an error in state: 405. ## @@ -9255,17 +9267,17 @@ translation_unit: BOOL LNAME TYPE LBRACK STRING_LITERAL RPAREN -translation_unit: ALIGNAS LPAREN BOOL LPAREN STAR RPAREN WHILE +type_name_eof: BOOL LPAREN STAR RPAREN WHILE ## ## Ends in an error in state: 421. ## -## abstract_declarator -> direct_abstract_declarator . [ RPAREN GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator . LBRACK option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator . LBRACK type_qualifier_list option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator . LBRACK STATIC option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator . LBRACK type_qualifier_list STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator . LBRACK STAR RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## function_abstract_declarator -> direct_abstract_declarator . LPAREN option(scoped(parameter_type_list)) RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## abstract_declarator -> direct_abstract_declarator . [ RPAREN GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator . LBRACK option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator . LBRACK type_qualifier_list option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator . LBRACK STATIC option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator . LBRACK type_qualifier_list STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator . LBRACK STAR RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## function_abstract_declarator -> direct_abstract_declarator . LPAREN option(scoped(parameter_type_list)) RPAREN [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## direct_abstract_declarator @@ -9273,15 +9285,15 @@ translation_unit: ALIGNAS LPAREN BOOL LPAREN STAR RPAREN WHILE -translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK WHILE +type_name_eof: BOOL LBRACK RBRACK LBRACK WHILE ## ## Ends in an error in state: 422. ## -## array_abstract_declarator -> direct_abstract_declarator LBRACK . option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator LBRACK . type_qualifier_list option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator LBRACK . STATIC option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator LBRACK . type_qualifier_list STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator LBRACK . STAR RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK . option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK . type_qualifier_list option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK . STATIC option(type_qualifier_list) assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK . type_qualifier_list STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK . STAR RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## direct_abstract_declarator LBRACK @@ -9289,11 +9301,11 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK WHILE -translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK STATIC ATOMIC RPAREN +type_name_eof: BOOL LBRACK RBRACK LBRACK STATIC ATOMIC RPAREN ## ## Ends in an error in state: 424. ## -## array_abstract_declarator -> direct_abstract_declarator LBRACK STATIC option(type_qualifier_list) . assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK STATIC option(type_qualifier_list) . assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## direct_abstract_declarator LBRACK STATIC option(type_qualifier_list) @@ -9307,11 +9319,11 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK STATIC ATOMIC RPAREN -translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK STATIC STRING_LITERAL RPAREN +type_name_eof: BOOL LBRACK RBRACK LBRACK STATIC STRING_LITERAL RPAREN ## ## Ends in an error in state: 425. ## -## array_abstract_declarator -> direct_abstract_declarator LBRACK STATIC option(type_qualifier_list) assignment_expression . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK STATIC option(type_qualifier_list) assignment_expression . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## direct_abstract_declarator LBRACK STATIC option(type_qualifier_list) assignment_expression @@ -9342,11 +9354,11 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK STATIC STRING_LITERAL -translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK STAR WHILE +type_name_eof: BOOL LBRACK RBRACK LBRACK STAR WHILE ## ## Ends in an error in state: 427. ## -## array_abstract_declarator -> direct_abstract_declarator LBRACK STAR . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK STAR . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## unary_operator -> STAR . [ VA_START VA_END VA_COPY VA_ARG UNAME TILDE STRING_LITERAL STAR SIZEOF PRINT_TYPE PLUS_PLUS PLUS OFFSETOF MINUS_MINUS MINUS LPAREN LNAME GENERIC CONSTANT BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BMC_ASSUME BANG ASSERT AMPERSAND ALIGNOF ] ## ## The known suffix of the stack is as follows: @@ -9355,12 +9367,12 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK STAR WHILE -translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK ATOMIC WHILE +type_name_eof: BOOL LBRACK RBRACK LBRACK ATOMIC WHILE ## ## Ends in an error in state: 429. ## -## array_abstract_declarator -> direct_abstract_declarator LBRACK type_qualifier_list . option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## array_abstract_declarator -> direct_abstract_declarator LBRACK type_qualifier_list . STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK type_qualifier_list . option(assignment_expression) RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK type_qualifier_list . STATIC assignment_expression RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## type_qualifier_list -> type_qualifier_list . type_qualifier [ VOLATILE VA_START VA_END VA_COPY VA_ARG UNAME TILDE STRING_LITERAL STATIC STAR SIZEOF RESTRICT RBRACK PRINT_TYPE PLUS_PLUS PLUS OFFSETOF MINUS_MINUS MINUS LPAREN LNAME GENERIC CONSTANT CONST BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BMC_ASSUME BANG ATOMIC ASSERT AMPERSAND ALIGNOF ] ## ## The known suffix of the stack is as follows: @@ -9369,11 +9381,11 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK ATOMIC WHILE -translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK ATOMIC STATIC STRING_LITERAL RPAREN +type_name_eof: BOOL LBRACK RBRACK LBRACK ATOMIC STATIC STRING_LITERAL RPAREN ## ## Ends in an error in state: 431. ## -## array_abstract_declarator -> direct_abstract_declarator LBRACK type_qualifier_list STATIC assignment_expression . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK type_qualifier_list STATIC assignment_expression . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## direct_abstract_declarator LBRACK type_qualifier_list STATIC assignment_expression @@ -9404,11 +9416,11 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK ATOMIC STATIC STRING_ -translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK ATOMIC STRING_LITERAL RPAREN +type_name_eof: BOOL LBRACK RBRACK LBRACK ATOMIC STRING_LITERAL RPAREN ## ## Ends in an error in state: 433. ## -## array_abstract_declarator -> direct_abstract_declarator LBRACK type_qualifier_list option(assignment_expression) . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK type_qualifier_list option(assignment_expression) . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## direct_abstract_declarator LBRACK type_qualifier_list option(assignment_expression) @@ -9440,11 +9452,11 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK ATOMIC STRING_LITERAL -translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK STRING_LITERAL RPAREN +type_name_eof: BOOL LBRACK RBRACK LBRACK STRING_LITERAL RPAREN ## ## Ends in an error in state: 435. ## -## array_abstract_declarator -> direct_abstract_declarator LBRACK option(assignment_expression) . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] +## array_abstract_declarator -> direct_abstract_declarator LBRACK option(assignment_expression) . RBRACK [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## direct_abstract_declarator LBRACK option(assignment_expression) @@ -9502,12 +9514,12 @@ translation_unit: BOOL LNAME TYPE LBRACK RBRACK LBRACK_LBRACK ALIGNAS RBRACK RBR -translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK WHILE +type_name_eof: BOOL LBRACK RBRACK WHILE ## ## Ends in an error in state: 441. ## -## direct_abstract_declarator -> array_abstract_declarator . [ RPAREN LPAREN LBRACK GT COMMA COLON ] -## direct_abstract_declarator -> array_abstract_declarator . attribute_specifier_sequence [ RPAREN LPAREN LBRACK GT COMMA COLON ] +## direct_abstract_declarator -> array_abstract_declarator . [ RPAREN LPAREN LBRACK GT EOF COMMA COLON ] +## direct_abstract_declarator -> array_abstract_declarator . attribute_specifier_sequence [ RPAREN LPAREN LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## array_abstract_declarator @@ -9515,12 +9527,12 @@ translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK WHILE -translation_unit: ALIGNAS LPAREN BOOL LBRACK RBRACK LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE +type_name_eof: BOOL LBRACK RBRACK LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE ## ## Ends in an error in state: 442. ## -## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT COMMA COLON ] -## direct_abstract_declarator -> array_abstract_declarator attribute_specifier_sequence . [ RPAREN LPAREN LBRACK GT COMMA COLON ] +## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ RPAREN LPAREN LBRACK_LBRACK LBRACK GT EOF COMMA COLON ] +## direct_abstract_declarator -> array_abstract_declarator attribute_specifier_sequence . [ RPAREN LPAREN LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## array_abstract_declarator attribute_specifier_sequence @@ -9547,11 +9559,11 @@ translation_unit: BOOL LPAREN LNAME TYPE VOLATILE -translation_unit: ALIGNAS LPAREN BOOL LPAREN STAR COMMA +type_name_eof: BOOL LPAREN STAR COMMA ## ## Ends in an error in state: 446. ## -## direct_abstract_declarator -> LPAREN save_context abstract_declarator . RPAREN [ RPAREN LPAREN LBRACK GT COMMA COLON ] +## direct_abstract_declarator -> LPAREN save_context abstract_declarator . RPAREN [ RPAREN LPAREN LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## LPAREN save_context abstract_declarator @@ -9568,11 +9580,11 @@ translation_unit: ALIGNAS LPAREN BOOL LPAREN STAR COMMA -translation_unit: ALIGNAS LPAREN BOOL TYPEDEF +type_name_eof: BOOL TYPEDEF ## ## Ends in an error in state: 459. ## -## list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_specifier_unique . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_specifier_unique . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## attribute_type_specifier_unique @@ -9586,11 +9598,11 @@ translation_unit: ALIGNAS LPAREN BOOL TYPEDEF -translation_unit: ALIGNAS LPAREN BOOL ATOMIC VOID +type_name_eof: BOOL ATOMIC VOID ## ## Ends in an error in state: 461. ## -## list_pair(attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_qualifier . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## list_pair(attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_qualifier . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## attribute_type_qualifier @@ -9604,11 +9616,11 @@ translation_unit: ALIGNAS LPAREN BOOL ATOMIC VOID -translation_unit: ALIGNAS LPAREN BOOL ALIGNAS LPAREN STRING_LITERAL RPAREN VOID +type_name_eof: BOOL ALIGNAS LPAREN STRING_LITERAL RPAREN VOID ## ## Ends in an error in state: 463. ## -## list_pair(attribute_type_qualifier,attribute_alignment_specifier) -> attribute_alignment_specifier . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## list_pair(attribute_type_qualifier,attribute_alignment_specifier) -> attribute_alignment_specifier . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## attribute_alignment_specifier @@ -9622,12 +9634,12 @@ translation_unit: ALIGNAS LPAREN BOOL ALIGNAS LPAREN STRING_LITERAL RPAREN VOID -translation_unit: ALIGNAS LPAREN ALIGNAS LPAREN STRING_LITERAL RPAREN WHILE +type_name_eof: ALIGNAS LPAREN STRING_LITERAL RPAREN WHILE ## ## Ends in an error in state: 465. ## -## attribute_alignment_specifier -> alignment_specifier . [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] -## attribute_alignment_specifier -> alignment_specifier . attribute_specifier_sequence [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] +## attribute_alignment_specifier -> alignment_specifier . [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] +## attribute_alignment_specifier -> alignment_specifier . attribute_specifier_sequence [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## alignment_specifier @@ -9635,12 +9647,12 @@ translation_unit: ALIGNAS LPAREN ALIGNAS LPAREN STRING_LITERAL RPAREN WHILE -translation_unit: ALIGNAS LPAREN ALIGNAS LPAREN STRING_LITERAL RPAREN LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE +type_name_eof: ALIGNAS LPAREN STRING_LITERAL RPAREN LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE ## ## Ends in an error in state: 466. ## -## attribute_alignment_specifier -> alignment_specifier attribute_specifier_sequence . [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] -## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT GT FLOAT ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] +## attribute_alignment_specifier -> alignment_specifier attribute_specifier_sequence . [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK INT GT FLOAT EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] +## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT GT FLOAT EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## alignment_specifier attribute_specifier_sequence @@ -9648,12 +9660,12 @@ translation_unit: ALIGNAS LPAREN ALIGNAS LPAREN STRING_LITERAL RPAREN LBRACK_LBR -translation_unit: ALIGNAS LPAREN CHAR TYPEDEF +type_name_eof: CHAR TYPEDEF ## ## Ends in an error in state: 467. ## -## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_specifier_nonunique . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] -## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_specifier_nonunique . list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_specifier_nonunique . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] +## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_specifier_nonunique . list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## attribute_type_specifier_nonunique @@ -9667,12 +9679,12 @@ translation_unit: ALIGNAS LPAREN CHAR TYPEDEF -translation_unit: ALIGNAS LPAREN CHAR ATOMIC VOID +type_name_eof: CHAR ATOMIC VOID ## ## Ends in an error in state: 470. ## -## list_pair(attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_qualifier . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] -## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_qualifier . list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## list_pair(attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_qualifier . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] +## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_qualifier . list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## attribute_type_qualifier @@ -9686,12 +9698,12 @@ translation_unit: ALIGNAS LPAREN CHAR ATOMIC VOID -translation_unit: ALIGNAS LPAREN CHAR ALIGNAS LPAREN STRING_LITERAL RPAREN VOID +type_name_eof: CHAR ALIGNAS LPAREN STRING_LITERAL RPAREN VOID ## ## Ends in an error in state: 472. ## -## list_pair(attribute_type_qualifier,attribute_alignment_specifier) -> attribute_alignment_specifier . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] -## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_alignment_specifier . list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## list_pair(attribute_type_qualifier,attribute_alignment_specifier) -> attribute_alignment_specifier . list_pair(attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] +## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_alignment_specifier . list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## attribute_alignment_specifier @@ -9705,12 +9717,12 @@ translation_unit: ALIGNAS LPAREN CHAR ALIGNAS LPAREN STRING_LITERAL RPAREN VOID -translation_unit: ALIGNAS LPAREN CONST STAR +type_name_eof: CONST STAR ## ## Ends in an error in state: 474. ## -## list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_qualifier . list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] -## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_qualifier . list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_qualifier . list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] +## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_qualifier . list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## attribute_type_qualifier @@ -9724,12 +9736,12 @@ translation_unit: ALIGNAS LPAREN CONST STAR -translation_unit: ALIGNAS LPAREN ALIGNAS LPAREN STRING_LITERAL RPAREN STAR +type_name_eof: ALIGNAS LPAREN STRING_LITERAL RPAREN STAR ## ## Ends in an error in state: 476. ## -## list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_alignment_specifier . list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] -## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_alignment_specifier . list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT COMMA COLON ] +## list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_alignment_specifier . list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] +## list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_alignment_specifier . list_tuple3_ge1(attribute_type_specifier_nonunique,attribute_type_qualifier,attribute_alignment_specifier) [ UNAME STAR SEMICOLON RPAREN LPAREN LNAME LBRACK GT EOF COMMA COLON ] ## ## The known suffix of the stack is as follows: ## attribute_alignment_specifier @@ -9977,7 +9989,7 @@ translation_unit: STRUCT LBRACE STATIC_ASSERT LPAREN STRING_LITERAL COMMA STRING ## Ends in an error in state: 494. ## ## struct_declaration_list -> struct_declaration_list . struct_declaration [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF STRUCT STATIC_ASSERT SIGNED SHORT RESTRICT RBRACE LONG LNAME LBRACK_LBRACK INT FLOAT ENUM DOUBLE CONST COMPLEX CHAR BOOL ATOMIC ALIGNAS ] -## struct_or_union_specifier -> struct_or_union option(attribute_specifier_sequence) option(general_identifier) LBRACE boption(nonempty_list(SEMICOLON)) struct_declaration_list . RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## struct_or_union_specifier -> struct_or_union option(attribute_specifier_sequence) option(general_identifier) LBRACE boption(nonempty_list(SEMICOLON)) struct_declaration_list . RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## struct_or_union option(attribute_specifier_sequence) option(general_identifier) LBRACE boption(nonempty_list(SEMICOLON)) struct_declaration_list @@ -10123,7 +10135,7 @@ translation_unit: STRUCT LNAME TYPE WHILE ## Ends in an error in state: 519. ## ## option(general_identifier) -> general_identifier . [ LBRACE ] -## struct_or_union_specifier -> struct_or_union option(attribute_specifier_sequence) general_identifier . [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## struct_or_union_specifier -> struct_or_union option(attribute_specifier_sequence) general_identifier . [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## struct_or_union option(attribute_specifier_sequence) general_identifier @@ -10244,7 +10256,7 @@ translation_unit: ALIGNAS LPAREN BOOL GT ## ## Ends in an error in state: 534. ## -## alignment_specifier -> ALIGNAS LPAREN type_name . RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] +## alignment_specifier -> ALIGNAS LPAREN type_name . RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## ALIGNAS LPAREN type_name @@ -10267,7 +10279,7 @@ translation_unit: ALIGNAS LPAREN STRING_LITERAL RBRACK ## ## Ends in an error in state: 536. ## -## alignment_specifier -> ALIGNAS LPAREN constant_expression . RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] +## alignment_specifier -> ALIGNAS LPAREN constant_expression . RPAREN [ VOLATILE VOID UNSIGNED UNION UNAME TYPEOF TYPEDEF THREAD_LOCAL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LONG LNAME LBRACK_LBRACK LBRACK INT INLINE GT FLOAT EXTERN EOF ENUM DOUBLE CONST COMPLEX COMMA COLON CHAR BOOL AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## ALIGNAS LPAREN constant_expression @@ -10302,7 +10314,7 @@ translation_unit: ATOMIC LPAREN BOOL GT ## ## Ends in an error in state: 538. ## -## atomic_type_specifier -> ATOMIC LPAREN type_name . RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## atomic_type_specifier -> ATOMIC LPAREN type_name . RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## ATOMIC LPAREN type_name @@ -10892,18 +10904,6 @@ translation_unit: ALIGNAS LPAREN LPAREN LBRACE WHILE LPAREN STRING_LITERAL RPARE -translation_unit: ALIGNAS LPAREN LPAREN LBRACE IF LPAREN STRING_LITERAL RPAREN VOLATILE -## -## Ends in an error in state: 658. -## -## scoped(statement) -> save_context . statement [ WHILE VOLATILE VOID VA_START VA_END VA_COPY VA_ARG UNSIGNED UNION UNAME TYPEOF TYPEDEF TILDE THREAD_LOCAL SWITCH STRUCT STRING_LITERAL STATIC_ASSERT STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACES RBRACE PRINT_TYPE PLUS_PLUS PLUS PIPES OFFSETOF NORETURN MINUS_MINUS MINUS LPAREN LONG LNAME LBRACK_LBRACK LBRACES LBRACE INT INLINE IF GOTO GENERIC FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT CONTINUE CONSTANT CONST COMPLEX CHAR CERB_MAGIC CASE BUILTIN_TYPES_COMPATIBLE_P BUILTIN_CHOOSE_EXPR BREAK BOOL BMC_ASSUME BANG AUTO ATOMIC ASSERT ASM AMPERSAND ALIGNOF ALIGNAS ] -## -## The known suffix of the stack is as follows: -## save_context -## - -parsing "scoped(statement)": seen "save_context", expecting "statement" - translation_unit: ALIGNAS LPAREN LPAREN LBRACE SWITCH LPAREN STRING_LITERAL RBRACK ## ## Ends in an error in state: 662. @@ -11957,7 +11957,7 @@ translation_unit: ENUM LNAME TYPE WHILE ## ## Ends in an error in state: 812. ## -## enum_specifier -> ENUM general_identifier . [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM general_identifier . [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## option(general_identifier) -> general_identifier . [ LBRACE ] ## ## The known suffix of the stack is as follows: @@ -11971,8 +11971,8 @@ translation_unit: ENUM LBRACK_LBRACK ALIGNAS RBRACK RBRACK WHILE ## Ends in an error in state: 813. ## ## attribute_specifier_sequence -> attribute_specifier_sequence . attribute_specifier [ UNAME LNAME LBRACK_LBRACK LBRACE ] -## enum_specifier -> ENUM attribute_specifier_sequence . option(general_identifier) LBRACE enumerator_list option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] -## enum_specifier -> ENUM attribute_specifier_sequence . general_identifier [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM attribute_specifier_sequence . option(general_identifier) LBRACE enumerator_list option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM attribute_specifier_sequence . general_identifier [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## ENUM attribute_specifier_sequence @@ -11984,7 +11984,7 @@ translation_unit: ENUM LBRACK_LBRACK ALIGNAS RBRACK RBRACK LBRACE LNAME TYPE EQ ## ## Ends in an error in state: 816. ## -## enum_specifier -> ENUM attribute_specifier_sequence option(general_identifier) LBRACE enumerator_list . option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM attribute_specifier_sequence option(general_identifier) LBRACE enumerator_list . option(COMMA) RBRACE [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## enumerator_list -> enumerator_list . COMMA enumerator [ RBRACE COMMA ] ## ## The known suffix of the stack is as follows: @@ -12022,7 +12022,7 @@ translation_unit: ENUM LBRACK_LBRACK ALIGNAS RBRACK RBRACK LNAME TYPE WHILE ## ## Ends in an error in state: 819. ## -## enum_specifier -> ENUM attribute_specifier_sequence general_identifier . [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## enum_specifier -> ENUM attribute_specifier_sequence general_identifier . [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## option(general_identifier) -> general_identifier . [ LBRACE ] ## ## The known suffix of the stack is as follows: @@ -12345,7 +12345,7 @@ translation_unit: TYPEOF LPAREN BOOL GT ## ## Ends in an error in state: 845. ## -## type_specifier_unique -> TYPEOF LPAREN type_name . RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## type_specifier_unique -> TYPEOF LPAREN type_name . RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## TYPEOF LPAREN type_name @@ -12369,7 +12369,7 @@ translation_unit: TYPEOF LPAREN STRING_LITERAL RBRACK ## Ends in an error in state: 847. ## ## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ] -## type_specifier_unique -> TYPEOF LPAREN expression . RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN CONST COMMA COLON AUTO ATOMIC ALIGNAS ] +## type_specifier_unique -> TYPEOF LPAREN expression . RPAREN [ VOLATILE UNAME TYPEDEF THREAD_LOCAL STATIC STAR SEMICOLON RPAREN RESTRICT REGISTER NORETURN LPAREN LNAME LBRACK_LBRACK LBRACK INLINE GT EXTERN EOF CONST COMMA COLON AUTO ATOMIC ALIGNAS ] ## ## The known suffix of the stack is as follows: ## TYPEOF LPAREN expression @@ -12401,7 +12401,7 @@ translation_unit: TYPEOF LPAREN STRING_LITERAL RBRACK -cn_statements: CN_EXTRACT CN_OWNED LT BOOL COLON +cn_statements: CN_EXTRACT CN_OWNED LT BOOL EOF ## ## Ends in an error in state: 850. ## @@ -12425,7 +12425,7 @@ cn_statements: CN_EXTRACT CN_OWNED LT BOOL COLON -cn_statements: CN_EXTRACT CN_BLOCK LT BOOL COLON +cn_statements: CN_EXTRACT CN_BLOCK LT BOOL EOF ## ## Ends in an error in state: 854. ## @@ -12498,7 +12498,7 @@ cn_statements: CN_HAVE UNAME VARIABLE WHILE -cn_statements: CN_EXTRACT SIZEOF LT BOOL COLON +cn_statements: CN_EXTRACT SIZEOF LT BOOL EOF ## ## Ends in an error in state: 864. ## @@ -13336,7 +13336,7 @@ cn_statements: CN_EXTRACT CN_LET UNAME WHILE -cn_statements: CN_EXTRACT CN_GOOD LT BOOL COLON +cn_statements: CN_EXTRACT CN_GOOD LT BOOL EOF ## ## Ends in an error in state: 1027. ## @@ -13431,7 +13431,7 @@ cn_statements: CN_EXTRACT CN_ARRAY_SHIFT WHILE -cn_statements: CN_EXTRACT CN_ARRAY_SHIFT LT BOOL COLON +cn_statements: CN_EXTRACT CN_ARRAY_SHIFT LT BOOL EOF ## ## Ends in an error in state: 1044. ## @@ -18438,3 +18438,38 @@ translation_unit: LBRACK_LBRACK ALIGNAS RBRACK RBRACK BOOL LNAME TYPE RPAREN ## + +type_name_eof: WHILE +## +## Ends in an error in state: 1959. +## +## type_name_eof' -> . type_name_eof [ # ] +## +## The known suffix of the stack is as follows: +## +## + +parsing "type_name_eof'": expected "type_name_eof" + +type_name_eof: BOOL GT +## +## Ends in an error in state: 1961. +## +## type_name_eof -> type_name . EOF [ # ] +## +## The known suffix of the stack is as follows: +## 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 186, spurious reduction of production attribute_type_specifier_unique -> type_specifier_unique +## In state 459, spurious reduction of production list_pair(attribute_type_qualifier,attribute_alignment_specifier) -> +## In state 460, spurious reduction of production list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) -> attribute_type_specifier_unique list_pair(attribute_type_qualifier,attribute_alignment_specifier) +## In state 458, spurious reduction of production specifier_qualifier_list -> list_tuple3_eq1(attribute_type_specifier_unique,attribute_type_qualifier,attribute_alignment_specifier) +## In state 222, spurious reduction of production option(abstract_declarator) -> +## In state 455, spurious reduction of production type_name -> specifier_qualifier_list option(abstract_declarator) +## + + diff --git a/parsers/c/cn_lexer.mll b/parsers/c/cn_lexer.mll new file mode 100644 index 000000000..9bcae9034 --- /dev/null +++ b/parsers/c/cn_lexer.mll @@ -0,0 +1,261 @@ +{ +open Cerb_frontend + +open Cn_tokens + +exception Cn_lexer_error + +let keywords: (string * Cn_tokens.token) list = [ + "accesses", ACCESSES; + "alloc_id", ALLOC_ID; + "apply", APPLY; + "array_shift", ARRAY_SHIFT; + "assert", ASSERT; + "Block", BLOCK; + "bool", BOOL; (* shared with C23 *) + "boolean", BOOL; (* TODO(Christopher/Dhruv): are all these variants of BOOL needed? *) + "CN_bool", BOOL; (* TODO(Christopher/Dhruv): are all these variants of BOOL needed? *) + "cn_function", FUNCTION; (* TODO(Christopher/Dhruv): is this variant still needed? *) + "datatype", DATATYPE; + "default", DEFAULT; (* shared with C11 *) + "each", EACH; + "else", ELSE; (* shared with C11 *) + "ensures", ENSURES; + "extract", EXTRACT; + "false", FALSE; + "function", FUNCTION; + "good", GOOD; + "have", HAVE; + "i128", BITS_TYPE (`I,128); + "i16", BITS_TYPE (`I,16); + "i32", BITS_TYPE (`I,32); + "i64", BITS_TYPE (`I,64); + "i8", BITS_TYPE (`I,8); + "if", IF; (* shared with C11 *) + "inline", INLINE; (* shared with C11 *) + "instantiate", INSTANTIATE; + "integer", INTEGER; + "inv", INV; + "lemma", LEMMA; + "let", LET; + "list", LIST; + "map", MAP; + "match", MATCH; + "member_shift", MEMBER_SHIFT; + "NULL", NULL; + "offsetof", OFFSETOF; + "Owned", OWNED; + "pack", PACK; + "pointer", POINTER; + "predicate", PREDICATE; + "print", PRINT; + "real", REAL; + "requires", REQUIRES; + "return", RETURN; (* shared with C11 *) + "set", SET; + "sizeof", SIZEOF; (* shared with C11 *) + "spec", SPEC; + "split_case", SPLIT_CASE; + "struct", STRUCT; (* shared with C11 *) + "take", TAKE; + "true", TRUE; + "trusted", TRUSTED; + "tuple", TUPLE; + "type_synonym", TYPE_SYNONYM; + "u128", BITS_TYPE (`U,128); + "u16", BITS_TYPE (`U,16); + "u32", BITS_TYPE (`U,32); + "u64", BITS_TYPE (`U,64); + "u8", BITS_TYPE (`U,8); + "unchanged", UNCHANGED; + "unfold", UNFOLD; + "unpack", UNPACK; + "void", VOID; (* shared with C11 *) +] + +let lexicon: (string, token) Hashtbl.t = + let lexicon = Hashtbl.create 0 in + let add (key, builder) = Hashtbl.add lexicon key builder in + List.iter add keywords; lexicon + +let lex_comment remainder lexbuf = + let ch = Lexing.lexeme_char lexbuf 0 in + if ch = '\n' then Lexing.new_line lexbuf; + remainder lexbuf + +let relexbuf_opt: (Lexing.lexbuf option) ref = + ref None + +} + +(* ========================================================================== *) + +(* Integer constant - we follow C but omit suffixes (see ISO C11 §6.4.4.1#1) *) +let digit = ['0'-'9'] +let hexadecimal_digit = ['0'-'9' 'A'-'F' 'a'-'f'] +let octal_digit = ['0'-'7'] +let nonzero_digit = ['1'-'9'] + +let hexadecimal_prefix = "0x" | "0X" +let hexadecimal_constant = hexadecimal_prefix hexadecimal_digit+ + +(* C23 binary constant, but omitting ' separators for now *) +(* TODO(Christopher/Dhruv): add support for ' separators to be in line with C23 ? *) +let binary_prefix = "0b" | "0B" +let binary_digit = "0" | "1" +let binary_constant = + (* binary_prefix (binary_digit "'"?)+ *) + binary_prefix (binary_digit)+ + +let octal_constant = '0' octal_digit* +let decimal_constant = nonzero_digit digit* + +let integer_constant = + decimal_constant + | octal_constant + | hexadecimal_constant + | binary_constant + +(* Identifiers - we follow C11 *) +(* TODO(Christopher/Dhruv): do you care about following C11 closely for this + (e.g. with respect to the universal character stuff), or should we simplify + like we already do for uppercase names. *) +(* see ISO C11 §6.4.3#1 *) +let hex_quad = + hexadecimal_digit hexadecimal_digit + hexadecimal_digit hexadecimal_digit + +let universal_character_name = + "\\u" hex_quad + | "\\U" hex_quad hex_quad + +(* see ISO C11 §6.4.4.1#1 *) +let nondigit = ['_' 'a'-'z' 'A'-'Z'] +let identifier_nondigit = + nondigit + | universal_character_name +let identifier = identifier_nondigit (identifier_nondigit | digit)* + + +(* Whitespaces *) +let whitespace_char = [' ' '\t' (*'\n'*) '\012' '\r'] + +let integer_width = ("8" | "16" | "32" | "64" | "128") + +(* ========================================================================== *) + +rule onelinecomment = parse + | '\n' | eof { () } + | _ { lex_comment onelinecomment lexbuf } + +(* Entry point *) +and initial = parse + (* Single-line comment *) + | "//" {let _ = onelinecomment lexbuf in Lexing.new_line lexbuf; initial lexbuf} + + | '\n' { Lexing.new_line lexbuf; initial lexbuf } + | whitespace_char+ { initial lexbuf } + + | (integer_constant as str) 'u' (integer_width as n) + { BITS_CONSTANT (str, `U, int_of_string n) } + | (integer_constant as str) 'i' (integer_width as n) + { BITS_CONSTANT (str, `I, int_of_string n) } + | (integer_constant as str) + (* TODO(K): (!!!) when moving away froms Cabs.constant in this token, be careful about the + decoding of octal constants. Z.of_string won't do the right (C behaviour) thing. *) + { INTEGER_CONSTANT (Cabs.CabsInteger_const (str, None)) } + + | '<' ([^'='][^'<' '>']+ as str) '>' + { + try + LT_CTYPE_GT (C_parser.type_name_eof C_lexer.lexer (Lexing.from_string str)) + with + | _ -> + relexbuf_opt := Some (Lexing.from_string (str ^ ">")); + LT + } + + (* Punctuators *) + | '[' { LBRACK } + | ']' { RBRACK } + | '(' { LPAREN } + | ')' { RPAREN } + | '{' { LBRACE } + | '}' { RBRACE } + | '.' { DOT } + | "->" { MINUS_GT } + | '&' { AMPERSAND } + | '*' { STAR } + | '+' { PLUS } + | '-' { MINUS } + | '!' { BANG } + | '/' { SLASH } + | '%' { PERCENT } + | '<' { LT } + | '>' { GT } + | "<=" { LT_EQ } + | ">=" { GT_EQ } + | "==" { EQ_EQ } + | "!=" { BANG_EQ } + | "&&" { AMPERSAND_AMPERSAND } + | "||" { PIPE_PIPE } + | '?' { QUESTION } + | ':' { COLON } + | ';' { SEMICOLON } + | '=' { EQ } + | ',' { COMMA } + | "_" { UNDERSCORE } + + (* copied over from backend/cn/assertion_lexer.mll *) + | ['A'-'Z']['0'-'9' 'A'-'Z' 'a'-'z' '_']* as id + { try + Hashtbl.find lexicon id + with Not_found -> + UNAME id + } + + | identifier as id + { try + Hashtbl.find lexicon id + with Not_found -> + LNAME id + } + | eof + { EOF } + | _ + { raise Cn_lexer_error } + +(* ========================================================================== *) + +{ +let initial lexbuf = + (* TODO(K) ===> do we need a stack of redos *) + (* TODO(K) ==> we don't because the ctype regexp excludes any '<' (?) *) + match !relexbuf_opt with + | None -> + initial lexbuf + | Some relexbuf -> + begin match initial relexbuf with + | EOF -> relexbuf_opt := None; initial lexbuf + | tok -> tok + end + + +type lexer_state = + | LSRegular + | LSIdentifier of string + +let lexer_state = ref LSRegular + +let lexer lexbuf : token = + match !lexer_state with + | LSRegular -> + begin match initial lexbuf with + | LNAME i as tok -> lexer_state := LSIdentifier i; tok + | UNAME i as tok -> lexer_state := LSIdentifier i; tok + | _ as tok -> lexer_state := LSRegular; tok + end + | LSIdentifier i -> + lexer_state := LSRegular; + if Lexer_feedback.is_typedefname i then TYPE else VARIABLE +} diff --git a/parsers/c/cn_parser.mly b/parsers/c/cn_parser.mly new file mode 100644 index 000000000..f35cae992 --- /dev/null +++ b/parsers/c/cn_parser.mly @@ -0,0 +1,738 @@ +%{ + +open Cerb_frontend +open Cn + +%} + +%token LT_CTYPE_GT + +%token INTEGER_CONSTANT +%token BITS_CONSTANT + +(* Keywords *) +%token ACCESSES ALLOC_ID APPLY ARRAY_SHIFT ASSERT BLOCK BOOL DATATYPE DEFAULT + EACH ELSE ENSURES EXTRACT FALSE FUNCTION GOOD HAVE IF INLINE INSTANTIATE + INTEGER INV LEMMA LET LIST MAP MATCH MEMBER_SHIFT NULL OFFSETOF OWNED PACK + POINTER PREDICATE PRINT REAL REQUIRES RETURN SET SIZEOF SPEC SPLIT_CASE + STRUCT TAKE TRUE TRUSTED TUPLE TYPE_SYNONYM UNCHANGED UNFOLD UNPACK VOID +%token <[`U|`I] * int> BITS_TYPE + +(* Identifiers *) +%token UNAME (* Uppercase. UNAME is either a variable identifier or a type name *) +%token LNAME (* Lowercase. LNAME is either a variable identifier or a type name *) +%token VARIABLE TYPE + +(* Punctuators *) +%token LBRACK RBRACK LPAREN RPAREN DOT MINUS_GT AMPERSAND STAR PLUS MINUS BANG + SLASH PERCENT LT GT LT_EQ GT_EQ EQ_EQ BANG_EQ AMPERSAND_AMPERSAND PIPE_PIPE + QUESTION COLON EQ COMMA UNDERSCORE +%token LBRACE RBRACE SEMICOLON + +%token EOF + +%start function_spec +%start loop_spec +%start cn_statements +%start cn_toplevel + +%type base_type +%type<(Symbol.identifier, Cabs.type_name) Cn.cn_function> cn_function +%type<(Symbol.identifier, Cabs.type_name) Cn.cn_predicate> cn_predicate +%type<(Symbol.identifier) Cn.cn_datatype> cn_datatype +%type<(Symbol.identifier, Cabs.type_name) Cn.cn_clauses> clauses +%type<(Symbol.identifier, Cabs.type_name) Cn.cn_clause> clause +%type<(Symbol.identifier, Cabs.type_name) Cn.cn_resource> resource +%type<(Symbol.identifier, Cabs.type_name) Cn.cn_pred> pred +%type<(Symbol.identifier, Cabs.type_name) Cn.cn_condition> condition +%type<(Symbol.identifier, Cabs.type_name) Cn.cn_function_spec list> function_spec +%type<(Symbol.identifier, Cabs.type_name) Cn.cn_loop_spec> loop_spec +%type<(Symbol.identifier, Cabs.type_name) Cn.cn_statement> cn_statement +%type<((Symbol.identifier, Cabs.type_name) Cn.cn_statement) list> cn_statements +%type<(Symbol.identifier * Symbol.identifier Cn.cn_base_type) list> cn_args + +%type cn_toplevel_elem +%type cn_toplevel + +%% + +%inline NAME: +| u= UNAME + { u } +| l= LNAME + { l } + + +prim_expr: +| NULL + { Cerb_frontend.Cn.(CNExpr (Cerb_location.point $startpos, CNExpr_const CNConst_NULL)) } +| TRUE + { Cerb_frontend.Cn.(CNExpr (Cerb_location.point $startpos, CNExpr_const (CNConst_bool true))) } +| FALSE + { Cerb_frontend.Cn.(CNExpr (Cerb_location.point $startpos, CNExpr_const (CNConst_bool false))) } +| cst= INTEGER_CONSTANT + { + match cst with + | Cabs.CabsInteger_const (str, None) -> + let v = Z.of_string str in + Cerb_frontend.Cn.(CNExpr ( Cerb_location.point $startpos + , CNExpr_const (CNConst_integer v) )) + | _ -> + raise (C_lexer.Error (Cparser_unexpected_token "TODO cn integer const")) + } +| cst= BITS_CONSTANT + { + let (str,sign,n) = cst in + let sign = match sign with + | `U -> Cerb_frontend.Cn.CN_unsigned + | `I -> Cerb_frontend.Cn.CN_signed in + let v = Z.of_string str in + Cerb_frontend.Cn.(CNExpr (Cerb_location.point $startpos, CNExpr_const (CNConst_bits ((sign,n),v)))) + } +| ident= cn_variable + { Cerb_frontend.Cn.(CNExpr (Cerb_location.point $startpos, CNExpr_var ident)) } +(* | ident= cn_variable DOT ident_membr= cn_variable *) +| RETURN + { Cerb_frontend.Cn.(CNExpr (Cerb_location.point $startpos, + CNExpr_var (Symbol.Identifier (Cerb_location.point $startpos($1), "return")))) } +| e= prim_expr DOT member=cn_variable + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_memberof (e, member))) } +| e= delimited(LPAREN, expr, RPAREN) + { e } +| ARRAY_SHIFT ty=LT_CTYPE_GT LPAREN base=expr COMMA index=expr RPAREN + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_array_shift (base, Some ty, index))) } +| ARRAY_SHIFT LPAREN base=expr COMMA index=expr RPAREN + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_array_shift (base, None, index))) } +| MEMBER_SHIFT LPAREN base=expr COMMA member=cn_variable RPAREN + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_membershift (base, None, member))) } +| MEMBER_SHIFT LT tag=cn_variable GT LPAREN base=expr COMMA member=cn_variable RPAREN + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_membershift (base, Some tag, member))) } +| ident= cn_variable LPAREN args=separated_list(COMMA, expr) RPAREN + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_call (ident, args))) } +| ct= cn_good LPAREN arg=expr RPAREN + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_good (ct, arg))) } +| ident= cn_variable args= cons_args + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos(args))) + , CNExpr_cons (ident, args))) } +| arr= prim_expr LBRACK idx= expr RBRACK + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_map_get, arr, idx))) } +| LBRACE a=expr RBRACE PERCENT l=NAME VARIABLE + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($4))) + , CNExpr_at_env (a, l))) } +| LBRACE members=record_def RBRACE + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos,$endpos) NoCursor) + , CNExpr_record members)) } +| LBRACE base_value__updates=nonempty_member_updates RBRACE + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_memberupdates (fst base_value__updates, snd base_value__updates))) } +| base_value=prim_expr LBRACK updates=separated_nonempty_list(COMMA, index_update) RBRACK + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_arrayindexupdates (base_value, updates))) } + + + +unary_expr: +| e= prim_expr + { e } +| STAR arg = unary_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_deref arg)) } +| SIZEOF ty= LT_CTYPE_GT + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_sizeof ty)) } +| OFFSETOF LPAREN tag = cn_variable COMMA member= cn_variable RPAREN + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_offsetof (tag, member))) } +| LBRACE e= expr RBRACE UNCHANGED + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_unchanged e)) } +| MINUS e= unary_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_negate e )) } +| BANG e= unary_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_not e )) } +| DEFAULT LT bt= base_type GT + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) NoCursor) + , CNExpr_default bt )) } +| AMPERSAND LPAREN e= prim_expr MINUS_GT member=cn_variable RPAREN + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_membershift (e, None, member) )) } +| AMPERSAND name=cn_variable + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_addr name)) } +| LPAREN ty= base_type_explicit RPAREN expr= unary_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , CNExpr_cast (ty, expr))) } + + +mul_expr: +(* TODO *) +| e= unary_expr + { e } +| e1= mul_expr STAR e2= unary_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_mul, e1, e2))) } +| e1= mul_expr SLASH e2= unary_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_div, e1, e2))) } + +add_expr: +| e= mul_expr + { e } +| e1= add_expr PLUS e2= mul_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_add, e1, e2))) } +| e1= add_expr MINUS e2= mul_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_sub, e1, e2))) } + +rel_expr: +| e= add_expr + { e } +| e1= rel_expr EQ_EQ e2= add_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_equal, e1, e2))) } +| e1= rel_expr BANG_EQ e2= add_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_inequal, e1, e2))) } +| e1= rel_expr LT e2= add_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_lt, e1, e2))) } +| e1= rel_expr GT e2= add_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_gt, e1, e2))) } +| e1= rel_expr LT_EQ e2= add_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_le, e1, e2))) } +| e1= rel_expr GT_EQ e2= add_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_ge, e1, e2))) } + + +bool_and_expr: +| e= rel_expr + { e } +| e1= bool_and_expr AMPERSAND_AMPERSAND e2= rel_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_and, e1, e2))) } +bool_or_expr: +| e = bool_and_expr + { e } +| e1= bool_or_expr PIPE_PIPE e2= bool_and_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_binop (CN_or, e1, e2))) } + +list_expr: +| e= bool_or_expr + { e } +| es= delimited(LBRACK, separated_nonempty_list(COMMA, rel_expr), RBRACK) + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) NoCursor) + , CNExpr_list es)) } +(* + | LBRACK COLON bty= base_type RBRACK + | e1= rel_expr COLON_COLON e2= list_expr + // | Head of 'bt term + // | Tail of 'bt term + // | NthList of int * 'bt term +; +*) + +int_range: +| l= INTEGER_CONSTANT COMMA r= INTEGER_CONSTANT + { + match (l, r) with + | (Cabs.CabsInteger_const (l_str, None), Cabs.CabsInteger_const (r_str, None)) -> + (Z.of_string l_str, Z.of_string r_str) + | _ -> + raise (C_lexer.Error (Cparser_unexpected_token "TODO cn integer const")) + } + +member_def: +| member=cn_variable COLON e=expr + { (member, e) } + +member_updates: +| update=member_def COMMA base_value__updates=member_updates + { (fst base_value__updates, update::snd base_value__updates) } +| DOT DOT base_value=expr + { (base_value,[]) } + +nonempty_member_updates: +| update=member_def COMMA base_value__updates=member_updates + { (fst base_value__updates, update::snd base_value__updates) } + + +index_update: +| i=prim_expr COLON e=expr + { (i, e) } + +match_cases: (* NOTE: the list is in reverse *) +| m= match_case + { [ m ] } +| ms= match_cases m= match_case + { m :: ms } + +pattern_member_def: +| member=cn_variable COLON p=pattern + { (member, p) } + +pattern_cons_args: +| xs= delimited(LBRACE, separated_list(COMMA, pattern_member_def), RBRACE) + { xs } + +pattern: (* very limited subset of Rust options *) +| UNDERSCORE + { Cerb_frontend.Cn.(CNPat (Cerb_location.point $startpos, CNPat_wild)) } +| ident= cn_variable + { Cerb_frontend.Cn.(CNPat (Cerb_location.point $startpos, CNPat_sym ident)) } +(* TODO require `ident` starts with an upper case *) +| ident= cn_variable args= pattern_cons_args + { Cerb_frontend.Cn.(CNPat ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos(args))) + , CNPat_constructor (ident, args))) } + + +match_case: +| lhs= pattern EQ GT rhs= delimited(LBRACE, expr, RBRACE) + { (lhs, rhs) } + +match_target: +| ident= cn_variable + { Cerb_frontend.Cn.(CNExpr (Cerb_location.point $startpos, CNExpr_var ident)) } +| e= delimited(LPAREN, expr, RPAREN) + { e } + + +expr_without_let: +| e= list_expr + { e } +| e1= list_expr QUESTION e2= list_expr COLON e3= list_expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($2))) + , CNExpr_ite (e1, e2, e3))) } +| IF e1= delimited(LPAREN, expr, RPAREN) e2= delimited(LBRACE, expr, RBRACE) ELSE e3= delimited(LBRACE,expr,RBRACE) + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) NoCursor) + , CNExpr_ite (e1, e2, e3))) } +| EACH LPAREN bTy= base_type str= cn_variable COLON r=int_range SEMICOLON e1= expr RPAREN + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) NoCursor) + , + CNExpr_each (str, bTy, r, e1))) } +| MATCH e= match_target LBRACE ms= match_cases RBRACE + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.(region ($startpos, $endpos) (PointCursor $startpos($1))) + , + CNExpr_match (e, List.rev ms))) } + +expr: +| e=expr_without_let + { e } +| LET str= cn_variable EQ e1= expr SEMICOLON e2= expr + { Cerb_frontend.Cn.(CNExpr ( Cerb_location.region ($startpos(e1), $endpos(e1)) NoCursor, + CNExpr_let (str, e1, e2))) } +; + + + +(* CN predicate definitions **************************************************) + +(* base types, not including user-names (which conflict more in some places) *) +base_type_explicit: +| VOID + { Cerb_frontend.Cn.CN_unit } +| BOOL + { Cerb_frontend.Cn.CN_bool } +| INTEGER + { Cerb_frontend.Cn.CN_integer } +| bit_ty=BITS_TYPE + { let (sign,n) = bit_ty in + let sign = match sign with + | `U -> CN_unsigned + | `I -> CN_signed + in + Cerb_frontend.Cn.CN_bits (sign,n) + } +| REAL + { Cerb_frontend.Cn.CN_real } +| POINTER + { Cerb_frontend.Cn.CN_loc } +| ALLOC_ID + { Cerb_frontend.Cn.CN_alloc_id } +| members= delimited(LBRACE, nonempty_cn_params, RBRACE) + { Cerb_frontend.Cn.CN_record members } +| STRUCT id= cn_variable + { Cerb_frontend.Cn.CN_struct id } +| DATATYPE id= cn_variable + { Cerb_frontend.Cn.CN_datatype id } +| MAP LT bTy1= base_type COMMA bTy2= base_type GT + { Cerb_frontend.Cn.CN_map (bTy1, bTy2) } +| LIST LT bTy= base_type GT + { Cerb_frontend.Cn.CN_list bTy } +| TUPLE LT bTys= separated_list(COMMA, base_type) GT + { Cerb_frontend.Cn.CN_tuple bTys } +| SET LT bTy= base_type GT + { Cerb_frontend.Cn.CN_set bTy } +; + +base_type: +| t= base_type_explicit + { t } +| v= cn_variable + { Cerb_frontend.Cn.CN_user_type_name v } +; + +cn_good: +| GOOD ty= LT_CTYPE_GT + { ty } + + +cn_option_pred_clauses: +| clauses=delimited(LBRACE, clauses, RBRACE) + { Some clauses } +| + { None } + + +(* TODO check `nm` starts with upper case *) +cn_cons_case: +| nm= cn_variable args= delimited(LBRACE, cn_args, RBRACE) + { (nm, args) } + +cn_cons_cases: +| xs= separated_list (COMMA, cn_cons_case) + { xs } + +cn_attrs: +| nms= delimited (LBRACK, separated_list (COMMA, cn_variable), RBRACK) + { nms } +| + { [] } + +cn_function: +| FUNCTION + cn_func_attrs= cn_attrs + cn_func_return_bty=delimited(LPAREN, base_type, RPAREN) str= cn_variable + cn_func_args= delimited(LPAREN, cn_args, RPAREN) + cn_func_body= cn_option_func_body + { (* TODO: check the name starts with lower case *) + let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + { cn_func_magic_loc= Cerb_location.unknown + ; cn_func_loc= loc + ; cn_func_name= str + ; cn_func_return_bty + ; cn_func_attrs + ; cn_func_args + ; cn_func_body} } +cn_predicate: +| PREDICATE + cn_pred_attrs= cn_attrs + cn_pred_output= cn_pred_output + str= UNAME VARIABLE + cn_pred_iargs= delimited(LPAREN, cn_args, RPAREN) + cn_pred_clauses= cn_option_pred_clauses + { (* TODO: check the name starts with upper case *) + let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + { cn_pred_magic_loc= Cerb_location.unknown + ; cn_pred_loc= loc + ; cn_pred_name= Symbol.Identifier (loc, str) + ; cn_pred_attrs + ; cn_pred_output + ; cn_pred_iargs + ; cn_pred_clauses} } +cn_lemma: +| LEMMA + str= cn_variable + cn_lemma_args= delimited(LPAREN, cn_args, RPAREN) + REQUIRES cn_lemma_requires=nonempty_list(condition) + ENSURES cn_lemma_ensures=nonempty_list(condition) + { (* TODO: check the name starts with lower case *) + let loc = Cerb_location.point $startpos(str) in + { cn_lemma_magic_loc= Cerb_location.unknown + ; cn_lemma_loc= loc + ; cn_lemma_name= str + ; cn_lemma_args + ; cn_lemma_requires + ; cn_lemma_ensures } } +cn_datatype: +| DATATYPE nm= cn_variable + cases= delimited(LBRACE, cn_cons_cases, RBRACE) + { + { cn_dt_magic_loc= Cerb_location.unknown + ; cn_dt_loc= Cerb_location.(region ($startpos, $endpos) NoCursor) + ; cn_dt_name= nm + ; cn_dt_cases= cases} } +cn_fun_spec: +| SPEC + str= cn_variable + cn_spec_args= delimited(LPAREN, cn_args, RPAREN) SEMICOLON + REQUIRES cn_spec_requires=nonempty_list(condition) + ENSURES cn_spec_ensures=nonempty_list(condition) + { let loc = Cerb_location.point $startpos(str) in + { cn_spec_magic_loc= Cerb_location.unknown + ; cn_spec_loc= loc + ; cn_spec_name= str + ; cn_spec_args + ; cn_spec_requires + ; cn_spec_ret_name = Symbol.Identifier (Cerb_location.unknown, "dummy") + ; cn_spec_ensures } } +cn_type_synonym: +| TYPE_SYNONYM + str= cn_variable + EQ + ty= opt_paren(base_type) + { let loc = Cerb_location.point $startpos(str) in + { cn_tysyn_magic_loc= Cerb_location.unknown + ; cn_tysyn_loc= loc + ; cn_tysyn_name= str + ; cn_tysyn_rhs= ty } } + + +(* all cases where cn_variable is used don't mind if they're shadowing + a situation where the name has been assigned as a typedef *) +%inline cn_variable: +| str= NAME VARIABLE + { Symbol.Identifier (Cerb_location.point $startpos(str), str) } +| str= NAME TYPE + { Symbol.Identifier (Cerb_location.point $startpos(str), str) } + +%inline base_type_cn_variable: +| bt=base_type str=cn_variable + { (str, bt) } + +cn_args: +| xs= separated_list(COMMA, base_type_cn_variable) + { xs } +; + +nonempty_cn_params: +| xs= separated_nonempty_list(COMMA, base_type_cn_variable) + { xs } +; + + +opt_paren(A): +| x=A + { x } +| x= delimited(LPAREN, A, RPAREN) + { x } + +cn_pred_output: +| bt= opt_paren(base_type) + { let loc = Cerb_location.region $loc(bt) NoCursor in + (loc,bt) } + + +record_def: +| xs= separated_nonempty_list(COMMA, member_def) + { xs } +; + + + +cons_args: +| xs= delimited(LBRACE, separated_list(COMMA, member_def), RBRACE) + { xs } + + +clauses: +| c= clause SEMICOLON + { Cerb_frontend.Cn.CN_clause (Cerb_location.region $loc NoCursor, c) } +| IF LPAREN e= expr RPAREN LBRACE c= clause SEMICOLON RBRACE ELSE LBRACE cs= clauses RBRACE + { Cerb_frontend.Cn.CN_if (Cerb_location.region $loc NoCursor, e, c, cs) } +; + +cn_option_func_body: +| cn_func_body=delimited(LBRACE, expr, RBRACE) + { Some cn_func_body } +| + { None } + +(* +cn_func_body: +| LET str= cn_variable EQ e= expr SEMICOLON c= cn_func_body + { let loc = Cerb_location.point $startpos(str) in + Cerb_frontend.Cn.CN_fb_letExpr (loc, str, e, c) } +| RETURN e= expr SEMICOLON + { Cerb_frontend.Cn.CN_fb_return (Cerb_location.region $loc(e) NoCursor, e) } +| SWITCH e= delimited(LPAREN, expr, RPAREN) cs= nonempty_list(cn_func_body_case) + { let loc = Cerb_location.point $startpos($1) in + Cerb_frontend.Cn.CN_fb_cases (loc, e, cs) } +; + +cn_func_body_case: +| CASE nm= cn_variable LBRACE body=cn_func_body RBRACE + { (nm, body) } +*) + +clause: +| TAKE str= cn_variable EQ res= resource SEMICOLON c= clause + { let loc = Cerb_location.point $startpos(str) in + Cerb_frontend.Cn.CN_letResource (loc, str, res, c) } +| LET str= cn_variable EQ e= expr SEMICOLON c= clause + { let loc = Cerb_location.point $startpos(str) in + Cerb_frontend.Cn.CN_letExpr (loc, str, e, c) } +| ASSERT e= delimited(LPAREN, assert_expr, RPAREN) SEMICOLON c= clause + { Cerb_frontend.Cn.CN_assert (Cerb_location.region $loc NoCursor, e, c) } +| RETURN ret= expr + { Cerb_frontend.Cn.CN_return (Cerb_location.region $loc(ret) NoCursor, ret) } +| RETURN +(*copying from prim_expr *) + { Cerb_frontend.Cn.CN_return (Cerb_location.region $loc NoCursor, + CNExpr (Cerb_location.region $loc NoCursor, CNExpr_const CNConst_unit)) } +; + + +assert_expr: +| EACH LPAREN bTy= base_type str= cn_variable SEMICOLON e1= expr RPAREN + LBRACE e2= expr RBRACE + { Cerb_frontend.Cn.CN_assert_qexp ( str + , bTy, e1, e2) } +| e= expr_without_let + { Cerb_frontend.Cn.CN_assert_exp e } + + + +resource: +| p= pred es= delimited(LPAREN, separated_list(COMMA, expr), RPAREN) + { Cerb_frontend.Cn.CN_pred (Cerb_location.region $loc(p) NoCursor, p, es) } +| EACH LPAREN bTy= base_type str= cn_variable SEMICOLON e1= expr RPAREN + LBRACE p= pred LPAREN es= separated_list(COMMA, expr) RPAREN RBRACE + { Cerb_frontend.Cn.CN_each ( str + , bTy + , e1 + , Cerb_location.region $loc(p) NoCursor + , p + , es) } +; + +pred: +| OWNED ty= LT_CTYPE_GT + { Cerb_frontend.Cn.CN_owned (Some ty) } +| OWNED + { Cerb_frontend.Cn.CN_owned None } +| BLOCK ty= LT_CTYPE_GT + { Cerb_frontend.Cn.CN_block ty } +| str= UNAME VARIABLE + { Cerb_frontend.Cn.CN_named (Symbol.Identifier (Cerb_location.point $startpos(str), str)) } +; + + +/* copying 'clause' and adjusting */ +condition: +| TAKE str= cn_variable EQ res= resource SEMICOLON + { let loc = Cerb_location.point $startpos(str) in + Cerb_frontend.Cn.CN_cletResource (loc, str, res) } +| LET str= cn_variable EQ e= expr SEMICOLON + { let loc = Cerb_location.point $startpos(str) in + Cerb_frontend.Cn.CN_cletExpr (loc, str, e) } +| e= assert_expr SEMICOLON + { Cerb_frontend.Cn.CN_cconstr (Cerb_location.region $loc NoCursor, e) } +; + + +function_spec_item: +| TRUSTED SEMICOLON + { let loc = Cerb_location.region ($startpos, $endpos) NoCursor in + Cerb_frontend.Cn.CN_trusted loc } +| ACCESSES accs=nonempty_list(terminated(cn_variable,SEMICOLON)) + { let loc = Cerb_location.region ($startpos, $endpos) NoCursor in + Cerb_frontend.Cn.CN_accesses (loc, accs) } +| REQUIRES cs=nonempty_list(condition) + { let loc = Cerb_location.region ($startpos, $endpos) NoCursor in + Cerb_frontend.Cn.CN_requires (loc, cs) } +| ENSURES cs=nonempty_list(condition) + { let loc = Cerb_location.region ($startpos, $endpos) NoCursor in + Cerb_frontend.Cn.CN_ensures (loc, cs) } +| FUNCTION nm=cn_variable SEMICOLON + { let loc = Cerb_location.region ($startpos, $endpos) NoCursor in + Cerb_frontend.Cn.CN_mk_function (loc, nm) } + +function_spec: +| fs=list(function_spec_item) EOF + { fs } + + +loop_spec: +| INV cs=nonempty_list(condition) EOF + { let loc = Cerb_location.region ($startpos, $endpos) NoCursor in + Cerb_frontend.Cn.CN_inv (loc, cs) } + +%inline to_be_instantiated: +| + { Cerb_frontend.Cn.I_Everything } +| f=cn_variable COMMA + { Cerb_frontend.Cn.I_Function f } +| ct=cn_good COMMA + { Cerb_frontend.Cn.I_Good ct } + +%inline to_be_extracted: +| + { Cerb_frontend.Cn.E_Everything } +| p=pred COMMA + { Cerb_frontend.Cn.E_Pred p } + + +cn_statement: +/* copying from 'resource' rule */ +| PACK p= pred es= delimited(LPAREN, separated_list(COMMA, expr), RPAREN) SEMICOLON + { let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + CN_statement (loc , CN_pack_unpack (Pack, p, es)) } +/* copying from 'resource' rule */ +| UNPACK p= pred es= delimited(LPAREN, separated_list(COMMA, expr), RPAREN) SEMICOLON + { let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + CN_statement (loc , CN_pack_unpack (Unpack, p, es)) } +| HAVE a=assert_expr SEMICOLON + { let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + CN_statement (loc, CN_have a) } +| EXTRACT tbe=to_be_extracted e=expr SEMICOLON + { let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + CN_statement (loc, CN_extract ([], tbe, e)) } +| INSTANTIATE tbi=to_be_instantiated e=expr SEMICOLON + { let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + CN_statement (loc, CN_instantiate (tbi, e)) } +| SPLIT_CASE a=assert_expr SEMICOLON + { let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + CN_statement (loc, CN_split_case a) } +| UNFOLD id=cn_variable es= delimited(LPAREN, separated_list(COMMA, expr), RPAREN) SEMICOLON + { let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + CN_statement (loc, CN_unfold (id, es)) } +| APPLY id=cn_variable es= delimited(LPAREN, separated_list(COMMA, expr), RPAREN) SEMICOLON + { let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + CN_statement (loc, CN_apply (id, es)) } +| ASSERT LPAREN e=assert_expr RPAREN SEMICOLON + { let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + CN_statement (loc, CN_assert_stmt e) } +| INLINE names= separated_list(COMMA, cn_variable) SEMICOLON + { let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + CN_statement (loc, CN_inline names) } +| PRINT LPAREN e=expr RPAREN SEMICOLON + { let loc = Cerb_location.(region ($startpos, $endpos) NoCursor) in + CN_statement (loc, CN_print e) } + +cn_statements: +| ls=nonempty_list(cn_statement) EOF + { ls } + +cn_toplevel_elem: +| pred= cn_predicate + { EDecl_predCN pred } +| func= cn_function + { EDecl_funcCN func } +| lmma= cn_lemma + { EDecl_lemmaCN lmma } +| dt= cn_datatype + { EDecl_datatypeCN dt } +| ts= cn_type_synonym + { EDecl_type_synCN ts } +| spec= cn_fun_spec + { EDecl_fun_specCN spec } +; + +cn_toplevel: +| elems=list(cn_toplevel_elem) EOF + { elems } diff --git a/parsers/c/cn_tokens.ml b/parsers/c/cn_tokens.ml new file mode 100644 index 000000000..ef0c3ba12 --- /dev/null +++ b/parsers/c/cn_tokens.ml @@ -0,0 +1,200 @@ +type token = + | EOF + + (* '<' "C type-name" '>' *) + | LT_CTYPE_GT of Cerb_frontend.Cabs.type_name + + (* Identifiers *) + | UNAME of string + | LNAME of string + | VARIABLE + | TYPE + + (* Keywords *) + | ACCESSES + | ALLOC_ID + | APPLY + | ARRAY_SHIFT + | ASSERT + | BLOCK + | BOOL + | BITS_TYPE of ([`U|`I] * int) + | DATATYPE + | DEFAULT + | EACH + | ELSE + | ENSURES + | EXTRACT + | FALSE + | FUNCTION + | GOOD + | HAVE + | IF + | INLINE + | INSTANTIATE + | INTEGER + | INV + | LEMMA + | LET + | LIST + | MAP + | MATCH + | MEMBER_SHIFT + | NULL + | OFFSETOF + | OWNED + | PACK + | POINTER + | PREDICATE + | PRINT + | REAL + | REQUIRES + | RETURN + | SET + | SIZEOF + | SPEC + | SPLIT_CASE + | STRUCT + | TAKE + | TRUE + | TRUSTED + | TUPLE + | TYPE_SYNONYM + | UNCHANGED + | UNFOLD + | UNPACK + | VOID + + | INTEGER_CONSTANT of Cerb_frontend.Cabs.cabs_constant (* TODO(K): replace the payload with a plain Z.t s*) + | BITS_CONSTANT of (string * [`I|`U] * int) + + (* Punctuators *) + | LBRACK + | RBRACK + | LPAREN + | RPAREN + | LBRACE + | RBRACE + | DOT + | MINUS_GT + | AMPERSAND + | STAR + | PLUS + | MINUS + | BANG + | SLASH + | PERCENT + | LT + | GT + | LT_EQ + | GT_EQ + | EQ_EQ + | BANG_EQ + | AMPERSAND_AMPERSAND + | PIPE_PIPE + | QUESTION + | COLON + | SEMICOLON + | EQ + | COMMA + (* TODO(K): add ==> *) + | UNDERSCORE + + +let string_of_token = function + | EOF -> "EOF" + + | LT_CTYPE_GT _ -> "LT_CTYPE_GT" + + | UNAME s -> "UNAME(" ^ s ^ ")" + | LNAME s -> "LNAME(" ^ s ^ ")" + | VARIABLE -> "VARIABLE" + | TYPE -> "TYPE" + + | ACCESSES -> "ACCESSES" + | ALLOC_ID -> "ALLOC_ID" + | APPLY -> "APPLY" + | ARRAY_SHIFT -> "ARRAY_SHIFT" + | ASSERT -> "ASSERT" + | BLOCK -> "BLOCK" + | BOOL -> "BOOL" + | BITS_TYPE _ -> "BITS_TYPE" + | DATATYPE -> "DATATYPE" + | DEFAULT -> "DEFAULT" + | EACH -> "EACH" + | ELSE -> "ELSE" + | ENSURES -> "ENSURES" + | EXTRACT -> "EXTRACT" + | FALSE -> "FALSE" + | FUNCTION -> "FUNCTION" + | GOOD -> "GOOD" + | HAVE -> "HAVE" + | IF -> "IF" + | INLINE -> "INLINE" + | INSTANTIATE -> "INSTANTIATE" + | INTEGER -> "INTEGER" + | INV -> "INV" + | LEMMA -> "LEMMA" + | LET -> "LET" + | LIST -> "LIST" + | MAP -> "MAP" + | MATCH -> "MATCH" + | MEMBER_SHIFT -> "MEMBER_SHIFT" + | NULL -> "NULL" + | OFFSETOF -> "OFFSETOF" + | OWNED -> "OWNED" + | PACK -> "PACK" + | POINTER -> "POINTER" + | PREDICATE -> "PREDICATE" + | PRINT -> "PRINT" + | REAL -> "REAL" + | REQUIRES -> "REQUIRES" + | RETURN -> "RETURN" + | SET -> "SET" + | SIZEOF -> "SIZEOF" + | SPEC -> "SPEC" + | SPLIT_CASE -> "SPLIT_CASE" + | STRUCT -> "STRUCT" + | TAKE -> "TAKE" + | TRUE -> "TRUE" + | TRUSTED -> "TRUSTED" + | TUPLE -> "TUPLE" + | TYPE_SYNONYM -> "TYPE_SYNONYM" + | UNCHANGED -> "UNCHANGED" + | UNFOLD -> "UNFOLD" + | UNPACK -> "UNPACK" + | VOID -> "VOID" + + | INTEGER_CONSTANT _ -> "INTEGER_CONSTANT" + | BITS_CONSTANT _ -> "BITS_CONSTANT" + + | AMPERSAND -> "AMPERSAND" + | AMPERSAND_AMPERSAND -> "AMPERSAND_AMPERSAND" + | BANG -> "BANG" + | BANG_EQ -> "BANG_EQ" + | COLON -> "COLON" + | COMMA -> "COMMA" + | DOT -> "DOT" + | EQ -> "EQ" + | EQ_EQ -> "EQ_EQ" + | GT -> "GT" + | GT_EQ -> "GT_EQ" + | LBRACE -> "LBRACE" + | LBRACK -> "LBRACK" + | LPAREN -> "LPAREN" + | LT -> "LT" + | LT_EQ -> "LT_EQ" + | MINUS -> "MINUS" + | MINUS_GT -> "MINUS_GT" + | PERCENT -> "PERCENT" + | PIPE_PIPE -> "PIPE_PIE" + | PLUS -> "PLUS" + | QUESTION -> "QUESTION" + | RBRACE -> "RBRACE" + | RBRACK -> "RBRACK" + | RPAREN -> "RPAREN" + | SEMICOLON -> "SEMICOLON" + | SLASH -> "SLASH" + | STAR -> "STAR" + + | UNDERSCORE -> "UNDERSCORE" diff --git a/parsers/c/dune b/parsers/c/dune index 7c22e03b8..02d88b8bb 100644 --- a/parsers/c/dune +++ b/parsers/c/dune @@ -12,6 +12,11 @@ (flags (--external-tokens Tokens --explain --exn-carries-state)) (modules c_parser)) +(ocamllex cn_lexer) +(menhir + (flags (--strict --external-tokens Cn_tokens --explain --exn-carries-state)) + (modules cn_parser)) + ;; integrating and checking .messages file ;; based on https://gitlab.inria.fr/fpottier/menhir/-/blob/master/demos/calc-syntax-errors/dune