summaryrefslogtreecommitdiffstats
path: root/eshtrans/frontend
Commit message (Collapse)AuthorAgeFilesLines
* eshtrans: Support "void" in parameter listsP. J. McDermott2016-02-282-5/+22
|
* eshtrans: Support parameter listsP. J. McDermott2016-02-282-1/+28
|
* eshtrans: Add and parse T_USEP. J. McDermott2016-02-282-3/+8
|
* eshtrans/frontend: Comment out ptrace stuffP. J. McDermott2016-02-281-111/+111
|
* Revert "Revert "eshtrans/frontend: Comment out dbg() and its calls""P. J. McDermott2016-02-281-16/+16
| | | | This reverts commit caa19db7c11ee3c53833614e66a2b8d1a0d31668.
* eshtrans/frontend: Fix lungetc()P. J. McDermott2016-02-281-2/+1
| | | | It needn't be called for non-backslash word characters.
* eshtrans/frontend: Drop extra scan_word() argumentP. J. McDermott2016-02-281-1/+1
|
* eshtrans/frontend: Fix lsetc()P. J. McDermott2016-02-281-8/+4
|
* eshtrans/frontend: Fix lungetc()P. J. McDermott2016-02-271-1/+4
|
* Revert "eshtrans/frontend: Comment out dbg() and its calls"P. J. McDermott2016-02-271-16/+16
| | | | | | | This reverts commit c9b9e578ed90b5421ae77f7e55941be09f17bdab. Conflicts: eshtrans/frontend/lexer.esh
* eshtrans/frontend: Fix ungetc code and run_sublexer()P. J. McDermott2016-02-271-39/+24
|
* [WIP] eshtrans/frontend: Split input into internal char arrayP. J. McDermott2016-02-272-21/+59
|
* eshtrans/frontend: Fix string length param expansionsP. J. McDermott2016-02-271-1/+1
|
* eshtrans/frontend: Use printf in accept() instead of str concatP. J. McDermott2016-02-261-13/+7
| | | | | This results in a very slight performance boost, trading memcpy()s for write()s.
* eshtrans/frontend: Comment out dbg() and its callsP. J. McDermott2016-02-261-16/+16
|
* eshtrans/frontend: Inject ";" before __fn_end() callP. J. McDermott2016-02-231-0/+1
|
* eshtrans/frontend: Accept any compound command in function bodyP. J. McDermott2016-02-231-7/+4
|
* eshtrans: Add T_LOCALP. J. McDermott2016-02-222-6/+7
|
* eshtrans/frontend: Accept T_RETURNP. J. McDermott2016-02-221-0/+5
|
* eshtrans/frontend: Inject function start/end tokensP. J. McDermott2016-02-221-2/+8
|
* eshtrans/frontend: Add inject() functionP. J. McDermott2016-02-221-0/+9
|
* eshtrans/backend: Generate translation unit IDP. J. McDermott2016-02-222-3/+6
|
* eshtrans/frontend: Fix line numbersP. J. McDermott2016-02-211-1/+3
|
* eshtrans/frontend: Escape "$" in patternsP. J. McDermott2016-02-211-3/+3
|
* eshtrans/frontend: Fix validation patterns in accept()P. J. McDermott2016-02-211-4/+6
|
* eshtrans/frontend: Handle T_IO_NUMBERsP. J. McDermott2016-02-212-2/+17
| | | | Also fix a couple bugs in accept().
* eshtrans/frontend: Don't trim trailing tokens from scannersP. J. McDermott2016-02-211-26/+12
| | | | | | | | | | | | | | | | | | Before we'd get things like this: Input: $(foo bar) Output: $(foo ) Input: $(($(foo bar) + 1)) Output: $(($(foo ) + 1)) Now we get things like this: Input: $(foo bar) Output: $(foo bar ) Input: $(($(foo bar) + 1)) Output: $(($(foo bar ) + 1))
* eshtrans/frontend: Count singly quoted newlinesP. J. McDermott2016-02-211-0/+4
|
* 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-211-0/+7
|
* eshtrans/frontend: Don't eat char after wordexp in arithmeticP. J. McDermott2016-02-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-211-11/+37
|
* eshtrans/frontend: Accept leading linebreaksP. J. McDermott2016-02-211-0/+1
|
* Copy everything into a new eshtrans/ directoryP. J. McDermott2016-02-213-0/+1611
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.)