- Notes from the source:
Intended to follow the original Thompson and Ritchie "small and simple is beautiful" philosophy, which incidentally is a good match to today's BusyBox.
There are two big (and related) architecture differences between this parser and the lash parser. One is that this version is actually designed from the ground up to understand nearly all of the Bourne grammar. The second, consequential change is that the parser and input reader have been turned inside out. Now, the parser is in control, and asks for input as needed. The old way had the input reader in control, and it asked for parsing to take place as needed. The new way makes it much easier to properly handle the recursion implicit in the various substitutions, especially across continuation lines.
Bash grammar not implemented: (how many of these were in original sh?)
- $@ (those sure look like weird quoting rules)
- $_
- ! negation operator for pipes
- &> and >& redirection of stdout+stderr
- Brace Expansion
- Tilde Expansion
- fancy forms of Parameter Expansion
- aliases
- Arithmetic Expansion
- <(list) and >(list) Process Substitution
- reserved words: case, esac, select, function
- Here Documents ( << word )
- Functions
Major bugs:
- job handling woefully incomplete and buggy
- reserved word execution woefully incomplete and buggy
to-do:
- port selected bugfixes from post-0.49 busybox lash - done?
- finish implementing reserved words: for, while, until, do, done
- change { and } from special chars to reserved words
- builtins: break, continue, eval, return, set, trap, ulimit
- test magic exec
- handle children going into background
- clean up recognition of null pipes
- check setting of global_argc and global_argv
- control-C handling, probably with longjmp
- follow IFS rules more precisely, including update semantics
- figure out what to do with backslash-newline
- explain why we use signal instead of sigaction
- propagate syntax errors, die on resource errors?
- continuation lines, both explicit and implicit - done?
- memory leak finding and plugging - done?
- more testing, especially quoting rules and redirection
- document how quoting rules not precisely followed for variable assignments
- maybe change map[] to use 2-bit entries
- (eventually) remove all the printf's
Things that do _not_ work in this environment:
- redirecting (stdout to a file for example)
- recursion
Enable the "Hush parser" in "General Settings", "Select your shell" to get the new console feeling.