summaryrefslogtreecommitdiff
path: root/lex.c
AgeCommit message (Collapse)Author
2018-02-09wipToby Goodwin
2017-04-17Parse equals sign as keywordBert Münnich
The parser treats unexpected keyword tokens (eg. if, while, ~) as literals and not as syntax errors. It does not do this for the equals sign, but it could, as it only has a special meaning at the beginning of a command, much like the keywords. Doing this allows one to write commands like this: dd if'='/dev/zero of'='data bs'='1024 count'='1 without the quotes around the equals signs. All shells from the Bourne family do this. For this to work, the lexer must not automatically terminate words at equals signs, instead it has to generate a free caret around it like for the twiddle and other such special characters. In the parser's grammar we need to get rid of the left recursion in the rules for 'simple' to turn the reduce/reduce conflict at 'first' on '=' (empty -> 'optcaret' or 'first' -> 'simple') into a shift/reduce conflict, which then can be solved with precedence/associativity so that the reduction of the empty 'optcaret' wins over shifting '='.
2015-05-16typo (thanks Jakub Wilk)Toby Goodwin
2015-05-16add $"x as a synonym for $^xToby Goodwin
2015-05-16fix both Zekoll and Neukirchen bugsToby Goodwin
2015-05-16more errorsToby Goodwin
2015-05-16snapshot from cvs: 2005-03-03Toby Goodwin
2015-05-16 Tidiness: minor improvements to input.c.tjg
2015-05-16fix a few more warningstjg
2015-05-16 Bug: it's no longer possible to use parentheses to sneak a word thattjg
needs quoting past the "quoting detector", so `fn x { echo $(x.y) }' now works both in the current rc and its descendants.
2015-05-16 Bug: it's no longer possible to use parentheses to sneak a word thattjg
needs quoting past the "quoting detector", so `fn x { echo $(x.y) }' now works both in the current rc and its descendants.
2015-05-16revert to 1.4tjg
2015-05-16equals hacktjg
2015-05-16y.tab.h is now parse.htgoodwin
2015-05-16fix prompting for readlinetgoodwin
2015-05-16autoconftim
2015-05-16Initial revisiontim
2015-05-16Initial revisiontim
2015-05-16beta: rc-1.5b2Toby Goodwin
2015-05-16beta: rc-1.5betadev1Byron Rakitzis
2015-05-16release: rc-1.4Byron Rakitzis