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 -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707