pattern matching and language definition