1.1 --- a/scanner.l Sat Dec 29 17:45:43 2001 +0000 1.2 +++ b/scanner.l Sat Dec 29 18:59:47 2001 +0000 1.3 @@ -1,8 +1,13 @@ 1.4 +/* 1.5 +$Id: scanner.l,v 1.6 2001/12/29 10:59:33 eric Exp $ 1.6 +*/ 1.7 + 1.8 %option case-insensitive 1.9 1.10 %{ 1.11 #include "parser.tab.h" 1.12 -}% 1.13 +%} 1.14 + 1.15 1.16 digit [0-9] 1.17 alpha [a-zA-Z] 1.18 @@ -12,7 +17,7 @@ 1.19 \.\. { return (ELIPSIS); } 1.20 1.21 {digit}+ { yylval.integer = atoi (yytext); return (INTEGER); } 1.22 -{digit}+.{digit}* { yylval.float = atof (yytext); return (FLOAT); } 1.23 +{digit}+.{digit}* { yylval.fp = atof (yytext); return (FLOAT); } 1.24 1.25 a { yylval.size.width = 8.5 * 25.4; 1.26 yylval.size.height = 11.0 * 25.4; 1.27 @@ -50,7 +55,7 @@ 1.28 rotate { return (ROTATE); } 1.29 size { return (SIZE); } 1.30 1.31 -\".*\" { yylval.string = newstr (yytext); return (STRING); } 1.32 +\".*\" { yylval.string = strdup (yytext); return (STRING); } 1.33 1.34 [ \t\n]+ /* whitespace */ 1.35 1.36 @@ -58,3 +63,4 @@ 1.37 1.38 . { printf( "Unrecognized character: %s\n", yytext ); } 1.39 1.40 +%%