blob: 93dd39cc6f33e3ccf06356494632d02f462012f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
%{
#define excludeLexer
#include "LuaSL_LSL_tree.h"
%}
%option reentrant noyywrap never-interactive nounistd
%option bison-bridge
LPAREN "("
RPAREN ")"
PLUS "+"
MULTIPLY "*"
NUMBER [0-9]+
WS [ \r\n\t]*
%%
{WS} { /* Skip blanks. */ }
{NUMBER} { sscanf(yytext,"%d",&yylval->value); return TOKEN_NUMBER; }
{MULTIPLY} { return TOKEN_MULTIPLY; }
{PLUS} { return TOKEN_PLUS; }
{LPAREN} { return TOKEN_LPAREN; }
{RPAREN} { return TOKEN_RPAREN; }
. { }
%%
int XXyywrap()
{
#ifdef FLEX_SCANNER
#ifndef LL_WINDOWS
// get gcc to stop complaining about lack of use of yyunput
(void) yyunput;
(void) input;
#endif
#endif
return(1);
}
|