[Nix-dev] function without parameters isn't parsed.

Eelco Dolstra eelco at cs.uu.nl
Tue May 8 00:58:04 CEST 2007


Marc Weber wrote:

> A nix file containing only
> {}:rec {};
> causes a syntax error ':' unexpected ...
> 
> bravo on #trace suggested changing a parse error to a semnatic error (or warning).

Probably a better solution is allow functions with an empty argument list.  The
change to the grammar is quite trivial, but it does give a reduce/reduce
conflict (which is why I haven't done this the last time it came up).  However,
given that we use a GLR parser, this probably isn't a big deal, so I think I'll
just commit the change.

-- 
Eelco Dolstra | http://www.cs.uu.nl/~eelco



More information about the nix-dev mailing list