summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/format/mangling/java_gram.y6
-rw-r--r--src/format/mangling/java_tok.l1
3 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4722097..db5cddf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
12-04-01 Cyrille Bagard <nocbos@gmail.com>
+ * src/format/mangling/java_gram.y:
+ * src/format/mangling/java_tok.l:
+ Process the Java demangling of array types and do not print '['
+ characters anymore.
+
+12-04-01 Cyrille Bagard <nocbos@gmail.com>
+
* po/fr.po:
* po/openida.pot:
* po/POTFILES.in:
diff --git a/src/format/mangling/java_gram.y b/src/format/mangling/java_gram.y
index 8b63c5f..25d5ffb 100644
--- a/src/format/mangling/java_gram.y
+++ b/src/format/mangling/java_gram.y
@@ -55,6 +55,8 @@ static void g_java_dcontext_init(GJavaDContext *);
void /*GOpenidaType*/ *type;
+ size_t adeep; /* Dimension d'un tableau */
+
char *text; /* Chaîne de caractères */
}
@@ -62,6 +64,7 @@ static void g_java_dcontext_init(GJavaDContext *);
%parse-param { GJavaDContext *context }
%token V Z B S C I J F D
+%token ARRAY
%token L SEMICOLON
%token SLASH DOLLAR
%token TEXT
@@ -102,7 +105,8 @@ type_descriptor:
;
field_type_descriptor:
- non_array_field_type_descriptor { $$ = $1; }
+ non_array_field_type_descriptor { $$ = $1; }
+ | ARRAY non_array_field_type_descriptor { $$ = $2; }
;
non_array_field_type_descriptor:
diff --git a/src/format/mangling/java_tok.l b/src/format/mangling/java_tok.l
index c19cd04..04180ac 100644
--- a/src/format/mangling/java_tok.l
+++ b/src/format/mangling/java_tok.l
@@ -24,6 +24,7 @@ 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; }