function-identifier-variable

Paul Isaacs <[email protected]> Mon, 28 Mar 2016 15:00:33 -0400
Newsgroups gmane.comp.compilers.gpc
Message-ID <[email protected]>
Hello;

program test;

{
     productions:

     assignment-statement                    :  contains expression
     expression                                        :  contains 
simple-expression
     simple-expression                            :  eventually works 
down to primary
     primary                                               : contains 
variable-access
     variable-access                                :  contains 
function-identifier-variable
     function-identifier-variable               =  pointer-function '^'
     pointer-function                                 :   contains 
entire-function-access
     entire-function-access                     = function-designator
     function-designator                          =  function-name [ 
actual-parameter-list ]
     function-name                                    :  contains identifier
}

{
  compiled with:

$PASCAL/local/bin/gpc --extended-pascal test.pas
test.pas: In main program:
test.pas:11: error: invalid type of argument of `^'
}

function y : boolean;
begin
  y := false;
end;

var
  x : boolean;
begin
  x := y^;                  { isn't " y" a function-identifier-variable ? }
end.

Where is the error in thinking?

Thanks,

Paul Isaacs


_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc