[fpc-pascal] FPC Object Pascal parser?
Marco van de Voort
marcov at stack.nl
Thu Apr 15 12:58:56 CEST 2010
In our previous episode, Graeme Geldenhuys said:
>
> Does FPC include a "general purpose" object pascal parser we can use
> in our own projects? Obviously the FPC compiler itself has a parser,
> but is that a free-standing unit or class we can use in other
> projects? I know fpdoc needs to parse source code as well, but I don't
> know if it uses the same parser as the FPC compiler.
No, it uses fcl-passrc.
A third, more limited parser exists inside ptop and other highlighting and
source beautifying tools.
> I don't want to create 'yet another object pascal parser', and I can't
> use existing Delphi ones, because it needs to support the FPC language
> syntax (and support for include files) specifically.
Afaik include files are compatible to Dlephi, except that FPC afaik
recompiles units if they change. But yes, I agree that on average Delphi
tools don't support comfortably what the delphi compiler suports.
More information about the fpc-pascal
mailing list