2 ms·
The grammar of the POSIX shell (and derivatives) is not an LR-parsed language that can be implemented with yacc. It requires an advanced parser. There is an e
by chasil 4y ago
The grammar of the POSIX shell (and derivatives) is not an LR-parsed language that can be implemented with yacc.
It requires an advanced parser.
There is an effort with OCaml (and another with ADA) to create a formal and secure parser. They remark that dash is a handcrafted parser in C that cannot be formally assured.
https://archive.fosdem.org/2018/schedule/event/code_parsing_posix_s_hell/ https://archive.fosdem.org/2018/schedule/event/code_parsing_...
https://archive.fosdem.org/2019/schedule/event/ada_shell/ https://archive.fosdem.org/2019/schedule/event/ada_shell/