On Tue, Sep 14, 2004 at 12:42:59PM -0700, Larry Wall wrote: > : Of course, this is really language design -- Larry, you listening? > > Sure, I'm listening, but what's the point when I agree with everyone. :-) > > I agree that the default should be the current outer language. > I agree that the default ought to be overridable. > I agree that the right way to do that is with something like "use PIR;" > rather than inventing an inconsistent syntax.
This will likely betray some deep ignorance on my part (and this discussion may have taken place already elsewhere), but since I'm currently working on a rules syntax parser I'll barrel forth anyway: What should the mechanism be for the rule parser to figure out where a closure begins and ends within a rule expression? Does the rules parser have to call the outer language compiler directly? If so, does this imply that the rules parser has to be running in Parrot to be able to call the outer language compiler, or is there a way to do this from C? And does the outer language compiler have to have options that allow the caller to say: "hey, here's some program code with perhaps a bunch of rule-syntax stuff appended to it, could you just give me back the first complete 'closure unit' and oh, by the way, tell me how many characters you used to do it or give me the left-over string so I can continue parsing my stuff?" Or is there some syntactic shortcut that can be made to let us find the end of a closure without having to fully parse the closure itself? How does p5 do it? (And you can see why I've been willing to postpone true closures in rules just a bit longer until we got a p6 compiler started. :-) Pm