summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* eshtrans/backend: Don't add a space after "("P. J. McDermott2016-02-212-5/+8
|
* eshtrans/frontend: Count singly quoted newlinesP. J. McDermott2016-02-212-2/+7
|
* eshtrans/frontend: Fix missing ";;"P. J. McDermott2016-02-211-0/+1
| | | | | eshtrans caught an actual syntax error in itself (!), although oddly other shells didn't consider this an error.
* eshtrans/frontend: Fix handling of single quote in double quotesP. J. McDermott2016-02-212-2/+13
|
* eshtrans/frontend: Don't eat char after wordexp in arithmeticP. J. McDermott2016-02-212-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: Trying script: $(($foo + 1)) Tokens: T_FNAME<US>$(($foo+ 1))<RS>T_NEWLINE<RS>T_EOF<RS> Token: function name "$(($foo+ 1))" Token: newline Token: end of file Generated code: $(($foo+ 1)) Trying script: $((1 + $foo)) stdin:1: Syntax error: Arithmetic expansion: ")" unexpected FAIL After: Trying script: $(($foo + 1)) Tokens: T_FNAME<US>$(($foo + 1))<RS>T_NEWLINE<RS>T_EOF<RS> Token: function name "$(($foo + 1))" Token: newline Token: end of file Generated code: $(($foo + 1)) Trying script: $((1 + $foo)) Tokens: T_FNAME<US>$((1 + $foo))<RS>T_NEWLINE<RS>T_EOF<RS> Token: function name "$((1 + $foo))" Token: newline Token: end of file Generated code: $((1 + $foo))
* eshtrans/frontend: Fix handling of words beginning with "\"P. J. McDermott2016-02-212-14/+42
|
* eshtrans: Add tests with comments and leading linebreaksP. J. McDermott2016-02-211-1/+4
|
* eshtrans/frontend: Accept leading linebreaksP. J. McDermott2016-02-211-0/+1
|
* Copy everything into a new eshtrans/ directoryP. J. McDermott2016-02-218-0/+2003
| | | | | | | Split out and rename functions and variables where appropriate. Also add license headers. (The old scripts under parsing/ can be used under the same license.)
* accept(): Use toktext()P. J. McDermott2016-02-212-5/+7
|
* tokname(): Quote symbolsP. J. McDermott2016-02-211-35/+35
|
* toktext(): Move to tokens.shP. J. McDermott2016-02-212-60/+60
|
* Add a couple more testsP. J. McDermott2016-02-211-1/+3
|
* Don't loop forever on unterminated singly quoted string in wordsP. J. McDermott2016-02-212-7/+14
|
* Improve backslash and quote handling in wordsP. J. McDermott2016-02-212-5/+30
|
* Preserve leading backslashes in wordsP. J. McDermott2016-02-212-3/+9
|
* Remove quotes in here-document delimitersP. J. McDermott2016-02-212-3/+4
|
* Improve demo outputP. J. McDermott2016-02-211-5/+8
|
* Fix handling of newlines with here-documentsP. J. McDermott2016-02-211-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 lineP. J. McDermott2016-02-212-45/+44
|
* Drop mentions of arithmetic stack elementsP. J. McDermott2016-02-211-5/+1
|
* Don't indent lines in generated codeP. J. McDermott2016-02-211-2/+9
| | | | Doing so can break here-documents.
* Implement here-documentP. J. McDermott2016-02-212-4/+156
| | | | Also fix some I/O redirection operator bugs.
* Implement arithmetic expansionP. J. McDermott2016-02-202-9/+68
|
* Reticulate splinesP. J. McDermott2016-02-201-8/+6
|
* scan_wordexp_param_brace(): New functionP. J. McDermott2016-02-202-123/+137
|
* scan_wordexp(): Catch and rethrow some uncaught exceptionsP. J. McDermott2016-02-201-3/+10
|
* Rewrite codegenP. J. McDermott2016-02-203-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. McDermott2016-02-201-47/+47
| | | | It reads input characters for the lexer, not the parser.
* Organize lexer functionsP. J. McDermott2016-02-201-44/+64
|
* Move parse_sub() logic into lexerP. J. McDermott2016-02-202-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 substitutionP. J. McDermott2016-02-202-16/+15
|
* Remove some "echo"sP. J. McDermott2016-02-201-2/+0
|
* Fix command substitution (warning: still ugly)P. J. McDermott2016-02-201-1/+6
|
* Implement command substitution (warning: ugly and broken)P. J. McDermott2016-02-202-10/+63
|
* Add code generationP. J. McDermott2016-02-202-6/+97
|
* Prepare for command substitutionP. J. McDermott2016-02-202-6/+34
|
* Fix function definition parsingP. J. McDermott2016-02-201-0/+2
| | | | Well that was easy.
* Fully trace most parser functionsP. J. McDermott2016-02-201-26/+114
|
* Fix command separationP. J. McDermott2016-02-201-9/+17
| | | | | | `foo bar ( baz )` no longer gets parsed as `foo bar` and `( baz )`. Also restrict function names.
* Fix function definitions (almost)P. J. McDermott2016-02-201-20/+12
|
* Implement I/O operator parsingP. J. McDermott2016-02-201-9/+40
|
* Implement "case" constructP. J. McDermott2016-02-201-6/+40
|
* Implement (non-functional) function handlingP. J. McDermott2016-02-201-4/+14
|
* Implement "while" and "until" loopsP. J. McDermott2016-02-201-5/+15
|
* Implement "if" constructP. J. McDermott2016-02-201-2/+21
|
* Rearrange command()P. J. McDermott2016-02-201-4/+6
|
* Fix handling of unexpected EOFP. J. McDermott2016-02-201-7/+7
|
* Improve error when expecting EOFP. J. McDermott2016-02-201-1/+3
|
* tokname(): Add new special symbolsP. J. McDermott2016-02-201-1/+3
|