Human behavior recognition using a context-free grammar