HyriseSQLParser/lemon_example/flex_scanner.l

18 lines
307 B
Plaintext

%{
#include "lemon_parser.h"
#include <stdlib.h>
%}
%option reentrant
%option noyywrap
%%
[0-9]+|[0-9]+.[0-9]+ return NUMBER;
[+] return PLUS;
[\n] return NL;
[ \t] ; /* skip whitespace */
. {printf("Unknown character '%c'\n", yytext[0]); return 0;}
%%