summaryrefslogtreecommitdiff
path: root/parse.y
AgeCommit message (Collapse)Author
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-16 Bug: more wrongly ordered header file includes (thanks Callumtjg
Gibson).
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-16remove all equals hacks!tjg
2015-05-16yet another go at equals hacktjg
2015-05-16another attempt at the equals hacktjg
2015-05-16new equals hacktjg
2015-05-16 Feature: the "equals hack".tjg
2015-05-16remove lint definitiontgoodwin
2015-05-16Initial revisiontgoodwin
2015-05-16Initial revisiontim
2015-05-16release: rc-1.4Byron Rakitzis