ometa L <: Parser { noun = "apple" | "ball" | "brick", pronoun = "he" | "she", subject = noun | pronoun, verb = "throw", adverb = "to" | "in", object = noun, complex = subject verb object adverb object -> "complex", simple = subject verb object -> "simple", sentence = complex | simple } L.matchAll('he throw brick', 'sentence')