pasdoc icon indicating copy to clipboard operation
pasdoc copied to clipboard

Feature Request: Extended Pascal (ISO 10206) support

Open kai-burghardt opened this issue 4 years ago • 2 comments

Hello,

I’d appreciate if EP source code was accepted, specifically

  • EP modules
  • Schemata

I don’t know whether this is within the project’s scope. On the front page it says “Object Pascal”, but also mentions “Free Pascal”. I suppose referring to “Free Pascal” isn’t merely restricted to the FPC’s {$mode FPC} and {$mode objFPC} but could also mean other modes, like {$mode extendedPascal}, yet I’m not sure about this.

Thanks for considering this!

kai-burghardt avatar Feb 23 '21 11:02 kai-burghardt

I would say that this is within our scope. Certainly we want to support all FPC modes as much as we can (even if in practice we focus on {$mode objFPC} most).

Personally, I do not have much experience with the 2 extendedPascal constructs you mention. But I would welcome a PR that adds a support for them.

I see examples / docs on:

  • http://www.gnu-pascal.de/gpc/Schema-Types.html ,
  • https://wiki.freepascal.org/Extended_Pascal -- note that it says that FPC doesn't yet support schemata or modules. Maybe that's outdated info, if it's not outdated -> it doesn't change my opinion anyway, i.e. we'd like to support it. If GPC supports them, it is also an argument (although I admit I didn't use GPC in quite some time).

Actions:

  1. Can you provide a testcases for them? You can even make a PR with them, add them to tests/testcases/todo/ subdirectory. Just add files like ok_extendedpascal_schemata.pas, ok_extendedpascal_modules.pas that demonstrate these features of EP, and can be used as testcases when someone will have time to extend the PasDoc parser (PasDoc_Parser.pas) to handle them. Even better if you have testcases that are actually parsed by latest stable FPC and/or GPC, so that I can experiment with these constructs.

  2. By the way: does fcl-passrc support these constructs? ( https://wiki.freepascal.org/fcl-passrc ) We do have a plan to use one day fcl-passrc as an alternative parser. It is a loong way into the future (it will be some work). Still I'm curious, whether using fcl-passrc would "solve" this issue for us.

  3. PRs are most welcome :)

michaliskambi avatar Feb 23 '21 13:02 michaliskambi

  • I’m glad to read that it’s welcome to support EP.
  • No, the FPC does indeed not yet support EP. I’m afraid they never will, or at most a very limited subset.
  • I have no experience with fcl-passrc.

kai-burghardt avatar Feb 24 '21 15:02 kai-burghardt