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

%{

#include "libjavamangling_la-java_gram.h" 

%}


%option noyywrap
%option yylineno

%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                       { printf("Got 'L'\n"); BEGIN(string); return L; }
<string>[/]             { printf("Got '/'\n"); return SLASH; }
<string>[$]             { printf("Got '$'\n"); return DOLLAR; }
<string>[;]             { BEGIN(INITIAL); return SEMICOLON; }

<string>[A-Za-z0-9]*    { java_lval.text = yytext; printf("Got text:'%s'\n", yytext); return TEXT; }

%%