You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
waf_old/demos/bisonflex/calc.l

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; };
%%