[fpc-devel] Porting FPC to IBM zArch

Bernd Oppolzer bernd.oppolzer at t-online.de
Wed Jul 24 11:51:10 CEST 2013


Some answers to some questions below:

- the (/ /) substitute for [ ] was the only available substitute in the
original Stanford compiler (which, BTW, is the Pascal P4 of Niklaus Wirth).
I added (. .), because this was present in my sources. Same goes for ->,
Stanford supported @ only (IIRC).

- the N+ option for nesting comments was already present in the Stanford 
compiler,
but IIRC, it worked only for { } comments. I added the /* ... */ 
comments - which could
be dropped again, if you don't like it - and the support for nesting the 
other comment types.

My existing Pascal sources ran successfully on PASCAL/VS (IBM mainframe 
compiler)
in the 90s, so my goal was to extend the Stanford compiler in such a way 
that I don't
have to change my PASCAL/VS sources (much).

Kind regards

Bernd



Am 24.07.2013 10:02, schrieb Jonas Maebe:
>
>> There are some minor problems I faced when compiling the Stanford Pascal
>> sources with FPC:
>>
>> - Stanford Pascal (my version) allows (. .) and (/ /) as substitutes for [ ]
> FPC also supports (. and .). It doesn't support (/ and /) though. Support for that could maybe be added under a new syntax mode or mode switch switch, but is this a common syntax? I've never heard of that one before.
>
>> - and -> for the pointer symbol  (like VS/PASCAL)
> Adding support for that under a syntax mode or mode switch switch should be no problem.
>
>> - and different styles of comments:
>>
>> { }
>> (* ... *)
>> /* ... */
>> and - strange to me, but it's in the compiler source: "this is a comment, too"
> FPC supports the first two styles. Maybe the rest could be added, but that seems very un-Pascallish.
>
>> Comments of different types can be nested;
>> comments of the same type can be nested, if the compiler option N+ is set.
> FPC supports nesting of {} comments. (* *) comments do not nest, and { } comments appearing inside (* *) comments are ignored (they don't start a new nesting level). Supporting four nestable comment would require quite a few changes and I'm not sure whether this would be nice. Are these also extensions that you added yourself?
>




More information about the fpc-devel mailing list