Waldek Hebisch wrote:
If calls to built-ins with empty parethesis are illegal, than the task is easier. The patch below (add 13 lines) should work. With the patch in:
a() := 5;
`a()' is treated as a call, and rejected just like `a(5)'. In
var a: procedure; a := bar();
assignment is rejected (since we do not allow procedural return values). On the other hand, the following works: var a: procedure; .... a := foo; a ();
So I hope that the implementation is reasonably complete. [...]
I see. If you want it in the next release, please:
- move the code out of parse.y as far as possible (I'm trying to move as much non-parsing code out of it as reasonably possible). Perhaps merge it with the real function call code (below) to a subroutine. This should also save some code duplication.
- For TYPE_DECL, the first check seems superfluous, since there is an error already. Or do we really want both?
- Add some test programs (for all cases discussed here, and perhaps some more). The Chief, perhaps?
Frank