>Given an AST how do I find out the corresponding rule? You put an action in that rule. Monty Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/