[Lazarus] Using FPC parser/tokenizer for code formatting

Michael Van Canneyt michael at freepascal.org
Sun May 30 13:55:49 CEST 2010



On Sat, 29 May 2010, Hans-Peter Diettrich wrote:

> Michael Van Canneyt schrieb:
>
>> Well, given the recent breakage because of the support for 'deprecated',
>> I started on a test file, but I think that a better and more fundamental
>> approach is needed. My idea was to create a large number of small files
>> with code fragments. The test application reads the fragments and puts
>> them in a unit (interface/implementation) and attempts to scan/parse it.
>> After that, it's just a matter of creating the code fragments.
>
> A nice idea, but what about verification of the result? Not getting 
> exceptions is not necessarily a sign of a properly working parser, with 
> decent error recovery.

That is step 2. Step 1 is proper parsing. Can't do step 2 if you don't
have step 1. You can't run before you can walk...


Michael.




More information about the Lazarus mailing list