i student in computer science, , learning programming pascal.
i have found interesting pascal compiler, p4 (http://homepages.cwi.nl/~steven/pascal/).
to know more pascal, trying compile source code, failed.
in web page, said:
- compile pcom.p , pint.p pascal compiler. have have pascal compiler already. gives pascal compiler (pcom) produces p4 code, , interpreter (pint) runs p4 code.
- to use compiler, run pcom pascal program standard input. produces diagnostics on standard output, , code on pascal file called prr. check pascal compiler how gets assigned file in filestore. may have change lines 'rewrite(prr)' in pcom.p , pint.p , 'reset(prd)' in pint.p compiler, instance "rewrite(prr, 'prr')" etc.
- to run resulting code, run pint prr output produced pcom input file 'prd', , input compiled pascal program on standard input.
i have compiled free pascal (on https://ideone.com/), failed too.
free pascal compiler version 2.6.4+dfsg-4 [2014/10/14] i386 copyright (c) 1993-2014 florian klaempfl , others target os: linux i386 compiling pcom.p pcom.p(1,3) warning: unsupported switch "$l" pcom.p(88,23) fatal: syntax error, ":" expected ")" found fatal: compilation aborted error: /usr/bin/ppc386 returned error exitcode (normal if did not specify source file compiled)
i don't know how compile source code in windows machine, because know pascal language only.
can compile turbo pascal (without requirement) on windows xp? can remove part of script pascal compiling only?
free pascal's florian has been working getting scott moore's p5 compiler (which p4 compiler accepting larger subset of pascal) work fpc's iso mode old sources. work (mostly) in development versions (including upcoming "stable" branch 3.0.x).
i tried last summer , compiled , worked fpc 3.x , -miso parameter (to select iso style dialects). iirc last thing fixed iso style parameter transfer.
i tried referenced p4 compiler version , seems stumble on few spots "comment this" comments related switching , fro iso mode. if comment files, pint compiles. (and run original bytecode if necessary)
pcom still stumbles on taking ord() of pointer, not portable either, unfortunately 20+ occurrences have replaced ord(ptrint()).
pcom still doesn't compile then, fpc doesn't passing union fields var parameters. working around variable , source compiles, 15 minutes total.
the fixed sourcecode mode statements @ http://www.stack.nl/~marcov/files/p4fixed.zip requires (as yet unreleased) fpc 3.0 or newer.
the resulting exe binary can compile original pcom source bootstrap bytecode.