[Lazarus] Using FPC parser/tokenizer for code formatting

Florian Klaempfl florian at freepascal.org
Mon May 31 14:28:22 CEST 2010


Adem schrieb:
> On 2010-05-31 14:57, Florian Klaempfl wrote:
>>> But, the parser does produce a parse tree, doesn't it.
>> FPC doesn't produce a parse tree during compilation. The parser puts
>> declarations/definitions immediatly into the symtables, for code an
>> intermediate representation is created which is indeed a tree but no
>> more a parse tree because statements might already be transformed.
>>    
> So, if I understand this right, the code is parsed but instead of
> producing a tree, a more directly usable structure is created.
> 
> Now, the question is, can it be made to produce (in parallel with what
> it already does) a tree to be used elsewhere?

Of course this could be done but we are now at the point were the
discussion started: if somebody adds new features and doesn't update
this alternate path/code to produce this tree, the situation is the same
as currently.




More information about the Lazarus mailing list