[Lazarus] Using FPC parser/tokenizer for code formatting
Florian Klaempfl
florian at freepascal.org
Sun May 30 11:49:57 CEST 2010
Hans-Peter Diettrich schrieb:
> 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.
This is even not guranteed for the compiler parser ;) I discovered
recently that fpc eats the following nonsense:
label
1234;
begin
4321+1234:
end.
More information about the Lazarus
mailing list