Implemented parsing of grammar elements.