summaryrefslogtreecommitdiffstats
path: root/parsing/lexer.sh
Commit message (Collapse)AuthorAgeFilesLines
* accept(): Use toktext()P. J. McDermott2016-02-211-3/+3
|
* Don't loop forever on unterminated singly quoted string in wordsP. J. McDermott2016-02-211-3/+9
|
* Improve backslash and quote handling in wordsP. J. McDermott2016-02-211-0/+21
|
* Preserve leading backslashes in wordsP. J. McDermott2016-02-211-3/+5
|
* Remove quotes in here-document delimitersP. J. McDermott2016-02-211-1/+2
|
* 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-211-41/+39
|
* Implement here-documentP. J. McDermott2016-02-211-0/+148
| | | | Also fix some I/O redirection operator bugs.
* Implement arithmetic expansionP. J. McDermott2016-02-201-3/+58
|
* Reticulate splinesP. J. McDermott2016-02-201-8/+6
|
* scan_wordexp_param_brace(): New functionP. J. McDermott2016-02-201-112/+126
|
* scan_wordexp(): Catch and rethrow some uncaught exceptionsP. J. McDermott2016-02-201-3/+10
|
* Rewrite codegenP. J. McDermott2016-02-201-1/+2
| | | | | | | | 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-201-22/+44
| | | | | | | | | | 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-201-11/+2
|
* Remove some "echo"sP. J. McDermott2016-02-201-2/+0
|
* Implement command substitution (warning: ugly and broken)P. J. McDermott2016-02-201-4/+47
|
* Prepare for command substitutionP. J. McDermott2016-02-201-2/+16
|
* Check only first word of simple commands for reseserved wordsP. J. McDermott2016-02-201-2/+4
|
* Fix T_LBRACE, T_RBRACE, and T_BANG recognitionP. J. McDermott2016-02-201-2/+2
|
* Delimit words at unescaped operatorsP. J. McDermott2016-02-191-1/+1
| | | | Also expect EOF at end of script.
* Improve reserved word recognitionP. J. McDermott2016-02-191-11/+32
| | | | | | And fix term() to allow do_group() to find T_DONE. Also, ERMAHGERD DEBERG.
* Add more productions, special tokens, etc.P. J. McDermott2016-02-191-1/+44
|
* Recognize reserved wordsP. J. McDermott2016-02-191-7/+28
|
* Add missing I/O tokensP. J. McDermott2016-02-191-11/+29
|
* Add error handling to lexerP. J. McDermott2016-02-191-46/+107
|
* [WIP] Add lexer/parser demoP. J. McDermott2016-02-191-0/+457