/[bison]/bison/src/scan-gram.l
ViewVC logotype

Diff of /bison/src/scan-gram.l

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.65 by eggert, Wed Oct 1 21:33:24 2003 UTC revision 1.66 by eggert, Tue Oct 7 07:32:57 2003 UTC
# Line 371  splice  (\\[ \f\t\v]*\n)* Line 371  splice  (\\[ \f\t\v]*\n)*
371      return STRING;      return STRING;
372    }    }
373    
374      \0        complain_at (*loc, _("invalid null character"));
375    .|\n      STRING_GROW;    .|\n      STRING_GROW;
376    <<EOF>>   unexpected_eof (token_start, "\""); BEGIN INITIAL;    <<EOF>>   unexpected_eof (token_start, "\""); BEGIN INITIAL;
377  }  }
# Line 397  splice  (\\[ \f\t\v]*\n)* Line 398  splice  (\\[ \f\t\v]*\n)*
398      return ID;      return ID;
399    }    }
400    
401      \0        complain_at (*loc, _("invalid null character"));
402    .|\n      STRING_GROW;    .|\n      STRING_GROW;
403    <<EOF>>   unexpected_eof (token_start, "'"); BEGIN INITIAL;    <<EOF>>   unexpected_eof (token_start, "'"); BEGIN INITIAL;
404  }  }
# Line 412  splice  (\\[ \f\t\v]*\n)* Line 414  splice  (\\[ \f\t\v]*\n)*
414      unsigned long c = strtoul (yytext + 1, 0, 8);      unsigned long c = strtoul (yytext + 1, 0, 8);
415      if (UCHAR_MAX < c)      if (UCHAR_MAX < c)
416        complain_at (*loc, _("invalid escape sequence: %s"), quote (yytext));        complain_at (*loc, _("invalid escape sequence: %s"), quote (yytext));
417        else if (! c)
418          complain_at (*loc, _("invalid null character: %s"), quote (yytext));
419      else      else
420        obstack_1grow (&obstack_for_string, c);        obstack_1grow (&obstack_for_string, c);
421    }    }
# Line 422  splice  (\\[ \f\t\v]*\n)* Line 426  splice  (\\[ \f\t\v]*\n)*
426      c = strtoul (yytext + 2, 0, 16);      c = strtoul (yytext + 2, 0, 16);
427      if (UCHAR_MAX < c || get_errno ())      if (UCHAR_MAX < c || get_errno ())
428        complain_at (*loc, _("invalid escape sequence: %s"), quote (yytext));        complain_at (*loc, _("invalid escape sequence: %s"), quote (yytext));
429        else if (! c)
430          complain_at (*loc, _("invalid null character: %s"), quote (yytext));
431      else      else
432        obstack_1grow (&obstack_for_string, c);        obstack_1grow (&obstack_for_string, c);
433    }    }
# Line 441  splice  (\\[ \f\t\v]*\n)* Line 447  splice  (\\[ \f\t\v]*\n)*
447      int c = convert_ucn_to_byte (yytext);      int c = convert_ucn_to_byte (yytext);
448      if (c < 0)      if (c < 0)
449        complain_at (*loc, _("invalid escape sequence: %s"), quote (yytext));        complain_at (*loc, _("invalid escape sequence: %s"), quote (yytext));
450        else if (! c)
451          complain_at (*loc, _("invalid null character: %s"), quote (yytext));
452      else      else
453        obstack_1grow (&obstack_for_string, c);        obstack_1grow (&obstack_for_string, c);
454    }    }

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.66

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26