On Sun, Jul 03, 2005 at 11:08:56AM -0400, Will Coleda wrote:
> When I was compiling the rules, they weren't going where I thought
> they were going. This was because I stole code from compilers/pge/
> demo.pir improperly; there is a gname variable in there that's a PMC.
No, it's a string:
[EMAIL PROTECTED] pge]$ grep gname demo.pir
.local string gname
p6rule_compile($S2, gname, $S1)
print gname
gname = $P9
[EMAIL PROTECTED] pge]$
> (My clue was your sample, which was calling the p6rule_compile with a
> literal string to describe the parent grammar, not a PMC as in
> demo.pir).
>
> Of course, now I don't know why demo.pir works, but it does. =-)
Well, it works because (AFAICT) gname is in fact a string. :-)
Maybe there's something else bizarre going on here?
> >As a side note, it'd be nice if the code that demo.pir uses to read
> >in a perl6 rules file was part of PGE's interface.
I considered adding this at one point and then decided it might be
a little too much creeping featurism. But I can see how it'd be
very useful, so I'll see about re-incorporating it.
Pm