summaryrefslogtreecommitdiff
path: root/src/format/mangling/dex/type_tok.l
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-10-01 10:04:22 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-10-01 10:04:22 (GMT)
commit9aa5b354e83825e2d9843aea742aa62221a2130b (patch)
treee4a352a51ea5dd60fb385cab961ca06606c9e743 /src/format/mangling/dex/type_tok.l
parent32f7a1126f8ac5a602f60a29de18eb7c5683dcc2 (diff)
Decoded mangled names in a way suitable for the DEX format.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@580 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/mangling/dex/type_tok.l')
-rw-r--r--src/format/mangling/dex/type_tok.l37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/format/mangling/dex/type_tok.l b/src/format/mangling/dex/type_tok.l
new file mode 100644
index 0000000..7b8a8d3
--- /dev/null
+++ b/src/format/mangling/dex/type_tok.l
@@ -0,0 +1,37 @@
+
+%{
+
+#include "context.h"
+#include "libformatmanglingdextype_la-type_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; }
+"["* { type_lval.adeep = strlen(yytext); return ARRAY; }
+<string>"/" { return SLASH; }
+<string>"$" { return DOLLAR; }
+<string>";" { BEGIN(INITIAL); return SEMICOLON; }
+
+<string>[A-Za-z0-9_-]* { type_lval.text = yytext; return TEXT; }
+
+
+%%