1. A method in a computer environment for analyzing a regular tree pattern, the computer environment comprising at least one computer processor and computer-readable memory, the method comprising: receiving data comprising a regular tree pattern comprising each of at least one sequence and at least one set; determining a first machine corresponding to the at least one sequence; determining a second machine corresponding to the at least one set; creating a union of the first and second machines; determining a set of labeled acceptance states for the union of the machines; determining from the labeled acceptance states a sub-type relationship for the first and second machine; determining a root level machine comprising at least one transition to a labeled nest; creating a module corresponding to the labeled nest; placing a continuation state corresponding to the return of the labeled nest onto a stack; performing actions corresponding to the labeled nest; and when reaching an acceptance state for the labeled nest, popping the continuation state from the stack and resuming processing for the root level machine.
1. A method in a computer environment for analyzing a regular tree pattern, the computer environment comprising at least one computer processor and computer-readable memory, the method comprising: receiving data comprising a regular tree pattern comprising each of at least one sequence and at least one set; determining a first machine corresponding to the at least one sequence; determining a second machine corresponding to the at least one set; creating a union of the first and second machines; determining a set of labeled acceptance states for the union of the machines; determining from the labeled acceptance states a sub-type relationship for the first and second machine; determining a root level machine comprising at least one transition to a labeled nest; creating a module corresponding to the labeled nest; placing a continuation state corresponding to the return of the labeled nest onto a stack; performing actions corresponding to the labeled nest; and when reaching an acceptance state for the labeled nest, popping the continuation state from the stack and resuming processing for the root level machine. 2. The method of claim 1 wherein the received data corresponds to data defining structural types in a programming language.