develooper Front page | perl.perl6.internals.api.parser | Postings from December 2000

Re: Now, to try again...

Thread Previous
From:
Dan Sugalski
Date:
December 17, 2000 12:59
Subject:
Re: Now, to try again...
Message ID:
5.0.1.4.0.20001217154140.02189090@24.8.96.48
At 11:58 AM 12/17/00 +0000, David Grove wrote:
>As the maker of such an editor, I wouldn't mind getting any help from perl
>that can be gotten in this area. It's not really the rules that are
>gotchas, but the exceptions to the rules. The elements that you mentioned
>(strings and regexen) are extremely difficult to find, especially in odd
>contexts like grep {/[^.]/} where there's no leading =~ or !~ and in s///
>where there's not a single ending but two, each with its own rules.
>
>I'm not sure this is a parser issue, at least not when it comes to the
>internal parsing of Perl for perl's sake.

Actually, it is. Making a syntax highlighting editor would be a lot easier 
if it hands:

   $foo = $bar + 12;

and gets back:

   $foo<scalar> =<assign> $bar<scalar> +<addition> 
12<constant>;<end-of-statement>

or something like it.

That's sort of what the parser will get you.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About