Commit e0b1c206 by Eric Blake Committed by Eric Blake

re PR java/5902 (Gcj fails to parse float)

2002-03-11  Eric Blake  <ebb9@email.byu.edu>

	* lex.c: Adjust comments to GNU standards.

2002-03-11  Eric Blake  <ebb9@email.byu.edu>

	Fix for PR java/5902:
	* lex.c (java_lex): Fix parsing of literals.

From-SVN: r50630
parent 44d3eb5b
2002-03-11 Eric Blake <ebb9@email.byu.edu>
* lex.c: Adjust comments to GNU standards.
2002-03-11 Eric Blake <ebb9@email.byu.edu>
Fix for PR java/5902:
* lex.c (java_lex): Fix parsing of literals.
2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* parse.y (patch_assignment): Wrap the right-hand-side with a save_expr * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
......
/* Language lexer for the GNU compiler for the Java(TM) language. /* Language lexer for the GNU compiler for the Java(TM) language.
Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
This file is part of GNU CC. This file is part of GNU CC.
...@@ -38,7 +38,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ ...@@ -38,7 +38,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "flags.h" #include "flags.h"
#include "chartables.h" #include "chartables.h"
/* Function declaration */ /* Function declarations. */
static char *java_sprint_unicode PARAMS ((struct java_line *, int)); static char *java_sprint_unicode PARAMS ((struct java_line *, int));
static void java_unicode_2_utf8 PARAMS ((unicode_t)); static void java_unicode_2_utf8 PARAMS ((unicode_t));
static void java_lex_error PARAMS ((const char *, int)); static void java_lex_error PARAMS ((const char *, int));
...@@ -191,7 +191,7 @@ java_allocate_new_line () ...@@ -191,7 +191,7 @@ java_allocate_new_line ()
free (ctxp->p_line); free (ctxp->p_line);
} }
ctxp->p_line = ctxp->c_line; ctxp->p_line = ctxp->c_line;
ctxp->c_line = NULL; /* Reallocated */ ctxp->c_line = NULL; /* Reallocated. */
} }
if (!ctxp->c_line) if (!ctxp->c_line)
...@@ -669,7 +669,7 @@ java_parse_end_comment (c) ...@@ -669,7 +669,7 @@ java_parse_end_comment (c)
return; return;
case '/': case '/':
return; return;
case '*': /* reparse only '*' */ case '*': /* Reparse only '*'. */
java_unget_unicode (); java_unget_unicode ();
} }
} }
...@@ -705,9 +705,9 @@ java_parse_doc_section (c) ...@@ -705,9 +705,9 @@ java_parse_doc_section (c)
java_lex_error ("Comment not terminated at end of input", 0); java_lex_error ("Comment not terminated at end of input", 0);
if (seen_star && (c == '/')) if (seen_star && (c == '/'))
return 1; /* Goto step1 in caller */ return 1; /* Goto step1 in caller. */
/* We're parsing @deprecated */ /* We're parsing `@deprecated'. */
if (valid_tag && (c == '@')) if (valid_tag && (c == '@'))
{ {
char tag [11]; char tag [11];
...@@ -910,7 +910,7 @@ java_lex (java_lval) ...@@ -910,7 +910,7 @@ java_lex (java_lval)
/* Translation of the Unicode escape in the raw stream of Unicode /* Translation of the Unicode escape in the raw stream of Unicode
characters. Takes care of line terminator. */ characters. Takes care of line terminator. */
step1: step1:
/* Skip white spaces: SP, TAB and FF or ULT */ /* Skip white spaces: SP, TAB and FF or ULT. */
for (c = java_get_unicode (); for (c = java_get_unicode ();
c == '\n' || JAVA_WHITE_SPACE_P (c); c = java_get_unicode ()) c == '\n' || JAVA_WHITE_SPACE_P (c); c = java_get_unicode ())
if (c == '\n') if (c == '\n')
...@@ -921,14 +921,15 @@ java_lex (java_lval) ...@@ -921,14 +921,15 @@ java_lex (java_lval)
ctxp->elc.col = (ctxp->elc.col < 0 ? 0 : ctxp->elc.col); ctxp->elc.col = (ctxp->elc.col < 0 ? 0 : ctxp->elc.col);
if (c == 0x1a) /* CTRL-Z */ if (c == 0x1a) /* CTRL-Z. */
{ {
if ((c = java_get_unicode ()) == UEOF) if ((c = java_get_unicode ()) == UEOF)
return 0; /* Ok here */ return 0; /* Ok here. */
else else
java_unget_unicode (); /* Caught later, at the end of the function */ java_unget_unicode (); /* Caught later, at the end of the
function. */
} }
/* Handle EOF here */ /* Handle EOF here. */
if (c == UEOF) /* Should probably do something here... */ if (c == UEOF) /* Should probably do something here... */
return 0; return 0;
...@@ -959,7 +960,7 @@ java_lex (java_lval) ...@@ -959,7 +960,7 @@ java_lex (java_lval)
if ((c = java_get_unicode ()) == '*') if ((c = java_get_unicode ()) == '*')
{ {
if ((c = java_get_unicode ()) == '/') if ((c = java_get_unicode ()) == '/')
goto step1; /* Empy documentation comment */ goto step1; /* Empty documentation comment. */
else if (java_parse_doc_section (c)) else if (java_parse_doc_section (c))
goto step1; goto step1;
} }
...@@ -980,24 +981,24 @@ java_lex (java_lval) ...@@ -980,24 +981,24 @@ java_lex (java_lval)
if (ctxp->elc.col < 0) if (ctxp->elc.col < 0)
abort (); abort ();
/* Numeric literals */ /* Numeric literals. */
if (JAVA_ASCII_DIGIT (c) || (c == '.')) if (JAVA_ASCII_DIGIT (c) || (c == '.'))
{ {
/* This section of code is borrowed from gcc/c-lex.c */ /* This section of code is borrowed from gcc/c-lex.c. */
#define TOTAL_PARTS ((HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR) * 2 + 2) #define TOTAL_PARTS ((HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR) * 2 + 2)
int parts[TOTAL_PARTS]; int parts[TOTAL_PARTS];
HOST_WIDE_INT high, low; HOST_WIDE_INT high, low;
/* End borrowed section */ /* End borrowed section. */
char literal_token [256]; char literal_token [256];
int literal_index = 0, radix = 10, long_suffix = 0, overflow = 0, bytes; int literal_index = 0, radix = 10, long_suffix = 0, overflow = 0, bytes;
int found_hex_digits = 0; int found_hex_digits = 0, found_non_octal_digits = 0;
int i; int i;
#ifndef JC1_LITE #ifndef JC1_LITE
int number_beginning = ctxp->c_line->current; int number_beginning = ctxp->c_line->current;
tree value; tree value;
#endif #endif
/* We might have a . separator instead of a FP like .[0-9]* */ /* We might have a . separator instead of a FP like .[0-9]*. */
if (c == '.') if (c == '.')
{ {
unicode_t peep = java_sneak_unicode (); unicode_t peep = java_sneak_unicode ();
...@@ -1030,7 +1031,7 @@ java_lex (java_lval) ...@@ -1030,7 +1031,7 @@ java_lex (java_lval)
} }
else else
{ {
/* We have a zero literal: 0, 0{f,F}, 0{d,D} */ /* We have a zero literal: 0, 0{l,L}, 0{f,F}, 0{d,D}. */
JAVA_LEX_LIT ("0", 10); JAVA_LEX_LIT ("0", 10);
switch (c) switch (c)
{ {
...@@ -1052,21 +1053,23 @@ java_lex (java_lval) ...@@ -1052,21 +1053,23 @@ java_lex (java_lval)
} }
/* Parse the first part of the literal, until we find something /* Parse the first part of the literal, until we find something
which is not a number. */ which is not a number. */
while ((radix == 10 && JAVA_ASCII_DIGIT (c)) || while ((radix == 16 && JAVA_ASCII_HEXDIGIT (c)) ||
(radix == 16 && JAVA_ASCII_HEXDIGIT (c)) || JAVA_ASCII_DIGIT (c))
(radix == 8 && JAVA_ASCII_OCTDIGIT (c)))
{ {
/* We store in a string (in case it turns out to be a FP) and in /* We store in a string (in case it turns out to be a FP) and in
PARTS if we have to process a integer literal. */ PARTS if we have to process a integer literal. */
int numeric = hex_value (c); int numeric = hex_value (c);
int count; int count;
/* Remember when we find a valid hexadecimal digit */ /* Remember when we find a valid hexadecimal digit. */
if (radix == 16) if (radix == 16)
found_hex_digits = 1; found_hex_digits = 1;
/* Remember when we find an invalid octal digit. */
else if (radix == 8 && !JAVA_ASCII_OCTDIGIT (c))
found_non_octal_digits = 1;
literal_token [literal_index++] = c; literal_token [literal_index++] = c;
/* This section of code if borrowed from gcc/c-lex.c */ /* This section of code if borrowed from gcc/c-lex.c. */
for (count = 0; count < TOTAL_PARTS; count++) for (count = 0; count < TOTAL_PARTS; count++)
{ {
parts[count] *= radix; parts[count] *= radix;
...@@ -1118,9 +1121,10 @@ java_lex (java_lval) ...@@ -1118,9 +1121,10 @@ java_lex (java_lval)
{ {
if (stage < 2) if (stage < 2)
{ {
/* {E,e} must have seen at list a digit */ /* {E,e} must have seen at least a digit. */
if (!seen_digit) if (!seen_digit)
java_lex_error ("Invalid FP literal", 0); java_lex_error
("Invalid FP literal, mantissa must have digit", 0);
seen_digit = 0; seen_digit = 0;
seen_exponent = 1; seen_exponent = 1;
stage = 2; stage = 2;
...@@ -1133,7 +1137,7 @@ java_lex (java_lval) ...@@ -1133,7 +1137,7 @@ java_lex (java_lval)
if ( c == 'f' || c == 'F' || c == 'd' || c == 'D') if ( c == 'f' || c == 'F' || c == 'd' || c == 'D')
{ {
fflag = ((c == 'd') || (c == 'D')) ? 0 : 1; fflag = ((c == 'd') || (c == 'D')) ? 0 : 1;
stage = 4; /* So we fall through */ stage = 4; /* So we fall through. */
} }
if ((c=='-' || c =='+') && stage == 2) if ((c=='-' || c =='+') && stage == 2)
...@@ -1158,12 +1162,13 @@ java_lex (java_lval) ...@@ -1158,12 +1162,13 @@ java_lex (java_lval)
#ifndef JC1_LITE #ifndef JC1_LITE
struct jpa_args a; struct jpa_args a;
#endif #endif
if (stage != 4) /* Don't push back fF/dD */ if (stage != 4) /* Don't push back fF/dD. */
java_unget_unicode (); java_unget_unicode ();
/* An exponent (if any) must have seen a digit. */ /* An exponent (if any) must have seen a digit. */
if (seen_exponent && !seen_digit) if (seen_exponent && !seen_digit)
java_lex_error ("Invalid FP literal", 0); java_lex_error
("Invalid FP literal, exponent must have digit", 0);
literal_token [literal_index] = '\0'; literal_token [literal_index] = '\0';
JAVA_LEX_LIT (literal_token, radix); JAVA_LEX_LIT (literal_token, radix);
...@@ -1182,21 +1187,16 @@ java_lex (java_lval) ...@@ -1182,21 +1187,16 @@ java_lex (java_lval)
#endif #endif
} }
} }
} /* JAVA_ASCCI_FPCHAR (c) */ } /* JAVA_ASCII_FPCHAR (c) */
/* Here we get back to converting the integral literal. */
if (radix == 16 && ! found_hex_digits) if (radix == 16 && ! found_hex_digits)
java_lex_error java_lex_error
("0x must be followed by at least one hexadecimal digit", 0); ("0x must be followed by at least one hexadecimal digit", 0);
else if (radix == 8 && found_non_octal_digits)
/* Here we get back to converting the integral literal. */ java_lex_error ("Octal literal contains digit out of range", 0);
if (c == 'L' || c == 'l') else if (c == 'L' || c == 'l')
long_suffix = 1; long_suffix = 1;
else if (radix == 16 && JAVA_ASCII_LETTER (c))
java_lex_error ("Digit out of range in hexadecimal literal", 0);
else if (radix == 8 && JAVA_ASCII_DIGIT (c))
java_lex_error ("Digit out of range in octal literal", 0);
else if (radix == 16 && !literal_index)
java_lex_error ("No digit specified for hexadecimal literal", 0);
else else
java_unget_unicode (); java_unget_unicode ();
...@@ -1204,7 +1204,7 @@ java_lex (java_lval) ...@@ -1204,7 +1204,7 @@ java_lex (java_lval)
literal_token [literal_index] = '\0'; /* So JAVA_LEX_LIT is safe. */ literal_token [literal_index] = '\0'; /* So JAVA_LEX_LIT is safe. */
JAVA_LEX_LIT (literal_token, radix); JAVA_LEX_LIT (literal_token, radix);
#endif #endif
/* This section of code is borrowed from gcc/c-lex.c */ /* This section of code is borrowed from gcc/c-lex.c. */
if (!overflow) if (!overflow)
{ {
bytes = GET_TYPE_PRECISION (long_type_node); bytes = GET_TYPE_PRECISION (long_type_node);
...@@ -1225,12 +1225,12 @@ java_lex (java_lval) ...@@ -1225,12 +1225,12 @@ java_lex (java_lval)
} }
/* End borrowed section. */ /* End borrowed section. */
/* Range checking */ /* Range checking. */
if (long_suffix) if (long_suffix)
{ {
/* 9223372036854775808L is valid if operand of a '-'. Otherwise /* 9223372036854775808L is valid if operand of a '-'. Otherwise
9223372036854775807L is the biggest `long' literal that can be 9223372036854775807L is the biggest `long' literal that can be
expressed using a 10 radix. For other radixes, everything that expressed using a 10 radix. For other radices, everything that
fits withing 64 bits is OK. */ fits withing 64 bits is OK. */
int hb = (high >> 31); int hb = (high >> 31);
if (overflow || (hb && low && radix == 10) if (overflow || (hb && low && radix == 10)
...@@ -1241,7 +1241,7 @@ java_lex (java_lval) ...@@ -1241,7 +1241,7 @@ java_lex (java_lval)
{ {
/* 2147483648 is valid if operand of a '-'. Otherwise, /* 2147483648 is valid if operand of a '-'. Otherwise,
2147483647 is the biggest `int' literal that can be 2147483647 is the biggest `int' literal that can be
expressed using a 10 radix. For other radixes, everything expressed using a 10 radix. For other radices, everything
that fits within 32 bits is OK. As all literals are that fits within 32 bits is OK. As all literals are
signed, we sign extend here. */ signed, we sign extend here. */
int hb = (low >> 31) & 0x1; int hb = (low >> 31) & 0x1;
...@@ -1260,7 +1260,7 @@ java_lex (java_lval) ...@@ -1260,7 +1260,7 @@ java_lex (java_lval)
return INT_LIT_TK; return INT_LIT_TK;
} }
/* Character literals */ /* Character literals. */
if (c == '\'') if (c == '\'')
{ {
int char_lit; int char_lit;
...@@ -1281,14 +1281,14 @@ java_lex (java_lval) ...@@ -1281,14 +1281,14 @@ java_lex (java_lval)
java_lex_error ("Syntax error in character literal", 0); java_lex_error ("Syntax error in character literal", 0);
if (char_lit == JAVA_CHAR_ERROR) if (char_lit == JAVA_CHAR_ERROR)
char_lit = 0; /* We silently convert it to zero */ char_lit = 0; /* We silently convert it to zero. */
JAVA_LEX_CHAR_LIT (char_lit); JAVA_LEX_CHAR_LIT (char_lit);
SET_LVAL_NODE_TYPE (build_int_2 (char_lit, 0), char_type_node); SET_LVAL_NODE_TYPE (build_int_2 (char_lit, 0), char_type_node);
return CHAR_LIT_TK; return CHAR_LIT_TK;
} }
/* String literals */ /* String literals. */
if (c == '"') if (c == '"')
{ {
int no_error; int no_error;
...@@ -1306,9 +1306,9 @@ java_lex (java_lval) ...@@ -1306,9 +1306,9 @@ java_lex (java_lval)
} }
java_unicode_2_utf8 (c); java_unicode_2_utf8 (c);
} }
if (c == '\n' || c == UEOF) /* ULT */ if (c == '\n' || c == UEOF) /* ULT. */
{ {
lineno--; /* Refer to the line the terminator was seen */ lineno--; /* Refer to the line where the terminator was seen. */
java_lex_error ("String not terminated at end of line", 0); java_lex_error ("String not terminated at end of line", 0);
lineno++; lineno++;
} }
...@@ -1317,7 +1317,8 @@ java_lex (java_lval) ...@@ -1317,7 +1317,8 @@ java_lex (java_lval)
string = obstack_finish (&temporary_obstack); string = obstack_finish (&temporary_obstack);
#ifndef JC1_LITE #ifndef JC1_LITE
if (!no_error || (c != '"')) if (!no_error || (c != '"'))
java_lval->node = error_mark_node; /* Requires futher testing FIXME */ java_lval->node = error_mark_node; /* FIXME: Requires futher
testing. */
else else
java_lval->node = build_string (strlen (string), string); java_lval->node = build_string (strlen (string), string);
#endif #endif
...@@ -1325,7 +1326,7 @@ java_lex (java_lval) ...@@ -1325,7 +1326,7 @@ java_lex (java_lval)
return STRING_LIT_TK; return STRING_LIT_TK;
} }
/* Separator */ /* Separator. */
switch (c) switch (c)
{ {
case '(': case '(':
...@@ -1364,7 +1365,7 @@ java_lex (java_lval) ...@@ -1364,7 +1365,7 @@ java_lex (java_lval)
/* return DOT_TK; */ /* return DOT_TK; */
} }
/* Operators */ /* Operators. */
switch (c) switch (c)
{ {
case '=': case '=':
...@@ -1544,7 +1545,7 @@ java_lex (java_lval) ...@@ -1544,7 +1545,7 @@ java_lex (java_lval)
BUILD_OPERATOR (NOT_TK); BUILD_OPERATOR (NOT_TK);
} }
/* Keyword, boolean literal or null literal */ /* Keyword, boolean literal or null literal. */
for (first_unicode = c, all_ascii = 1, ascii_index = 0; for (first_unicode = c, all_ascii = 1, ascii_index = 0;
JAVA_PART_CHAR_P (c); c = java_get_unicode ()) JAVA_PART_CHAR_P (c); c = java_get_unicode ())
{ {
...@@ -1600,7 +1601,7 @@ java_lex (java_lval) ...@@ -1600,7 +1601,7 @@ java_lex (java_lval)
SET_LVAL_NODE (char_type_node); SET_LVAL_NODE (char_type_node);
return INTEGRAL_TK; return INTEGRAL_TK;
/* Keyword based literals */ /* Keyword based literals. */
case TRUE_TK: case TRUE_TK:
case FALSE_TK: case FALSE_TK:
SET_LVAL_NODE ((kw->token == TRUE_TK ? SET_LVAL_NODE ((kw->token == TRUE_TK ?
...@@ -1611,7 +1612,7 @@ java_lex (java_lval) ...@@ -1611,7 +1612,7 @@ java_lex (java_lval)
return NULL_TK; return NULL_TK;
/* Some keyword we want to retain information on the location /* Some keyword we want to retain information on the location
they where found */ they where found. */
case CASE_TK: case CASE_TK:
case DEFAULT_TK: case DEFAULT_TK:
case SUPER_TK: case SUPER_TK:
...@@ -1631,7 +1632,7 @@ java_lex (java_lval) ...@@ -1631,7 +1632,7 @@ java_lex (java_lval)
} }
} }
/* We may have an ID here */ /* We may have an ID here. */
if (JAVA_START_CHAR_P (first_unicode)) if (JAVA_START_CHAR_P (first_unicode))
{ {
JAVA_LEX_ID (string); JAVA_LEX_ID (string);
...@@ -1639,7 +1640,7 @@ java_lex (java_lval) ...@@ -1639,7 +1640,7 @@ java_lex (java_lval)
return ID_TK; return ID_TK;
} }
/* Everything else is an invalid character in the input */ /* Everything else is an invalid character in the input. */
{ {
char lex_error_buffer [128]; char lex_error_buffer [128];
sprintf (lex_error_buffer, "Invalid character `%s' in input", sprintf (lex_error_buffer, "Invalid character `%s' in input",
...@@ -1693,7 +1694,7 @@ java_unicode_2_utf8 (unicode) ...@@ -1693,7 +1694,7 @@ java_unicode_2_utf8 (unicode)
obstack_1grow (&temporary_obstack, obstack_1grow (&temporary_obstack,
(unsigned char)(0x80 | (unicode & 0x3f))); (unsigned char)(0x80 | (unicode & 0x3f)));
} }
else /* Range 0x800-0xffff */ else /* Range 0x800-0xffff. */
{ {
obstack_1grow (&temporary_obstack, obstack_1grow (&temporary_obstack,
(unsigned char)(0xe0 | (unicode & 0xf000) >> 12)); (unsigned char)(0xe0 | (unicode & 0xf000) >> 12));
...@@ -1725,7 +1726,7 @@ java_lex_error (msg, forward) ...@@ -1725,7 +1726,7 @@ java_lex_error (msg, forward)
ctxp->elc.line = ctxp->c_line->lineno; ctxp->elc.line = ctxp->c_line->lineno;
ctxp->elc.col = ctxp->c_line->char_col-1+forward; ctxp->elc.col = ctxp->c_line->char_col-1+forward;
/* Might be caught in the middle of some error report */ /* Might be caught in the middle of some error report. */
ctxp->java_error_flag = 0; ctxp->java_error_flag = 0;
java_error (NULL); java_error (NULL);
java_error (msg); java_error (msg);
...@@ -1763,10 +1764,10 @@ java_get_line_col (filename, line, col) ...@@ -1763,10 +1764,10 @@ java_get_line_col (filename, line, col)
return 0; return 0;
#else #else
/* Dumb implementation. Doesn't try to cache or optimize things. */ /* Dumb implementation. Doesn't try to cache or optimize things. */
/* First line of the file is line 1, first column is 1 */ /* First line of the file is line 1, first column is 1. */
/* COL == -1 means, at the CR/LF in LINE */ /* COL == -1 means, at the CR/LF in LINE. */
/* COL == -2 means, at the first non space char in LINE */ /* COL == -2 means, at the first non space char in LINE. */
FILE *fp; FILE *fp;
int c, ccol, cline = 1; int c, ccol, cline = 1;
...@@ -1790,7 +1791,7 @@ java_get_line_col (filename, line, col) ...@@ -1790,7 +1791,7 @@ java_get_line_col (filename, line, col)
cline++; cline++;
} }
/* Gather the chars of the current line in a buffer */ /* Gather the chars of the current line in a buffer. */
for (;;) for (;;)
{ {
c = getc (fp); c = getc (fp);
...@@ -1815,11 +1816,11 @@ java_get_line_col (filename, line, col) ...@@ -1815,11 +1816,11 @@ java_get_line_col (filename, line, col)
else else
first_non_space = 0; first_non_space = 0;
/* Place the '^' a the right position */ /* Place the '^' a the right position. */
base = obstack_base (&temporary_obstack); base = obstack_base (&temporary_obstack);
for (ccol = 1; ccol <= col+3; ccol++) for (ccol = 1; ccol <= col+3; ccol++)
{ {
/* Compute \t when reaching first_non_space */ /* Compute \t when reaching first_non_space. */
char c = (first_non_space ? char c = (first_non_space ?
(base [ccol-1] == '\t' ? '\t' : ' ') : ' '); (base [ccol-1] == '\t' ? '\t' : ' ') : ' ');
obstack_1grow (&temporary_obstack, c); obstack_1grow (&temporary_obstack, c);
...@@ -1984,8 +1985,7 @@ cxx_keyword_p (name, length) ...@@ -1984,8 +1985,7 @@ cxx_keyword_p (name, length)
if (r == 0) if (r == 0)
{ {
int i; int i;
/* We've found a match if all the remaining characters are /* We've found a match if all the remaining characters are `$'. */
`$'. */
for (i = min_length; i < length && name[i] == '$'; ++i) for (i = min_length; i < length && name[i] == '$'; ++i)
; ;
if (i == length) if (i == length)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment