Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #39913] [BUG] TGE - Can't use } in the transform definitions.

4 views
Skip to first unread message

Will Coleda

unread,
Jul 23, 2006, 9:35:22 AM7/23/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Will Coleda
# Please include the string: [perl #39913]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39913 >


The TGE grammar doesn't deal with embedded }'s:

Valid grammars:

transform a (b) {
# do nothing
}

transform a (b) {
# do nothing {
}

Invalid:

transform a (b) {
# do nothing}
}

transform a (b) {
# do {nothing}
}

--
Will "Coke" Coleda
wi...@coleda.com


Patrick R. Michaud via RT

unread,
Nov 26, 2007, 11:40:13 AM11/26/07
to perl6-i...@perl.org
On Sun Jul 23 06:35:21 2006, coke wrote:
> The TGE grammar doesn't deal with embedded }'s:
>
> Invalid:
>
> transform a (b) {
> # do nothing}
> }
>
> transform a (b) {
> # do {nothing}
> }

If we still need this, I vote that tge transforms require the
closing brace to be at the beginning of a line (possibly preceded by
whitespace).

If we don't need this, I vote that we close the ticket.

FWIW, none of PGE, PCT, and NQP are using TGE.

Pm

Allison Randal

unread,
Nov 27, 2007, 1:10:15 PM11/27/07
to parrotbug...@parrotcode.org, perl6-i...@perl.org
Patrick R. Michaud via RT wrote:
> On Sun Jul 23 06:35:21 2006, coke wrote:
>> The TGE grammar doesn't deal with embedded }'s:
>>
>> Invalid:
>>
>> transform a (b) {
>> # do nothing}
>> }
>>
>> transform a (b) {
>> # do {nothing}
>> }
>
> If we still need this, I vote that tge transforms require the
> closing brace to be at the beginning of a line (possibly preceded by
> whitespace).

Won't work, because the body of a transform could be written in, say,
Perl 6, and so could have closing braces (at the beginning of a line
with or without preceding whitespace) in the body of the rule.

More likely is to change the parser so it accepts various different
delimiters:

transform a /b/do {nothing}/;

etc.

Allison

Patrick R. Michaud

unread,
Nov 27, 2007, 2:26:50 PM11/27/07
to Allison Randal, parrotbug...@parrotcode.org, perl6-i...@perl.org
On Tue, Nov 27, 2007 at 08:10:15PM +0200, Allison Randal wrote:
> Patrick R. Michaud via RT wrote:
> >On Sun Jul 23 06:35:21 2006, coke wrote:
> >>The TGE grammar doesn't deal with embedded }'s:
> >>
> >>Invalid:
> >>
> >>transform a (b) {
> >> # do nothing}
> >>}
> >>
> >>transform a (b) {
> >> # do {nothing}
> >>}
> >
> >If we still need this, I vote that tge transforms require the
> >closing brace to be at the beginning of a line (possibly preceded by
> >whitespace).
>
> Won't work, because the body of a transform could be written in, say,
> Perl 6, and so could have closing braces (at the beginning of a line
> with or without preceding whitespace) in the body of the rule.

Sorry I wasn't clear -- I was thinking we would use the
closing-brace-at-beginning-of-line primarily when the transform
had :language('PIR') .

Pm

James Keenan via RT

unread,
Jun 14, 2008, 9:38:12 PM6/14/08
to perl6-i...@perl.org
pmichaud, allison: Can we get an update on the status of this ticket?

Thank you very much.

kid51

0 new messages