Re: The external interface for the parser piece
[email protected] (Dan Sugalski) Tue, 28 Nov 2000 15:35:37 -0500
| Newsgroups | perl.perl6.internals.api.parser |
|---|---|
| Message-ID | <[email protected]> |
At 09:10 AM 11/28/00 -1000, Tim Jenness wrote: >On Mon, 27 Nov 2000, Dan Sugalski wrote: > > > --------------- > > > > int perl6_parse(PerlInterp *interp, > > void *source, > > int flags, > > void *extra_pointer); > > > > > The third parameter is the flags parameter, and it's optional. If omitted > > or set to PERL_CHAR_SOURCE, the second parameter is treated as a standard > > null-terminated string. If set to PERL_COUNTED_SOURCE, the second > parameter > > is treated as if it points to a stream of bytes, where the first four are > > the length of the source to be read followed by the source. If set to > >Since you have a fourth argument couldn't that be used for the length >of the byte stream rather than embedding that length into the byte stream >itself? Makes more sense to me to separate the bytes from the length. I'd rather the stream be self-contained, rather than needing an extra argument for the length. Counted strings aren't uncommon outside of C, and there's no reason a Fortran or COBOL (or Java, or...) program can't embed perl. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [email protected] have teddy bears and even teddy bears get drunk