On 2010-07-25 11:15 PM, Florian Klämpfl wrote:
Why don't you use separate parser classes for different purposes?
Declarations, Function bodies, expressions etc.?
First hurdle is to find a comprehensive enough descriptions of each and every construct there is --including interfaces and generics. This would cut down on guess work a lot. Is there a such a document anywhere --Google didn't help.

Second one is a tricky one: How do you handle code with multipaths?
I.e. code that includes in {$IFDEF}{$ELSE}{$ENDIF} blocks.
Do you ignore the bits that don't apply, or do you parse all alternative paths too in the name of perfection?

Finally, other than having the whole unit turned into a class structure, would the effort be worth it?

Wouldn't it be memory hog as well as slow as hell?
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to