How do I get Bison/YACC to not recognize a command until it parses the whole string?
- by chucknelson
I have some bison grammar:
input: /* empty */
| input command
;
command:
builtin
| external
;
builtin:
CD { printf("Changing to home directory...\n"); }
| CD WORD printf("Changing to directroy %s\n", $2); }
;
I'm wondering how I get Bison to not accept (YYACCEPT?) something as a command until it reads ALL…