Hacker News new | ask | show | jobs
by chasil 1354 days 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_...

https://archive.fosdem.org/2019/schedule/event/ada_shell/