4 ms·
You could take a look at how the "heirloom bourne shell" does it: http://heirloom.sourceforge.net/sh.html http://heirloom.sourceforge.net/sh.html
by bediger4000 5y ago
You could take a look at how the "heirloom bourne shell" does it: http://heirloom.sourceforge.net/sh.html http://heirloom.sourceforge.net/sh.html
- sargstuff 5y agocheck out how morbig uses a shell grammar to parse a shell script in order to build a syntax tree. https://news.ycombinator.com/item?id=30812330 https://news.ycombinator.com/item?id=30812330 Technically, it's not lexx && slightly different shell grammar than [1]. Can feed in grammar based on [1] and/or make grammar changs and see how morbig generates the syntax tree.
- sargstuff 5y agoTree-sitter : https://tree-sitter.github.io/tree-sitter/ https://tree-sitter.github.io/tree-sitter/ From the tree-sitter website: "Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited."