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

Re: Backtracking through the source

Thread Previous | Thread Next
Nicholas Clark
December 13, 2000 06:17
Re: Backtracking through the source
Message ID:
On Wed, Nov 29, 2000 at 03:33:16PM -0500, Dan Sugalski wrote:
> Good integration with source filters may well solve a large chunk of our 
> little language problem. They're a pain and a half to write now but if we 
> can get them easier to write that'd be a good thing. ('Specially if we can 
> manage to provide a set of tweakable filters--perhaps one Forth-ish, one 
> LISP-ish, and maybe one APL-ish for the UTF-8 enabled crowd...)

What, so I can set a source filter to (say) "match only on barewords
that are in locations where builtin keywords would be recognised?"

so for my script:

print <<print

only the first "print" gets passed to the source filter as a candidate?

or one could match on the strings inside //  ?
or on STDOUT that is a filehandle

[not the world's best example for what I'm trying to saw, which is that
currently I suspect any filter you want to write really has to cope
with parsing the entirety of perl to try to find the pattern you want
in the syntactic context you're interested in.]

Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About