scanner.l

changeset 5
9eb47d44dab9
child 7
e1f52aa9f252
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/scanner.l	Fri Dec 28 04:44:05 2001 +0000
     1.3 @@ -0,0 +1,29 @@
     1.4 +%option case-insensitive
     1.5 +
     1.6 +/*
     1.7 +%{
     1.8 +#include "parser.tab.h"
     1.9 +}%
    1.10 +*/
    1.11 +
    1.12 +digit [0-9]
    1.13 +alpha [a-zA-Z]
    1.14 +
    1.15 +%%
    1.16 +
    1.17 +{digit}+	{ yylval.integer = atoi (yytext); return (INTEGER); }
    1.18 +
    1.19 +all		{ return (ALL); }
    1.20 +bookmark	{ return (BOOKMARK); }
    1.21 +crop		{ return (CROP); }
    1.22 +even		{ return (EVEN); }
    1.23 +file		{ return (FILE); }
    1.24 +image		{ return (IMAGE); }
    1.25 +input		{ return (INPUT); }
    1.26 +odd		{ return (ODD); }
    1.27 +output		{ return (OUTPUT); }
    1.28 +page		{ return (PAGE); }
    1.29 +rotate		{ return (ROTATE); }
    1.30 +size		{ return (SIZE); }
    1.31 +
    1.32 +\".*\"		{ yylval.string = newstr (yytext); return (STRING); }