mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-23 02:16:01 +01:00
14 lines
273 B
Plaintext
14 lines
273 B
Plaintext
%{
|
|
#define YYSTYPE double
|
|
#include "calc.tab.h"
|
|
extern YYSTYPE yylval;
|
|
%}
|
|
|
|
%%
|
|
[0-9]+\.?[0-9]* { yylval = atof( yytext ); return NUMBER; };
|
|
[ \t] ; /* ignore whitespace */
|
|
\n { return yytext[0]; };
|
|
. { return yytext[0]; }
|
|
<<EOF>> { printf("eof\n"); return 0; };
|
|
%%
|