GDB (xrefs)
|
#include "defs.h"
#include "expression.h"
#include "value.h"
#include "parser-defs.h"
#include "language.h"
#include "f-lang.h"
#include "block.h"
#include <ctype.h>
#include <algorithm>
#include "type-stack.h"
#include "f-exp.h"
#include "yy-remap.h"
#include <limits.h>
Go to the source code of this file.
Classes | |
union | f_exp_YYSTYPE |
union | f_exp_yyalloc |
struct | f_token |
struct | f77_boolean_val |
Macros | |
#define | YYBISON 30802 |
#define | YYBISON_VERSION "3.8.2" |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 0 |
#define | YYPUSH 0 |
#define | YYPULL 1 |
#define | parse_type(ps) builtin_type (ps->gdbarch ()) |
#define | parse_f_type(ps) builtin_f_type (ps->gdbarch ()) |
#define | GDB_YY_REMAP_PREFIX f_ |
#define | YY_CAST(Type, Val) ((Type) (Val)) |
#define | YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) |
#define | YY_NULLPTRPTR ((void*)0) |
#define | YYTOKENTYPE |
#define | YYEMPTY -2 |
#define | YYEOF 0 |
#define | YYerror 256 |
#define | YYUNDEF 257 |
#define | INT 258 |
#define | FLOAT 259 |
#define | STRING_LITERAL 260 |
#define | BOOLEAN_LITERAL 261 |
#define | NAME 262 |
#define | TYPENAME 263 |
#define | COMPLETE 264 |
#define | NAME_OR_INT 265 |
#define | SIZEOF 266 |
#define | KIND 267 |
#define | ERROR 268 |
#define | INT_S1_KEYWORD 269 |
#define | INT_S2_KEYWORD 270 |
#define | INT_KEYWORD 271 |
#define | INT_S4_KEYWORD 272 |
#define | INT_S8_KEYWORD 273 |
#define | LOGICAL_S1_KEYWORD 274 |
#define | LOGICAL_S2_KEYWORD 275 |
#define | LOGICAL_KEYWORD 276 |
#define | LOGICAL_S4_KEYWORD 277 |
#define | LOGICAL_S8_KEYWORD 278 |
#define | REAL_KEYWORD 279 |
#define | REAL_S4_KEYWORD 280 |
#define | REAL_S8_KEYWORD 281 |
#define | REAL_S16_KEYWORD 282 |
#define | COMPLEX_KEYWORD 283 |
#define | COMPLEX_S4_KEYWORD 284 |
#define | COMPLEX_S8_KEYWORD 285 |
#define | COMPLEX_S16_KEYWORD 286 |
#define | BOOL_AND 287 |
#define | BOOL_OR 288 |
#define | BOOL_NOT 289 |
#define | SINGLE 290 |
#define | DOUBLE 291 |
#define | PRECISION 292 |
#define | CHARACTER 293 |
#define | DOLLAR_VARIABLE 294 |
#define | ASSIGN_MODIFY 295 |
#define | UNOP_INTRINSIC 296 |
#define | BINOP_INTRINSIC 297 |
#define | UNOP_OR_BINOP_INTRINSIC 298 |
#define | UNOP_OR_BINOP_OR_TERNOP_INTRINSIC 299 |
#define | ABOVE_COMMA 300 |
#define | EQUAL 301 |
#define | NOTEQUAL 302 |
#define | LESSTHAN 303 |
#define | GREATERTHAN 304 |
#define | LEQ 305 |
#define | GEQ 306 |
#define | LSH 307 |
#define | RSH 308 |
#define | STARSTAR 309 |
#define | UNARY 310 |
#define | f_exp_YYSTYPE_IS_TRIVIAL 1 |
#define | f_exp_YYSTYPE_IS_DECLARED 1 |
#define | YYPTRDIFF_T long |
#define | YYPTRDIFF_MAXIMUM LONG_MAX |
#define | YYSIZE_T unsigned |
#define | YYSIZE_MAXIMUM |
#define | YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) |
#define | YY_(Msgid) Msgid |
#define | YY_ATTRIBUTE_PURE |
#define | YY_ATTRIBUTE_UNUSED |
#define | YY_USE(E) ((void) (E)) |
#define | YY_INITIAL_VALUE(Value) Value |
#define | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
#define | YY_IGNORE_MAYBE_UNINITIALIZED_END |
#define | YY_IGNORE_USELESS_CAST_BEGIN |
#define | YY_IGNORE_USELESS_CAST_END |
#define | YY_ASSERT(E) ((void) (0 && (E))) |
#define | YYSTACK_ALLOC YYMALLOC |
#define | YYSTACK_FREE YYFREE |
#define | YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define | YYMALLOC xmalloc |
#define | YYFREE xfree |
#define | YYSTACK_GAP_MAXIMUM (YYSIZEOF (union f_exp_yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY_NEEDED 1 |
#define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
#define | YYCOPY(Dst, Src, Count) |
#define | YYFINAL 69 |
#define | YYLAST 924 |
#define | YYNTOKENS 72 |
#define | YYNNTS 20 |
#define | YYNRULES 113 |
#define | YYNSTATES 184 |
#define | YYMAXUTOK 310 |
#define | YYTRANSLATE(YYX) |
#define | YY_ACCESSING_SYMBOL(State) YY_CAST (f_exp_yysymbol_kind_t, yystos[State]) |
#define | YYPACT_NINF (-103) |
#define | yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) |
#define | YYTABLE_NINF (-1) |
#define | yytable_value_is_error(Yyn) 0 |
#define | yyerrok (yyerrstatus = 0) |
#define | yyclearin (yychar = YYEMPTY) |
#define | YYACCEPT goto yyacceptlab |
#define | YYABORT goto yyabortlab |
#define | YYERROR goto yyerrorlab |
#define | YYNOMEM goto yyexhaustedlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYERRCODE YYUNDEF |
#define | YYDPRINTF(Args) |
#define | YY_SYMBOL_PRINT(Title, Kind, Value, Location) |
#define | YY_STACK_PRINT(Bottom, Top) |
#define | YY_REDUCE_PRINT(Rule) |
#define | YYINITDEPTH 200 |
#define | YYMAXDEPTH 10000 |
#define | YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
#define | GROWBY_MIN_SIZE 64 /* Minimum amount to grow buffer by */ |
#define | CHECKBUF(size) |
Typedefs | |
typedef enum yytokentype | yytoken_kind_t |
typedef union f_exp_YYSTYPE | f_exp_YYSTYPE |
typedef enum f_exp_yysymbol_kind_t | f_exp_yysymbol_kind_t |
typedef signed char | yytype_int8 |
typedef short | yytype_int16 |
typedef unsigned char | yytype_uint8 |
typedef unsigned short | yytype_uint16 |
typedef yytype_uint8 | yy_state_t |
typedef int | yy_state_fast_t |
Functions | |
int | yyparse (void) |
static int | yylex (void) |
static void | yyerror (const char *) |
static void | growbuf_by_size (int) |
static int | match_string_literal (void) |
static void | push_kind_type (LONGEST val, struct type *type) |
static struct type * | convert_to_kind_type (struct type *basetype, int kind) |
static void | wrap_unop_intrinsic (exp_opcode opcode) |
static void | wrap_binop_intrinsic (exp_opcode opcode) |
static void | wrap_ternop_intrinsic (exp_opcode opcode) |
template<typename T > | |
static void | fortran_wrap2_kind (type *base_type) |
template<typename T > | |
static void | fortran_wrap3_kind (type *base_type) |
static int | parse_number (struct parser_state *, const char *, int, int, f_exp_YYSTYPE *) |
void * | xmalloc (YYSIZE_T) |
void | xfree (void *) |
static const char * | yysymbol_name (f_exp_yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED |
static void | yy_symbol_value_print (FILE *yyo, f_exp_yysymbol_kind_t yykind, f_exp_YYSTYPE const *const yyvaluep) |
static void | yy_symbol_print (FILE *yyo, f_exp_yysymbol_kind_t yykind, f_exp_YYSTYPE const *const yyvaluep) |
static void | yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) |
static void | yy_reduce_print (yy_state_t *yyssp, f_exp_YYSTYPE *yyvsp, int yyrule) |
static void | yydestruct (const char *yymsg, f_exp_yysymbol_kind_t yykind, f_exp_YYSTYPE *yyvaluep) |
Variables | |
static struct parser_state * | pstate = NULL |
static int | paren_depth |
static struct type_stack * | type_stack |
int | yydebug |
f_exp_YYSTYPE | yylval |
static const yytype_int8 | yytranslate [] |
static const yytype_int16 | yyrline [] |
static const char *const | yytname [] |
static const yytype_int16 | yypact [] |
static const yytype_int8 | yydefact [] |
static const yytype_int8 | yypgoto [] |
static const yytype_uint8 | yydefgoto [] |
static const yytype_uint8 | yytable [] |
static const yytype_int16 | yycheck [] |
static const yytype_int8 | yystos [] |
static const yytype_int8 | yyr1 [] |
static const yytype_int8 | yyr2 [] |
int | yychar |
int | yynerrs |
static const struct f_token | fortran_operators [] |
static const struct f77_boolean_val | boolean_values [] |
static const struct f_token | f_intrinsics [] |
static const f_token | f_keywords [] |
static char * | tempbuf |
static int | tempbufsize |
static int | tempbufindex |
static bool | saw_name_at_eof |
static bool | last_was_structop |
#define CHECKBUF | ( | size | ) |
Definition at line 3227 of file f-exp.c.
Referenced by match_string_literal().
#define ERROR 268 |
Definition at line 244 of file f-exp.c.
Referenced by parse_number(), and yylex().
#define FLOAT 259 |
Definition at line 235 of file f-exp.c.
Referenced by parse_number().
#define GROWBY_MIN_SIZE 64 /* Minimum amount to grow buffer by */ |
Definition at line 3225 of file f-exp.c.
Referenced by growbuf_by_size().
#define INT 258 |
Definition at line 234 of file f-exp.c.
Referenced by parse_number(), and yylex().
#define parse_f_type | ( | ps | ) | builtin_f_type (ps->gdbarch ()) |
Definition at line 86 of file f-exp.c.
Referenced by convert_to_kind_type(), parse_number(), wrap_binop_intrinsic(), wrap_ternop_intrinsic(), and yyparse().
#define parse_type | ( | ps | ) | builtin_type (ps->gdbarch ()) |
Definition at line 85 of file f-exp.c.
Referenced by parse_number().
#define SINGLE 290 |
Definition at line 266 of file f-exp.c.
Referenced by print_converted_chars_to_obstack().
#define STRING_LITERAL 260 |
Definition at line 236 of file f-exp.c.
Referenced by match_string_literal().
#define YY_ACCESSING_SYMBOL | ( | State | ) | YY_CAST (f_exp_yysymbol_kind_t, yystos[State]) |
Accessing symbol of state STATE.
Definition at line 842 of file f-exp.c.
Referenced by yy_reduce_print(), and yyparse().
#define YY_ASSERT | ( | E | ) | ((void) (0 && (E))) |
#define YY_CAST | ( | Type, | |
Val ) ((Type) (Val)) |
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
Definition at line 611 of file f-exp.c.
Referenced by yy_symbol_value_print(), yydestruct(), and yyparse().
#define YY_IGNORE_MAYBE_UNINITIALIZED_END |
Definition at line 612 of file f-exp.c.
Referenced by yy_symbol_value_print(), yydestruct(), and yyparse().
#define YY_IGNORE_USELESS_CAST_BEGIN |
#define YY_REDUCE_PRINT | ( | Rule | ) |
#define YY_STACK_PRINT | ( | Bottom, | |
Top ) |
#define YY_SYMBOL_PRINT | ( | Title, | |
Kind, | |||
Value, | |||
Location ) |
Definition at line 1264 of file f-exp.c.
Referenced by yydestruct(), and yyparse().
#define YY_USE | ( | E | ) | ((void) (E)) |
Definition at line 588 of file f-exp.c.
Referenced by yy_symbol_value_print(), and yydestruct().
#define YYBACKUP | ( | Token, | |
Value ) |
#define YYCOPY | ( | Dst, | |
Src, | |||
Count ) |
#define YYDPRINTF | ( | Args | ) |
#define YYNOMEM goto yyexhaustedlab |
#define YYNTOKENS 72 |
Definition at line 765 of file f-exp.c.
Referenced by yy_symbol_print(), and yyparse().
#define yypact_value_is_default | ( | Yyn | ) | ((Yyn) == YYPACT_NINF) |
#define YYSIZE_MAXIMUM |
#define YYSIZEOF | ( | X | ) | YY_CAST (YYPTRDIFF_T, sizeof (X)) |
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define YYSTACK_BYTES | ( | N | ) |
#define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union f_exp_yyalloc) - 1) |
#define YYSTACK_RELOCATE | ( | Stack_alloc, | |
Stack ) |
Definition at line 726 of file f-exp.c.
Referenced by yyparse().
#define yytable_value_is_error | ( | Yyn | ) | 0 |
#define YYTRANSLATE | ( | YYX | ) |
typedef enum f_exp_yysymbol_kind_t f_exp_yysymbol_kind_t |
typedef int yy_state_fast_t |
typedef yytype_uint8 yy_state_t |
typedef enum yytokentype yytoken_kind_t |
typedef short yytype_int16 |
typedef signed char yytype_int8 |
typedef unsigned short yytype_uint16 |
typedef unsigned char yytype_uint8 |
enum yytokentype |
Definition at line 3052 of file f-exp.c.
References parse_f_type, pstate, and TYPE_SAFE_NAME.
Referenced by fortran_wrap2_kind(), fortran_wrap3_kind(), wrap_ternop_intrinsic(), and yyparse().
Definition at line 2834 of file f-exp.c.
References convert_to_kind_type(), EVAL_AVOID_SIDE_EFFECTS, expr_builder::expout, parser_state::pop(), pstate, parser_state::push_new(), f_exp_YYSTYPE::val, and value_as_long().
Definition at line 2854 of file f-exp.c.
References convert_to_kind_type(), EVAL_AVOID_SIDE_EFFECTS, expr_builder::expout, parser_state::pop(), pstate, parser_state::push_new(), f_exp_YYSTYPE::val, and value_as_long().
|
static |
Definition at line 3240 of file f-exp.c.
References GROWBY_MIN_SIZE, tempbuf, tempbufsize, xmalloc(), and xrealloc().
|
static |
Definition at line 3262 of file f-exp.c.
References CHECKBUF, stoken::length, parser_state::lexptr, pstate, stoken::ptr, STRING_LITERAL, f_exp_YYSTYPE::sval, tempbuf, tempbufindex, and yylval.
Referenced by yylex().
|
static |
Definition at line 2876 of file f-exp.c.
References ERROR, FLOAT, expr_builder::gdbarch(), gdbarch_int_bit(), gdbarch_long_bit(), input_radix, INT, parse_f_type, parse_float(), parse_type, pstate, RANGE_CHECK, range_error(), f_exp_YYSTYPE::type, f_exp_YYSTYPE::typed_val, f_exp_YYSTYPE::typed_val_float, f_exp_YYSTYPE::val, and xfree().
|
static |
Definition at line 3025 of file f-exp.c.
References type::is_unsigned(), type_stack::push(), tp_kind, and f_exp_YYSTYPE::val.
Referenced by yyparse().
|
static |
Definition at line 2747 of file f-exp.c.
References code, parse_f_type, parser_state::pop(), pstate, parser_state::push_new(), and parser_state::wrap2().
Referenced by yyparse().
|
static |
Definition at line 2792 of file f-exp.c.
References code, convert_to_kind_type(), EVAL_AVOID_SIDE_EFFECTS, expr_builder::expout, parse_f_type, parser_state::pop(), pstate, parser_state::push_new(), f_exp_YYSTYPE::val, and value_as_long().
Referenced by yyparse().
|
static |
Definition at line 2700 of file f-exp.c.
References code, parser_state::pop(), pstate, parser_state::push_new(), and parser_state::wrap().
Referenced by yyparse().
void xfree | ( | void * | ) |
Referenced by parse_number(), and yyparse().
void * xmalloc | ( | YYSIZE_T | ) |
Referenced by growbuf_by_size(), and yyparse().
|
static |
Definition at line 1338 of file f-exp.c.
References YY_ACCESSING_SYMBOL, yy_symbol_print(), YYFPRINTF, yyr2, yyrline, yyrule, yyssp, and yyvsp.
|
static |
|
static |
Definition at line 1299 of file f-exp.c.
References yy_symbol_value_print(), YYFPRINTF, YYNTOKENS, and yysymbol_name().
Referenced by yy_reduce_print().
|
static |
Definition at line 1281 of file f-exp.c.
References YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, and YY_USE.
Referenced by yy_symbol_print().
|
static |
Definition at line 1400 of file f-exp.c.
References YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_SYMBOL_PRINT, and YY_USE.
Referenced by yyparse().
|
static |
Definition at line 3624 of file f-exp.c.
References parser_state::lexptr, parser_state::prev_lexptr, and pstate.
|
static |
Definition at line 3303 of file f-exp.c.
References symbol::aclass(), BOOLEAN_LITERAL, boolean_values, parser_state::comma_terminates, COMPLETE, copy_name(), DOLLAR_VARIABLE, ERROR, parser_state::expression_context_block, f_intrinsics, f_keywords, fortran_operators, expr_builder::gdbarch(), input_radix, INT, symtoken::is_a_field_of_this, expr_builder::language(), general_symbol_info::language(), language_fortran, language_lookup_primitive_type(), last_was_structop, stoken::length, parser_state::lexptr, LOC_TYPEDEF, lookup_symbol(), f_exp_YYSTYPE::lval, match_string_literal(), MODULE_DOMAIN, NAME, NAME_OR_INT, f_exp_YYSTYPE::opcode, paren_depth, parser_state::parse_completion, parse_number(), parser_state::prev_lexptr, pstate, stoken::ptr, saw_name_at_eof, f_exp_YYSTYPE::ssym, STRUCT_DOMAIN, f_exp_YYSTYPE::sval, symtoken::sym, block_symbol::symbol, token, keyword::token, f_exp_YYSTYPE::tsym, ttype::type, symbol::type(), TYPENAME, VAR_DOMAIN, and yylval.
Referenced by yyparse().
int yyparse | ( | void | ) |
Definition at line 1430 of file f-exp.c.
References parser_state::arglist_len, check_typedef(), convert_to_kind_type(), copy_name(), create_array_type(), create_static_range_type(), parser_state::end_arglist(), lookup_function_type(), lookup_lvalue_reference_type(), lookup_pointer_type(), parser_state::mark_struct_expression(), name, parse_f_type, parse_number(), parser_state::pop(), type_stack::pop(), type_stack::pop_int(), parser_state::pop_vector(), pstate, stoken::ptr, type_stack::push(), parser_state::push(), parser_state::push_dollar(), push_kind_type(), parser_state::push_new(), parser_state::push_symbol(), RANGE_HAS_STRIDE, RANGE_HIGH_BOUND_DEFAULT, RANGE_LOW_BOUND_DEFAULT, RANGE_STANDARD, parser_state::start_arglist(), tp_array, tp_end, tp_function, tp_kind, tp_pointer, tp_reference, f_exp_YYSTYPE::type, f_exp_YYSTYPE::typed_val, f_exp_YYSTYPE::val, parser_state::wrap(), parser_state::wrap2(), wrap_binop_intrinsic(), wrap_ternop_intrinsic(), wrap_unop_intrinsic(), xfree(), xmalloc(), xrealloc(), YY_, YY_ACCESSING_SYMBOL, YY_ASSERT, YY_CAST, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_IGNORE_USELESS_CAST_BEGIN, YY_IGNORE_USELESS_CAST_END, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yychar, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, YYerror, YYERROR, yyerror, YYFINAL, YYINITDEPTH, YYLAST, yylen, yylex(), yylhs, yylloc, yylval, YYMAXDEPTH, yynerrs, YYNOMEM, YYNSTATES, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, YYPTRDIFF_T, yyr1, yyr2, YYSIZE_T, YYSIZEOF, yyss, f_exp_yyalloc::yyss_alloc, yyssp, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystacksize, yystate, YYSYMBOL_YYEMPTY, YYSYMBOL_YYEOF, YYSYMBOL_YYerror, yytable, yytable_value_is_error, YYTRANSLATE, YYUNDEF, yyval, yyvs, f_exp_yyalloc::yyvs_alloc, and yyvsp.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 96 of file f-exp.c.
Referenced by convert_to_kind_type(), fortran_wrap2_kind(), fortran_wrap3_kind(), match_string_literal(), parse_number(), wrap_binop_intrinsic(), wrap_ternop_intrinsic(), wrap_unop_intrinsic(), yyerror(), yylex(), and yyparse().
|
static |
Definition at line 3221 of file f-exp.c.
Referenced by growbuf_by_size(), and match_string_literal().
|
static |
Definition at line 3223 of file f-exp.c.
Referenced by match_string_literal(), and yylex().
|
static |
Definition at line 3222 of file f-exp.c.
Referenced by growbuf_by_size(), and yylex().
|
static |
|
static |
Definition at line 918 of file f-exp.c.
Referenced by yyparse().
|
static |
f_exp_YYSTYPE yylval |
Definition at line 1418 of file f-exp.c.
Referenced by match_string_literal(), yylex(), and yyparse().
|
static |
Definition at line 892 of file f-exp.c.
Referenced by yyparse().
|
static |
|
static |
Definition at line 1178 of file f-exp.c.
Referenced by yyparse().
|
static |
Definition at line 1195 of file f-exp.c.
Referenced by yy_reduce_print(), and yyparse().
|
static |
Definition at line 824 of file f-exp.c.
Referenced by yy_reduce_print().
|
static |
|
static |
|
static |
Definition at line 851 of file f-exp.c.
Referenced by yysymbol_name().
|
static |