scanner.l

Fri, 28 Dec 2001 04:44:05 +0000

author
eric
date
Fri, 28 Dec 2001 04:44:05 +0000
changeset 5
9eb47d44dab9
child 7
e1f52aa9f252
permissions
-rw-r--r--

Initial revision

eric@5 1 %option case-insensitive
eric@5 2
eric@5 3 /*
eric@5 4 %{
eric@5 5 #include "parser.tab.h"
eric@5 6 }%
eric@5 7 */
eric@5 8
eric@5 9 digit [0-9]
eric@5 10 alpha [a-zA-Z]
eric@5 11
eric@5 12 %%
eric@5 13
eric@5 14 {digit}+ { yylval.integer = atoi (yytext); return (INTEGER); }
eric@5 15
eric@5 16 all { return (ALL); }
eric@5 17 bookmark { return (BOOKMARK); }
eric@5 18 crop { return (CROP); }
eric@5 19 even { return (EVEN); }
eric@5 20 file { return (FILE); }
eric@5 21 image { return (IMAGE); }
eric@5 22 input { return (INPUT); }
eric@5 23 odd { return (ODD); }
eric@5 24 output { return (OUTPUT); }
eric@5 25 page { return (PAGE); }
eric@5 26 rotate { return (ROTATE); }
eric@5 27 size { return (SIZE); }
eric@5 28
eric@5 29 \".*\" { yylval.string = newstr (yytext); return (STRING); }