<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rc/lex.c, branch master</title>
<subtitle>Byron Rakitzis' rc(1) port, with a few modifications
</subtitle>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/'/>
<entry>
<title>wip</title>
<updated>2018-02-09T06:34:34+00:00</updated>
<author>
<name>Toby Goodwin</name>
<email>toby@paccrat.org</email>
</author>
<published>2018-02-09T06:34:34+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=5966ab2ca2632c5bed9815def1add4859beececa'/>
<id>5966ab2ca2632c5bed9815def1add4859beececa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Parse equals sign as keyword</title>
<updated>2017-04-17T21:01:02+00:00</updated>
<author>
<name>Bert Münnich</name>
<email>ber.t@posteo.de</email>
</author>
<published>2016-02-27T19:52:33+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=d0ee32e585437b76f095379ec84fd753a5d30a3c'/>
<id>d0ee32e585437b76f095379ec84fd753a5d30a3c</id>
<content type='text'>
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 -&gt;
'optcaret' or 'first' -&gt; '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 '='.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 -&gt;
'optcaret' or 'first' -&gt; '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 '='.
</pre>
</div>
</content>
</entry>
<entry>
<title>typo (thanks Jakub Wilk)</title>
<updated>2015-05-16T20:23:25+00:00</updated>
<author>
<name>Toby Goodwin</name>
<email>toby@paccrat.org</email>
</author>
<published>2015-04-04T11:46:13+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=fbeb8501cdbf8f640605e3c05551fd71e5cc33a3'/>
<id>fbeb8501cdbf8f640605e3c05551fd71e5cc33a3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add $"x as a synonym for $^x</title>
<updated>2015-05-16T20:23:25+00:00</updated>
<author>
<name>Toby Goodwin</name>
<email>toby@paccrat.org</email>
</author>
<published>2014-09-01T21:44:05+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=e2e189493e395eef839fd58800fbaaaf736152b9'/>
<id>e2e189493e395eef839fd58800fbaaaf736152b9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix both Zekoll and Neukirchen bugs</title>
<updated>2015-05-16T20:23:25+00:00</updated>
<author>
<name>Toby Goodwin</name>
<email>toby@paccrat.org</email>
</author>
<published>2014-09-01T21:39:21+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=517ced5334f62771153cc16c73ba382c7da42f8e'/>
<id>517ced5334f62771153cc16c73ba382c7da42f8e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>more errors</title>
<updated>2015-05-16T20:23:24+00:00</updated>
<author>
<name>Toby Goodwin</name>
<email>LibreSoftwareDesign@gmail.com</email>
</author>
<published>2012-10-04T21:54:20+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=d1f7167ce21da3e3f4ee051b2fdd24fc9607bbdc'/>
<id>d1f7167ce21da3e3f4ee051b2fdd24fc9607bbdc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>snapshot from cvs: 2005-03-03</title>
<updated>2015-05-16T20:23:24+00:00</updated>
<author>
<name>Toby Goodwin</name>
<email>toby@paccrat.org</email>
</author>
<published>2015-05-15T18:36:55+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=27c900d6ae9cd0dcf4bc97bc9b8c1882e40ccfa8'/>
<id>27c900d6ae9cd0dcf4bc97bc9b8c1882e40ccfa8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>  Tidiness: minor improvements to input.c.</title>
<updated>2015-05-16T20:23:23+00:00</updated>
<author>
<name>tjg</name>
<email>tjg</email>
</author>
<published>2003-09-24T10:15:11+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=70a21186f92ee19a995080744ce9a320345c05cb'/>
<id>70a21186f92ee19a995080744ce9a320345c05cb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix a few more warnings</title>
<updated>2015-05-16T20:23:20+00:00</updated>
<author>
<name>tjg</name>
<email>tjg</email>
</author>
<published>2001-10-12T10:22:05+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=692977070514082a226f256e8df7dfea33b31bc2'/>
<id>692977070514082a226f256e8df7dfea33b31bc2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>  Bug: it's no longer possible to use parentheses to sneak a word that</title>
<updated>2015-05-16T20:23:19+00:00</updated>
<author>
<name>tjg</name>
<email>tjg</email>
</author>
<published>2001-10-02T13:00:35+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=a11a8d312e531231ed4d284f3cd129ccf2de2a43'/>
<id>a11a8d312e531231ed4d284f3cd129ccf2de2a43</id>
<content type='text'>
  needs quoting past the "quoting detector", so `fn x { echo $(x.y) }'
  now works both in the current rc and its descendants.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  needs quoting past the "quoting detector", so `fn x { echo $(x.y) }'
  now works both in the current rc and its descendants.
</pre>
</div>
</content>
</entry>
</feed>
