static void write_ambiguous_var (struct parser_state *,
const struct block *, const char *, int);
-static struct type *type_int (struct parser_state *);
-
-static struct type *type_long (struct parser_state *);
-
-static struct type *type_long_long (struct parser_state *);
-
-static struct type *type_long_double (struct parser_state *);
-
static struct type *type_for_char (struct parser_state *, ULONGEST);
-static struct type *type_boolean (struct parser_state *);
-
static struct type *type_system_address (struct parser_state *);
static std::string find_completion_bounds (struct parser_state *);
;
primary : TRUEKEYWORD
- { write_int (pstate, 1, type_boolean (pstate)); }
+ {
+ write_int (pstate, 1,
+ parse_type (pstate)->builtin_bool);
+ }
| FALSEKEYWORD
- { write_int (pstate, 0, type_boolean (pstate)); }
+ {
+ write_int (pstate, 0,
+ parse_type (pstate)->builtin_bool);
+ }
;
primary : NEW NAME
if (next == renaming_expr)
goto BadEncoding;
renaming_expr = next;
- write_int (par_state, val, type_int (par_state));
+ write_int (par_state, val, parse_type (par_state)->builtin_int);
}
else
{
push_association<ada_name_association> (ada_pop ());
}
-static struct type *
-type_int (struct parser_state *par_state)
-{
- return parse_type (par_state)->builtin_int;
-}
-
-static struct type *
-type_long (struct parser_state *par_state)
-{
- return parse_type (par_state)->builtin_long;
-}
-
-static struct type *
-type_long_long (struct parser_state *par_state)
-{
- return parse_type (par_state)->builtin_long_long;
-}
-
-static struct type *
-type_long_double (struct parser_state *par_state)
-{
- return parse_type (par_state)->builtin_long_double;
-}
-
static struct type *
type_for_char (struct parser_state *par_state, ULONGEST value)
{
"wide_wide_character");
}
-static struct type *
-type_boolean (struct parser_state *par_state)
-{
- return parse_type (par_state)->builtin_bool;
-}
-
static struct type *
type_system_address (struct parser_state *par_state)
{
ULONGEST value = result.as_integer<ULONGEST> ();
if (fits_in_type (1, value, int_bits, true))
- yylval.typed_val.type = type_int (par_state);
+ yylval.typed_val.type = parse_type (par_state)->builtin_int;
else if (fits_in_type (1, value, long_bits, true))
- yylval.typed_val.type = type_long (par_state);
+ yylval.typed_val.type = parse_type (par_state)->builtin_long;
else if (fits_in_type (1, value, long_bits, false))
{
/* We have a number representable as an unsigned integer quantity.
return INT;
}
else if (fits_in_type (1, value, long_long_bits, true))
- yylval.typed_val.type = type_long_long (par_state);
+ yylval.typed_val.type = parse_type (par_state)->builtin_long_long;
else if (fits_in_type (1, value, long_long_bits, false))
{
yylval.typed_val.type
static int
processReal (struct parser_state *par_state, const char *num0)
{
- yylval.typed_val_float.type = type_long_double (par_state);
+ yylval.typed_val_float.type = parse_type (par_state)->builtin_long_double;
bool parsed = parse_float (num0, strlen (num0),
yylval.typed_val_float.type,