fenollp/kju — pull request #14 by fenollp (2014-04-20 19:56:20+00:00)
Title: FunctionCall vs. lastOnly

This code
```haskell
f()= ok = a:b()
```
reveals that Kju processes pattern matching function calls this way:
![before](https://cloud.githubusercontent.com/assets/278727/2751300/edc4713a-c8c1-11e3-96f3-fba1e64c2cbf.png)
Which is wrong: there should be only 1 `seqExprs` here.
Equivalent Erlang code:
```erlang
f()-> ok = a:b().
```

The issue comes from a conflict in `lastOnly` and `functionCall`'s `mf`:
```antlr
lastOnly : var
| atom
| '(' exprA ')' ;

mf : ':'
| ':' lastOnly
| lastOnly ;
mf_ : lastOnly ':' lastOnly ;
```

The parser has to read `lastOnly|functionCall` after the `=` sign.
Giving it `‹atom› ‹:› ‹atom›` is parsed as `lastOnly` = `‹atom›` and the rest: `mf` = `‹:› ‹atom›`.

Thus swapping this order parses `‹atom› ‹:› ‹atom›` into `mf_` = `‹atom› ‹:› ‹atom›`.
Which is the right way:
![after](https://cloud.githubusercontent.com/assets/278727/2751331/ab4f53ca-c8c5-11e3-929f-4b5200d02313.png)