On Wed, Dec 06, 2006 at 10:33:45PM -0800, Allison Randal wrote:
> >>>>- In PGE grammars, what is the "{ ... }" at the end of every
> >>>>proto declaration supposed to do?
> >>[...]
> >>>But in the end, I didn't allow simple semicolon terminators 
> >>>simply because it wasn't valid Perl 6 syntax, and in many cases I
> >>>think that having subtle differences isn't ideal as people may
> >>>get confused about what is allowed where.  But I don't have a
> >>>large objection to modifying the PGE::Grammar compiler to 
> >>>represent empty declarations with semicolons as well as 
> >>>yada-yada-yada blocks.
> >>Excellent.
> >
> >"Excellent" as in ...? 
> >   [ ]  "Go ahead and allow semicolons, since you don't have
> >        a large objection."
> >   [ ]  "Your explanation is excellent, stick with the yadas
> >         to avoid the subtle contrasts to Perl 6."
> 
> I prefer option (A), allowing semicolons. The tricky thing is that we're
> adopting syntax from one use case into another use case. The yadas make
> perfect sense in the context of a Perl 6 program (where the yada means
> that the code body will later be filled in), but they make no sense as
> part of a Parrot parser (where the yada can't be filled in, and is just
> an artifact).

IIUC, PGE's use of yada is actually the same use case as Perl 6.  
The yadas in Perl 6 can be stubs to be filled in later, but S03
and S06 indicate that yadas are also used as the body in 
function prototypes, i.e., where the function is actually to be
defined somewhere else.  To me that feels exactly like what we have
here -- the grammar file is prototyping operator functions 
that are defined somewhere else.  (And, for several of the existing 
compilers, they really *are* function prototypes, in that the function 
body comes from a PIR function.)

> Not an immediate priority, though. And, maybe Perl 6 will change and 
> solve the problem for us before we get there. ;)

Sounds good to me.  It's an easy switch to allow the semicolons
when/if we decide to do that.

Pm

Reply via email to