Methods for Recognizing Nested Terms