scanner.l

changeset 27
7a28031fe457
parent 20
a1cd8cb9d09e
child 30
35fad7ec7732
     1.1 diff -r 4368c5fd9242 -r 7a28031fe457 scanner.l
     1.2 --- a/scanner.l	Tue Jan 01 03:44:40 2002 +0000
     1.3 +++ b/scanner.l	Tue Jan 01 03:46:08 2002 +0000
     1.4 @@ -1,5 +1,5 @@
     1.5  /*
     1.6 -$Id: scanner.l,v 1.11 2001/12/30 23:25:08 eric Exp $
     1.7 +$Id: scanner.l,v 1.12 2001/12/31 19:46:08 eric Exp $
     1.8  */
     1.9  
    1.10  %option case-insensitive
    1.11 @@ -54,11 +54,11 @@
    1.12  crop		{ return (CROP); }
    1.13  even		{ return (EVEN); }
    1.14  file		{ return (FILE_KEYWORD); }
    1.15 -format		{ return (FORMAT); }
    1.16  image		{ return (IMAGE); }
    1.17  images		{ return (IMAGES); }
    1.18  inch		{ return (INCH); }
    1.19  input		{ return (INPUT); }
    1.20 +label		{ return (LABEL); }
    1.21  landscape	{ return (LANDSCAPE); }
    1.22  odd		{ return (ODD); }
    1.23  output		{ return (OUTPUT); }
    1.24 @@ -69,7 +69,12 @@
    1.25  rotate		{ return (ROTATE); }
    1.26  size		{ return (SIZE); }
    1.27  
    1.28 -\"[^\n"]*\"		{ 
    1.29 +'[^\n']'	{
    1.30 +		  yylval.character = yytext [1];
    1.31 +		  return (CHARACTER);
    1.32 +		}
    1.33 +
    1.34 +\"[^\n"]*\"	{
    1.35                    int len = strlen (yytext) - 2;
    1.36                    yylval.string = malloc (len + 1);
    1.37                    memcpy (yylval.string, yytext + 1, len);