scanner.l

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