develooper Front page | perl.perl6.language | Postings from June 2005

Parsing perl without Perl (sort of)

J Matisse Enzer
June 10, 2005 08:54
Parsing perl without Perl (sort of)
Message ID:
Adam Kennedy's new module PPI:

His module attempts to implement a parser that:
> ... creates a "round-trip" capability, parsing a file into an internal 
> model and back out again without moving a single white space character 
> out of place. Even if parts of a file are broken or badly formatted, 
> you can still change other parts of the file and save it correctly 
> without it changing anything you don't alter.
> Second, it makes the parser extremely safe and error-tolerant. Any 
> code open in an editor is there for a reason--generally because it 
> isn't finished yet, is broken, or needs changing. A document parser 
> can hit a problem, flag it, stumble for a character or so until it 
> finds something it recognizes, and then continue on.

I wonder if there are concepts in his implementation that have a 
bearing on Perl 6 design?

Matisse Enzer <>  -
415-225-6703 (work/cellphone)
415-401-8325 (home) Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About