};
DEF_ENUM_FLAGS_TYPE (enum token_flag, token_flags);
-struct token
+struct c_token
{
const char *oper;
int token;
token_flags flags;
};
-static const struct token tokentab3[] =
+static const struct c_token tokentab3[] =
{
{">>=", ASSIGN_MODIFY, BINOP_RSH, 0},
{"<<=", ASSIGN_MODIFY, BINOP_LSH, 0},
{"...", DOTDOTDOT, OP_NULL, 0}
};
-static const struct token tokentab2[] =
+static const struct c_token tokentab2[] =
{
{"+=", ASSIGN_MODIFY, BINOP_ADD, 0},
{"-=", ASSIGN_MODIFY, BINOP_SUB, 0},
multi-word type names (for example 'double' can appear in 'long
double') need to be listed here. type-specifiers that are only ever
single word (like 'char') are handled by the classify_name function. */
-static const struct token ident_tokens[] =
+static const struct c_token ident_tokens[] =
{
{"unsigned", UNSIGNED, OP_NULL, 0},
{"template", TEMPLATE, OP_NULL, FLAG_CXX},
return quote == '\'' ? CHARACTER_LITERAL : STRING_LITERAL;
}
-struct token
+struct d_token
{
const char *oper;
int token;
enum exp_opcode opcode;
};
-static const struct token tokentab3[] =
+static const struct d_token tokentab3[] =
{
{"^^=", ASSIGN_MODIFY, BINOP_EXP},
{"<<=", ASSIGN_MODIFY, BINOP_LSH},
{">>=", ASSIGN_MODIFY, BINOP_RSH},
};
-static const struct token tokentab2[] =
+static const struct d_token tokentab2[] =
{
{"+=", ASSIGN_MODIFY, BINOP_ADD},
{"-=", ASSIGN_MODIFY, BINOP_SUB},
};
/* Identifier-like tokens. */
-static const struct token ident_tokens[] =
+static const struct d_token ident_tokens[] =
{
{"is", IDENTITY, OP_NULL},
{"!is", NOTIDENTITY, OP_NULL},
return nullptr;
}
-struct token
+struct f_token
{
/* The string to match against. */
const char *oper;
/* List of Fortran operators. */
-static const struct token fortran_operators[] =
+static const struct f_token fortran_operators[] =
{
{ ".and.", BOOL_AND, OP_NULL, false },
{ ".or.", BOOL_OR, OP_NULL, false },
{ ".false.", 0 }
};
-static const struct token f_intrinsics[] =
+static const struct f_token f_intrinsics[] =
{
/* The following correspond to actual functions in Fortran and are case
insensitive. */
{ "sizeof", SIZEOF, OP_NULL, false },
};
-static const token f_keywords[] =
+static const f_token f_keywords[] =
{
/* Historically these have always been lowercase only in GDB. */
{ "character", CHARACTER, OP_NULL, true },
return quote == '\'' ? CHAR : STRING;
}
-struct token
+struct go_token
{
const char *oper;
int token;
enum exp_opcode opcode;
};
-static const struct token tokentab3[] =
+static const struct go_token tokentab3[] =
{
{">>=", ASSIGN_MODIFY, BINOP_RSH},
{"<<=", ASSIGN_MODIFY, BINOP_LSH},
{"...", DOTDOTDOT, OP_NULL},
};
-static const struct token tokentab2[] =
+static const struct go_token tokentab2[] =
{
{"+=", ASSIGN_MODIFY, BINOP_ADD},
{"-=", ASSIGN_MODIFY, BINOP_SUB},
};
/* Identifier-like tokens. */
-static const struct token ident_tokens[] =
+static const struct go_token ident_tokens[] =
{
{"true", TRUE_KEYWORD, OP_NULL},
{"false", FALSE_KEYWORD, OP_NULL},
}
}
-struct token
+struct p_token
{
const char *oper;
int token;
enum exp_opcode opcode;
};
-static const struct token tokentab3[] =
+static const struct p_token tokentab3[] =
{
{"shr", RSH, OP_NULL},
{"shl", LSH, OP_NULL},
{"xor", XOR, OP_NULL}
};
-static const struct token tokentab2[] =
+static const struct p_token tokentab2[] =
{
{"or", OR, OP_NULL},
{"<>", NOTEQUAL, OP_NULL},