summaryrefslogtreecommitdiff
path: root/src/mangling/java_tok.l
blob: 4adf6234dfffbeaf8785da7e249700537251fc3f (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

%{

#include "java.h"
#include "libjavamangling_la-java_gram.h" 

%}


%option noyywrap
%option yylineno
%option nounput
%option noinput

%x string


%%

V                       { return V; }
Z                       { return Z; }
B                       { return B; }
S                       { return S; }
C                       { return C; }
I                       { return I; }
J                       { return J; }
F                       { return F; }
D                       { return D; }
L                       { BEGIN(string); return L; }
[[]*                    { java_lval.adeep = strlen(yytext); return ARRAY; }
<string>[/]             { return SLASH; }
<string>[$]             { return DOLLAR; }
<string>[;]             { BEGIN(INITIAL); return SEMICOLON; }

<string>[A-Za-z0-9]*    { java_lval.text = yytext; return TEXT; }

%%