The current parser is generated using ohyacc, a version of goyacc that has been modified to allow:
The lexer to trigger the parser to exit abnormally (Ctrl-C pressed).
The parser to restart with a clear state for each command.
Additionally the lexer/parser have been hacked at to allow a partial parse in order to generate better completion candidates.
This works but a hand-written parser and a lexer that doesn't have to work around the constraints imposed by yacc would allow for more fine-grained control and, hopefully, less convoluted code.
The current parser is generated using ohyacc, a version of goyacc that has been modified to allow:
Additionally the lexer/parser have been hacked at to allow a partial parse in order to generate better completion candidates.
This works but a hand-written parser and a lexer that doesn't have to work around the constraints imposed by yacc would allow for more fine-grained control and, hopefully, less convoluted code.