summaryrefslogtreecommitdiff
path: root/src/format/mangling/java_tok.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/mangling/java_tok.l')
-rw-r--r--src/format/mangling/java_tok.l33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/format/mangling/java_tok.l b/src/format/mangling/java_tok.l
new file mode 100644
index 0000000..06777f9
--- /dev/null
+++ b/src/format/mangling/java_tok.l
@@ -0,0 +1,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; }
+
+%%