public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/2412: jv-scan reports parse error
@ 2001-04-04 10:46 Alexandre Petit-Bianco
0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Petit-Bianco @ 2001-04-04 10:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/2412; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: tromey@redhat.com, Mika.Riekkinen@tellabs.com, gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: java/2412: jv-scan reports parse error
Date: Wed, 4 Apr 2001 10:36:04 -0700 (PDT)
Alexandre Petit-Bianco writes:
> I searched GNATS this afternoon but it was still broken. I'll keep an
> eye on it.
Well, it turns out that searching for strings in a PR doesn't work at
the moment, but searching using the state of the PRs as a key still
works.
The other jv-scan related PR we have is java/1074. I'm going to commit
the patch (trunk and branch) and close both PRs shortly.
./A
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: java/2412: jv-scan reports parse error
@ 2001-03-31 2:06 Alexandre Petit-Bianco
0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Petit-Bianco @ 2001-03-31 2:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/2412; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: tromey@redhat.com
Cc: Mika.Riekkinen@tellabs.com, gcc-gnats@gcc.gnu.org
Subject: Re: java/2412: jv-scan reports parse error
Date: Sat, 31 Mar 2001 01:57:46 -0800 (PST)
Tom Tromey writes:
> FYI, Alex: I believe this PR is a duplicate of another PR. If/when
> you check in the fix, don't forget to close the other one.
I searched GNATS this afternoon but it was still broken. I'll keep an
eye on it.
> I wish we had an automatic way of making sure the two parsers stayed
> in sync.
They do very different things and sometimes, it shows in their
grammar. But we could definitively do a better job than what we're
currently doing.
./A
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: java/2412: jv-scan reports parse error
@ 2001-03-30 16:16 Tom Tromey
0 siblings, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2001-03-30 16:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/2412; it has been noted by GNATS.
From: Tom Tromey <tromey@redhat.com>
To: Mika.Riekkinen@tellabs.com
Cc: gcc-gnats@gcc.gnu.org, Alexandre Petit-Bianco <apbianco@cygnus.com>
Subject: Re: java/2412: jv-scan reports parse error
Date: 30 Mar 2001 17:14:25 -0700
FYI, Alex: I believe this PR is a duplicate of another PR.
If/when you check in the fix, don't forget to close the other one.
I wish we had an automatic way of making sure the two parsers stayed
in sync.
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: java/2412: jv-scan reports parse error
@ 2001-03-30 14:56 Alexandre Petit-Bianco
0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Petit-Bianco @ 2001-03-30 14:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/2412; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: Mika.Riekkinen@tellabs.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: java/2412: jv-scan reports parse error
Date: Fri, 30 Mar 2001 14:46:06 -0800 (PST)
Mika.Riekkinen@tellabs.com writes:
> jv-scan reports parse error on the following code.
Thanks. Here's a patch that fixes the problem. I also wrote a patch to
take care of the other jv-scan related parse errors reported by `make
check.'
I intend to check this in pretty soon, in the branch and in the trunk.
./A
2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse-scan.y (array_type:): Rewritten.
(type_declaration:): `empty_statement' replaces `SC_TK.'
(class_member_declaration:): `empty statement' added.
(method_body:): Simplified.
(static_initializer:): Likewise.
(primary_no_new_array:): Use `type_literals.'
(type_literals:): New rule.
(dims:): Set and update `bracket_count.'
Fixes PR java/2412.
Index: parse-scan.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse-scan.y,v
retrieving revision 1.20
diff -u -p -r1.20 parse-scan.y
--- parse-scan.y 2000/11/20 22:56:14 1.20
+++ parse-scan.y 2001/03/30 21:56:13
@@ -242,14 +243,15 @@ interface_type:
;
array_type:
- primitive_type OSB_TK CSB_TK
-| name OSB_TK CSB_TK
+ primitive_type dims
{
- $$ = concat ("[", $1, NULL);
+ while (bracket_count-- > 0)
+ $$ = concat ("[", $1, NULL);
}
-| array_type OSB_TK CSB_TK
- {
- $$ = concat ("[", $1, NULL);
+| name dims
+ {
+ while (bracket_count-- > 0)
+ $$ = concat ("[", $1, NULL);
}
;
@@ -316,7 +318,7 @@ type_import_on_demand_declaration:
type_declaration:
class_declaration
| interface_declaration
-| SC_TK
+| empty_statement
;
/* 19.7 Shortened from the original:
@@ -393,6 +395,7 @@ class_member_declaration:
| method_declaration
| class_declaration /* Added, JDK1.1 inner classes */
| interface_declaration /* Added, JDK1.1 inner classes */
+| empty_statement
;
/* 19.8.2 Productions from 8.3: Field Declarations */
@@ -513,14 +516,12 @@ class_type_list:
method_body:
block
-| block SC_TK
| SC_TK
;
/* 19.8.4 Productions from 8.5: Static Initializers */
static_initializer:
static block
-| static block SC_TK /* Shouldn't be here. FIXME */
;
static: /* Test lval.sub_token here */
@@ -892,14 +893,7 @@ primary_no_new_array:
| field_access
| method_invocation
| array_access
- /* type DOT_TK CLASS_TK doens't work. So we split the rule
- 'type' into its components. Missing is something for array,
- which will complete the reference_type part. FIXME */
-| name DOT_TK CLASS_TK /* Added, JDK1.1 class literals */
- { USE_ABSORBER; }
-| primitive_type DOT_TK CLASS_TK /* Added, JDK1.1 class literals */
- { USE_ABSORBER; }
-| VOID_TK DOT_TK CLASS_TK /* Added, JDK1.1 class literals */
+| type_literals
/* Added, JDK1.1 inner classes. Documentation is wrong
refering to a 'ClassName' (class_name) rule that doesn't
exist. Used name instead. */
@@ -907,6 +901,17 @@ primary_no_new_array:
{ USE_ABSORBER; }
;
+type_literals:
+ name DOT_TK CLASS_TK
+ { USE_ABSORBER; }
+| array_type DOT_TK CLASS_TK
+ { USE_ABSORBER; }
+| primitive_type DOT_TK CLASS_TK
+ { USE_ABSORBER; }
+| VOID_TK DOT_TK CLASS_TK
+ { USE_ABSORBER; }
+;
+
class_instance_creation_expression:
NEW_TK class_type OP_TK argument_list CP_TK
| NEW_TK class_type OP_TK CP_TK
@@ -960,7 +965,9 @@ dim_expr:
dims:
OSB_TK CSB_TK
+ { bracket_count = 1; }
| dims OSB_TK CSB_TK
+ { bracket_count++; }
;
field_access:
^ permalink raw reply [flat|nested] 5+ messages in thread
* java/2412: jv-scan reports parse error
@ 2001-03-28 3:56 Mika.Riekkinen
0 siblings, 0 replies; 5+ messages in thread
From: Mika.Riekkinen @ 2001-03-28 3:56 UTC (permalink / raw)
To: gcc-gnats
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-04-04 10:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-04 10:46 java/2412: jv-scan reports parse error Alexandre Petit-Bianco
-- strict thread matches above, loose matches on Subject: below --
2001-03-31 2:06 Alexandre Petit-Bianco
2001-03-30 16:16 Tom Tromey
2001-03-30 14:56 Alexandre Petit-Bianco
2001-03-28 3:56 Mika.Riekkinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).