On Tue, Nov 21, 2000 at 07:36:11AM -0500, David Grove wrote:
> > 1) The API presented to the rest of the world. This is likely one call,
>
> These are almost two separate things entirely. (I don't get the "one call"
> thing. What do you mean?)
A parser does, essentially, one single thing: it takes text and turns it into
an op tree. That's the only call you need to make from an external
perspective.
> the external API needs to be flexible to handle perl in different writing
> styles
This doesn't need to be the case; the external API may be language-agnostic,
with the language rules set by internal calls.
> > * The parser needs to be reentrant
> No clue what this means. I need this defined in context.
While parsing text, you should be able to dive into a separate bit of text,
parse that, ("re-enter" the parser's routines) come out and carry on *exactly*
where you left off, without your state being lost.
> perl6 perl5 python tclish
> \ \ / /
> \ \ / /
> ---------------------------
> READSTDIN and other commons
> full tree here
> ---------------------------
> |
> | <- required
> |
> ---------------------------
> OPCODES
> ---------------------------
> / / \ \
> / / \ \
> run store exe a
> bc bc binary java thingy
I think you've just invented the compiler! :)
--
It's difficult to see the picture when you are inside the frame.