Re: To get things started...
[email protected] (Benjamin Stuhl) Tue, 21 Nov 2000 10:18:07 -0800 (PST)
| Newsgroups | perl.perl6.internals.api.parser |
|---|---|
| Message-ID | <[email protected]> |
--- Dan Sugalski <[email protected]> wrote: > At 10:37 AM 11/21/00 +0000, David Grove wrote: > >Thanks for the clarifications, Simon. > > > >Simon Cozens <[email protected]> wrote: > >If we were simply feeding it perl with a single syntax, > we could get away > >with a "one call" scheme. But since we're dealing with > almost certainly > >mutually exclusive syntax and semantics, it probably > needs more > >information. > > But we are. The call is probably going to be something > like: > > status = parse_perl(perl_interpreter *my_interp, > char *script, > struct HIR *end_result, > long flags); Well, it would (IMHO) make more sense to have perl6_parse_script (I do tend to follow {subsystem,verb,object} naming...) take a PerlIO*, so that it is completely transparent parsing from a file or a string. This gets almost into embedding issues, though (how much of a libc does perl6 really need? perl5 now carries large chunks of one around with it). > the fact that the script has a "use pythonish;" in it is > entirely > irrelevant--the program calls into the parser, which > returns a status and > possibly a parsed representation of the program. The > parser gets to deal > with all the grotty details. > [snip] -- BKS __________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/