Uri, It's always the first question a program asks. "Can I have foo?" "Why?" I just figured I wouldn't bore anyone with it unless I was asked since I'm fairly certain I need a Perl AST to do what I want to do. I have a series of small Perl code snippets that are evaled in a known context. I also write new ones. I want to perform many different static checks to these pieces of code that will reduce bugs in my code base. The checks involve:
1) Ensuring that the arguments to certain functions are always within a predetermined set of literals. 2) Listing the free variables of the code and checking them against my eval environment. 3) Ensuring keys accessed from the environments hash are not dynamically created and fall within my fixed set of keys. 3.5) Listing those hash keys that were accessed. 4) Ensuring that values assigned to certain variables are litteral strings of a fixed set. 5) Ensuring that functions call from the code are within my environment. In short, I'm writing a pour-man's type checker since writing an actual type checker for Perl is likely impossible. I can afford the restrictions I have put on the code though, so for what I need, it'll work just fine. -mike On Thu, Jul 28, 2005 at 04:19:59PM -0400, Uri Guttman wrote: > but you haven't stated the reason you want this mythical parser. maybe > telling us that will help solve the real and deeper problem. :) > > uri _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

