/[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.12 by akim, Wed Jun 19 08:22:49 2002 UTC revision 1.13 by akim, Thu Jun 20 07:19:13 2002 UTC
# Line 324  blanks   [ \t\f]+ Line 324  blanks   [ \t\f]+
324      if (c > 255)      if (c > 255)
325        {        {
326          LOCATION_PRINT (stderr, *yylloc);          LOCATION_PRINT (stderr, *yylloc);
327          fprintf (stderr, ": invalid escape: %s\n", yytext);          fprintf (stderr, ": invalid escape: %s\n", quote (yytext));
328          YY_STEP;          YY_STEP;
329        }        }
330      else      else
# Line 343  blanks   [ \t\f]+ Line 343  blanks   [ \t\f]+
343    \\t   obstack_1grow (&string_obstack, '\t');    \\t   obstack_1grow (&string_obstack, '\t');
344    \\v   obstack_1grow (&string_obstack, '\v');    \\v   obstack_1grow (&string_obstack, '\v');
345    \\[\\""]   obstack_1grow (&string_obstack, yytext[1]);    \\[\\""]   obstack_1grow (&string_obstack, yytext[1]);
346    \\.   {    \\(.|\n)      {
347      LOCATION_PRINT (stderr, *yylloc);      LOCATION_PRINT (stderr, *yylloc);
348      fprintf (stderr, ": unrecognized escape: %s\n", yytext);      fprintf (stderr, ": unrecognized escape: %s\n", quote (yytext));
349      YY_OBS_GROW;      YY_OBS_GROW;
350    }    }
351      /* FLex wants this rule, in case of a `\<<EOF>>'. */
352      \\                   YY_OBS_GROW;
353  }  }
354    
355    
# Line 364  blanks   [ \t\f]+ Line 366  blanks   [ \t\f]+
366      yy_pop_state ();      yy_pop_state ();
367    }    }
368    
369    [^\[\]\'\n\r\\]      YY_OBS_GROW;    [^\[\]\'\n\r\\]+     YY_OBS_GROW;
370    \\.                  YY_OBS_GROW;    \\(.|\n)             YY_OBS_GROW;
371      /* FLex wants this rule, in case of a `\<<EOF>>'. */
372      \\                   YY_OBS_GROW;
373    
374    {eols}               YY_OBS_GROW; YY_LINES;    {eols}               YY_OBS_GROW; YY_LINES;
375    
# Line 392  blanks   [ \t\f]+ Line 396  blanks   [ \t\f]+
396    }    }
397    
398    [^\[\]\"\n\r\\]+      YY_OBS_GROW;    [^\[\]\"\n\r\\]+      YY_OBS_GROW;
399    \\.                   YY_OBS_GROW;    \\(.|\n)              YY_OBS_GROW;
400      /* FLex wants this rule, in case of a `\<<EOF>>'. */
401      \\                   YY_OBS_GROW;
402    
403    {eols}                YY_OBS_GROW; YY_LINES;    {eols}                YY_OBS_GROW; YY_LINES;
404    
# Line 420  blanks   [ \t\f]+ Line 426  blanks   [ \t\f]+
426    /* Comments. */    /* Comments. */
427    "/*"        YY_OBS_GROW; yy_push_state (SC_COMMENT);    "/*"        YY_OBS_GROW; yy_push_state (SC_COMMENT);
428    "//".*      YY_OBS_GROW;    "//".*      YY_OBS_GROW;
429    
430      /* Not comments. */
431      "/"         YY_OBS_GROW;
432  }  }
433    
434    
# Line 479  blanks   [ \t\f]+ Line 488  blanks   [ \t\f]+
488      return PROLOGUE;      return PROLOGUE;
489    }    }
490    
491    [^%\[\]/\'\"\n\r]+      YY_OBS_GROW;    [^%\[\]/\'\"\n\r]+ YY_OBS_GROW;
492    "%"+[^%\}\n\r]+ YY_OBS_GROW;    "%"                YY_OBS_GROW;
493    {eols}          YY_OBS_GROW; YY_LINES;    {eols}             YY_OBS_GROW; YY_LINES;
494    
495    <<EOF>> {    <<EOF>> {
496      LOCATION_PRINT (stderr, *yylloc);      LOCATION_PRINT (stderr, *yylloc);
# Line 491  blanks   [ \t\f]+ Line 500  blanks   [ \t\f]+
500      yylval->string = last_string;      yylval->string = last_string;
501      return PROLOGUE;      return PROLOGUE;
502    }    }
   
503  }  }
504    
505    
# Line 546  handle_action_dollar (char *cp, location Line 554  handle_action_dollar (char *cp, location
554          type_name = symbol_list_n_type_name_get (current_rule, location, 0);          type_name = symbol_list_n_type_name_get (current_rule, location, 0);
555        if (!type_name && typed)        if (!type_name && typed)
556          complain_at (location, _("$$ of `%s' has no declared type"),          complain_at (location, _("$$ of `%s' has no declared type"),
557                       current_rule->sym->tag);                       symbol_tag_get (current_rule->sym));
558        if (!type_name)        if (!type_name)
559          type_name = "";          type_name = "";
560        obstack_fgrow1 (&string_obstack,        obstack_fgrow1 (&string_obstack,
# Line 570  handle_action_dollar (char *cp, location Line 578  handle_action_dollar (char *cp, location
578                                                       n);                                                       n);
579            if (!type_name && typed)            if (!type_name && typed)
580              complain_at (location, _("$%d of `%s' has no declared type"),              complain_at (location, _("$%d of `%s' has no declared type"),
581                        n, current_rule->sym->tag);                        n, symbol_tag_get (current_rule->sym));
582            if (!type_name)            if (!type_name)
583              type_name = "";              type_name = "";
584            obstack_fgrow3 (&string_obstack,            obstack_fgrow3 (&string_obstack,

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

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