|
From: Hans-Bernhard B. <br...@ph...> - 2005-08-01 11:21:11
|
Ethan A Merritt wrote:
> Sure. But in this case the behavior of sscanf() or strtod() does not
> matter. parse_primary_expression() has:
> } else if (isanumber(c_token)) {
> } else if (isletter(c_token)) {
> } else
> So even if the code in scanner.c has previously identified this token as
> NaN or Inf, parse_primary_expression() will ignore that and instead
> try to find a variable with that name.
Not really. Note how isanumber() is implemented: it returns
!token[t_num].is_token
i.e. if NaN was found in the command line, this leaves it completely up
to the scanner whether to interpret that as a token (i.e. keyword or
variable) or as a number.
|