From dfc05da07a21bf91f5e6d5b242dd1dfc7c41e2bb Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Sun, 1 Apr 2012 22:55:30 +0000 Subject: Processed the Java demangling of array types. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@243 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 7 +++++++ src/format/mangling/java_gram.y | 6 +++++- src/format/mangling/java_tok.l | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4722097..db5cddf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 12-04-01 Cyrille Bagard + * 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 + * 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; } [/] { return SLASH; } [$] { return DOLLAR; } [;] { BEGIN(INITIAL); return SEMICOLON; } -- cgit v0.11.2-87-g4458