Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
... | |||||
* | Add a couple more tests | P. J. McDermott | 2016-02-21 | 1 | -1/+3 |
| | |||||
* | Don't loop forever on unterminated singly quoted string in words | P. J. McDermott | 2016-02-21 | 2 | -7/+14 |
| | |||||
* | Improve backslash and quote handling in words | P. J. McDermott | 2016-02-21 | 2 | -5/+30 |
| | |||||
* | Preserve leading backslashes in words | P. J. McDermott | 2016-02-21 | 2 | -3/+9 |
| | |||||
* | Remove quotes in here-document delimiters | P. J. McDermott | 2016-02-21 | 2 | -3/+4 |
| | |||||
* | Improve demo output | P. J. McDermott | 2016-02-21 | 1 | -5/+8 |
| | |||||
* | Fix handling of newlines with here-documents | P. J. McDermott | 2016-02-21 | 1 | -12/+8 |
| | | | | | Sequential here-documents were getting indented. Everything after a newline was being considered a here-document. | ||||
* | Fix handling of multiple here-documents on a line | P. J. McDermott | 2016-02-21 | 2 | -45/+44 |
| | |||||
* | Drop mentions of arithmetic stack elements | P. J. McDermott | 2016-02-21 | 1 | -5/+1 |
| | |||||
* | Don't indent lines in generated code | P. J. McDermott | 2016-02-21 | 1 | -2/+9 |
| | | | | Doing so can break here-documents. | ||||
* | Implement here-document | P. J. McDermott | 2016-02-21 | 2 | -4/+156 |
| | | | | Also fix some I/O redirection operator bugs. | ||||
* | Implement arithmetic expansion | P. J. McDermott | 2016-02-20 | 2 | -9/+68 |
| | |||||
* | Reticulate splines | P. J. McDermott | 2016-02-20 | 1 | -8/+6 |
| | |||||
* | scan_wordexp_param_brace(): New function | P. J. McDermott | 2016-02-20 | 2 | -123/+137 |
| | |||||
* | scan_wordexp(): Catch and rethrow some uncaught exceptions | P. J. McDermott | 2016-02-20 | 1 | -3/+10 |
| | |||||
* | Rewrite codegen | P. J. McDermott | 2016-02-20 | 3 | -18/+78 |
| | | | | | | | | The previous version didn't handle nested or multiple command substitutions. The stack format has also been extended to support arithmetic expansions. | ||||
* | s/pgetc/lgetc/ | P. J. McDermott | 2016-02-20 | 1 | -47/+47 |
| | | | | It reads input characters for the lexer, not the parser. | ||||
* | Organize lexer functions | P. J. McDermott | 2016-02-20 | 1 | -44/+64 |
| | |||||
* | Move parse_sub() logic into lexer | P. J. McDermott | 2016-02-20 | 2 | -63/+48 |
| | | | | | | | | | | Now the parser starts the lexer, which in turn starts the parser. Previously, the parser started both the lexer and itself and then asked the lexer all kinds of personal questions, like "Where are you?", "Whatcha doin'?", and "What are you wearing?". No one wants to know what their lexer is wearing. Seriously, don't ask. Parsers should mind their own business. Social interactions and personal questions between code modules should be kept to a minimum. | ||||
* | Don't eat the first token after a command substitution | P. J. McDermott | 2016-02-20 | 2 | -16/+15 |
| | |||||
* | Remove some "echo"s | P. J. McDermott | 2016-02-20 | 1 | -2/+0 |
| | |||||
* | Fix command substitution (warning: still ugly) | P. J. McDermott | 2016-02-20 | 1 | -1/+6 |
| | |||||
* | Implement command substitution (warning: ugly and broken) | P. J. McDermott | 2016-02-20 | 2 | -10/+63 |
| | |||||
* | Add code generation | P. J. McDermott | 2016-02-20 | 2 | -6/+97 |
| | |||||
* | Prepare for command substitution | P. J. McDermott | 2016-02-20 | 2 | -6/+34 |
| | |||||
* | Fix function definition parsing | P. J. McDermott | 2016-02-20 | 1 | -0/+2 |
| | | | | Well that was easy. | ||||
* | Fully trace most parser functions | P. J. McDermott | 2016-02-20 | 1 | -26/+114 |
| | |||||
* | Fix command separation | P. J. McDermott | 2016-02-20 | 1 | -9/+17 |
| | | | | | | `foo bar ( baz )` no longer gets parsed as `foo bar` and `( baz )`. Also restrict function names. | ||||
* | Fix function definitions (almost) | P. J. McDermott | 2016-02-20 | 1 | -20/+12 |
| | |||||
* | Implement I/O operator parsing | P. J. McDermott | 2016-02-20 | 1 | -9/+40 |
| | |||||
* | Implement "case" construct | P. J. McDermott | 2016-02-20 | 1 | -6/+40 |
| | |||||
* | Implement (non-functional) function handling | P. J. McDermott | 2016-02-20 | 1 | -4/+14 |
| | |||||
* | Implement "while" and "until" loops | P. J. McDermott | 2016-02-20 | 1 | -5/+15 |
| | |||||
* | Implement "if" construct | P. J. McDermott | 2016-02-20 | 1 | -2/+21 |
| | |||||
* | Rearrange command() | P. J. McDermott | 2016-02-20 | 1 | -4/+6 |
| | |||||
* | Fix handling of unexpected EOF | P. J. McDermott | 2016-02-20 | 1 | -7/+7 |
| | |||||
* | Improve error when expecting EOF | P. J. McDermott | 2016-02-20 | 1 | -1/+3 |
| | |||||
* | tokname(): Add new special symbols | P. J. McDermott | 2016-02-20 | 1 | -1/+3 |
| | |||||
* | Check only first word of simple commands for reseserved words | P. J. McDermott | 2016-02-20 | 2 | -3/+5 |
| | |||||
* | Fix T_LBRACE, T_RBRACE, and T_BANG recognition | P. J. McDermott | 2016-02-20 | 2 | -4/+4 |
| | |||||
* | Delimit words at unescaped operators | P. J. McDermott | 2016-02-19 | 2 | -2/+3 |
| | | | | Also expect EOF at end of script. | ||||
* | Improve reserved word recognition | P. J. McDermott | 2016-02-19 | 2 | -14/+50 |
| | | | | | | And fix term() to allow do_group() to find T_DONE. Also, ERMAHGERD DEBERG. | ||||
* | Add more productions, special tokens, etc. | P. J. McDermott | 2016-02-19 | 2 | -12/+324 |
| | |||||
* | Recognize reserved words | P. J. McDermott | 2016-02-19 | 1 | -7/+28 |
| | |||||
* | Add missing I/O tokens | P. J. McDermott | 2016-02-19 | 2 | -11/+31 |
| | |||||
* | Add error handling to lexer | P. J. McDermott | 2016-02-19 | 2 | -64/+152 |
| | |||||
* | [WIP] Add lexer/parser demo | P. J. McDermott | 2016-02-19 | 3 | -0/+645 |
| | |||||
* | libsh: Use parameter lists instead of aliases | P. J. McDermott | 2016-02-19 | 3 | -31/+5 |
| | |||||
* | Initial commit | P. J. McDermott | 2016-02-14 | 6 | -0/+1117 |