%{ #define YYERROR_VERBOSE void yyerror(char *); %} %verbose %token JAN ULRICH KIRSTEN BIRGIT EIKE KAI ILLEGAL_CHAR %% kinder: maedchen | jungen | maedchenOderJungen ; maedchen: KIRSTEN | BIRGIT ; jungen: JAN | ULRICH ; maedchenOderJungen: EIKE | KAI ; %% void yyerror(char *msg) { printf("\n%s\n", msg); } int main() { return yyparse(); }