/* YACC parser for Pascal expressions, for GDB.
- Copyright (C) 2000-2018 Free Software Foundation, Inc.
+ Copyright (C) 2000-2019 Free Software Foundation, Inc.
This file is part of GDB.
/* Special type cases, put in to allow the parser to distinguish different
legal basetypes. */
-%token <voidval> VARIABLE
+%token <voidval> DOLLAR_VARIABLE
/* Object pascal */
exp : variable
;
-exp : VARIABLE
+exp : DOLLAR_VARIABLE
/* Already written by write_dollar_variable.
Handle current_type. */
{ if (intvar) {
{
int c;
int namelen;
- unsigned int i;
const char *tokstart;
char *uptokstart;
const char *tokptr;
/* See if it is a special token of length 3. */
if (explen > 2)
- for (i = 0; i < sizeof (tokentab3) / sizeof (tokentab3[0]); i++)
+ for (int i = 0; i < sizeof (tokentab3) / sizeof (tokentab3[0]); i++)
if (strncasecmp (tokstart, tokentab3[i].oper, 3) == 0
&& (!isalpha (tokentab3[i].oper[0]) || explen == 3
|| (!isalpha (tokstart[3])
/* See if it is a special token of length 2. */
if (explen > 1)
- for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
+ for (int i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
if (strncasecmp (tokstart, tokentab2[i].oper, 2) == 0
&& (!isalpha (tokentab2[i].oper[0]) || explen == 2
|| (!isalpha (tokstart[2])
tmp[namelen] = '\0';
intvar = lookup_only_internalvar (tmp + 1);
free (uptokstart);
- return VARIABLE;
+ return DOLLAR_VARIABLE;
}
/* Use token-type BLOCKNAME for symbols that happen to be defined as
/* second chance uppercased (as Free Pascal does). */
if (!sym && is_a_field_of_this.type == NULL && !is_a_field)
{
- for (i = 0; i <= namelen; i++)
+ for (int i = 0; i <= namelen; i++)
{
if ((tmp[i] >= 'a' && tmp[i] <= 'z'))
tmp[i] -= ('a'-'A');
/* Third chance Capitalized (as GPC does). */
if (!sym && is_a_field_of_this.type == NULL && !is_a_field)
{
- for (i = 0; i <= namelen; i++)
+ for (int i = 0; i <= namelen; i++)
{
if (i == 0)
{