Re: Lexing requires execution (was Re: Will _anything_ be able to

2004-11-29 Thread Adam Kennedy
It's quite a disappointment in some ways, but we've lived with it in Perl 5, and I'm sure we can live with it in Perl 6. And I still think Perl 6 will have fewer cases in which it's completely impossible for not-Perl to parse it. Unfortunately, fewer still implies some, and some is still a pro

Re: Lexing requires execution (was Re: Will _anything_ be able to

2004-11-29 Thread Damian Conway
Adam Kennedy wrote: Frankly, as the only person who has managed to get together a "guessing lexer" that is sufficiently accurate to be something other than useless, Hm. I must confess that I don't consider Text::Balanced's C subroutine to be entirely useless. And presumably neither do the th

Lexing requires execution (was Re: Will _anything_ be able to truly parse and understand perl?)

2004-11-26 Thread Randal L. Schwartz
> "Luke" == Luke Palmer <[EMAIL PROTECTED]> writes: Luke> But you don't really need to parse to syntax highlight, either. You Luke> just need to tokenize. Unfortunately, to tokenize, you also have to know the state of the parse. As long as / is both "divide" and "begin regex", you're toasted

Re: Lexing requires execution (was Re: Will _anything_ be able to truly parse and understand perl?)

2004-11-26 Thread Matthew Walton
Randal L. Schwartz wrote: "Luke" == Luke Palmer <[EMAIL PROTECTED]> writes: Luke> But you don't really need to parse to syntax highlight, either. You Luke> just need to tokenize. Unfortunately, to tokenize, you also have to know the state of the parse. As long as / is both "divide" and "begin reg

Re: Lexing requires execution (was Re: Will _anything_ be able to truly parse and understand perl?)

2004-11-26 Thread Randal L. Schwartz
> "Matthew" == Matthew Walton <[EMAIL PROTECTED]> writes: Matthew> So you're saying that in Perl 6 it will be entirely impossible to Matthew> determine if / appears as the division operator or as the beginning of Matthew> a regex from a purely syntactic examination of the source code? Yes. M

Re: Lexing requires execution (was Re: Will _anything_ be able to truly parse and understand perl?)

2004-11-26 Thread Matthew Walton
Randal L. Schwartz wrote: "Matthew" == Matthew Walton <[EMAIL PROTECTED]> writes: Matthew> So you're saying that in Perl 6 it will be entirely impossible to Matthew> determine if / appears as the division operator or as the beginning of Matthew> a regex from a purely syntactic examination of the s

Re: Lexing requires execution (was Re: Will _anything_ be able to truly parse and understand perl?)

2004-11-26 Thread Randal L. Schwartz
> "Matthew" == Matthew Walton <[EMAIL PROTECTED]> writes: Matthew> Perl 6 has formal parameters for subs, methods etc. I don't see any Matthew> mention of Perl 5-style prototypes in S6, and I honestly can't see how Matthew> they could possibly fit with formal parameters. Hopefully Larry or Mat

Re: Lexing requires execution (was Re: Will _anything_ be able to truly parse and understand perl?)

2004-11-26 Thread Matthew Walton
Randal L. Schwartz wrote: "Matthew" == Matthew Walton <[EMAIL PROTECTED]> writes: Matthew> Perl 6 has formal parameters for subs, methods etc. I don't see any Matthew> mention of Perl 5-style prototypes in S6, and I honestly can't see how Matthew> they could possibly fit with formal parameters. Ho

Re: Lexing requires execution (was Re: Will _anything_ be able to truly parse and understand perl?)

2004-11-26 Thread James Mastros
Randal L. Schwartz wrote: All the handwaving in the world won't fix this. As long as we have dual-natured characters like /, and user-defined prototypes, Perl cannot be lexed without also parsing, and therefore without also running BEGIN blocks. And user-defined prototypes that change when the arg

Re: Lexing requires execution (was Re: Will _anything_ be able to truly parse and understand perl?)

2004-11-26 Thread Juerd
James Mastros skribis 2004-11-26 14:36 (+0100): > And user-defined prototypes that change when the argument list of a > function ends, that is. If we forced the argument list for all > functions to have parens (including empty parens for argument less > functions), then we'd be OK, I'm fairly c