[Lazarus] Using FPC parser/tokenizer for code formatting

Michael Van Canneyt michael at freepascal.org
Fri May 28 17:13:41 CEST 2010



On Fri, 28 May 2010, Adem wrote:

>
>>> But, I am hoping to modify the FPC parser/tokenizer so that instead of it 
>>> deciding whether to stop, it should do a callback and let the caller 
>>> decide whether it should stop.
>>> 
>>> Is this likely to be unworthy of the effort?
>> No, but it is hard to do in a meaningful way.
> Could you (or someone else) point me to the source files of FPC 
> parser/tokenizer please.
>
> I can guess that it won't be easy; but if it can be done, I think it should 
> be.
>
> It is the only way the code formatter can keep up with new features of FPC.

fcl/packages/fcl-passrc.

Note that this is NOT the scanner/parser used by the compiler itself,
this one is used for the documentation generation and other tasks.

Using the parser/scanner from the compiler is an impossible task,
they are impossible to separate.

Michael.




More information about the Lazarus mailing list