[Gambas-devel] about PrettyPrinter

Charlie karl.reinl at ...16...
Fri Aug 13 23:53:05 CEST 2004


Benoit Minisini schrieb:

>On Sunday 08 August 2004 11:49, Benoit Minisini wrote:
>  
>
>>I think... I think :-)
>>    
>>
>
>I continue...
>
>  
>
>>Wouldn't it be a better idea to pretty print the code directly with the
>>compiler, or to create a pretty-printer program that uses the same sources
>>than the compiler ? This need passing many options to the command line, but
>>I think syntax analyzing code must be centralized as much as possible.
>>
>>    
>>
>
>I think you could have wrote your pretty printer in Gambas, as the 
>GambasEditor class has a method, Analyze() that splits a line into symbols, 
>spaces, comments, operators... and tells you what is what. I made it to 
>implement automatic completion, display method signatures and find symbol 
>definitions in code.
>
The first PrettyPrinte was written in gambas-0.56 and posted to the list 
(25.05.2003) .
Then I wrote it in C to re-get in touche with C in Linux and for reason 
speed .
The Indenter4 is mostly part of it. Now keeped to  choose the Parameters.

>
>I think it would be a good idea. Is it a problem for you to rewrite your C 
>pretty printer in Gambas, if I tell you how to use the Analyze() method ?
>
No it (I think) will not be a problem, to rewrite it, let us know about 
Analyze().
I will have a look at it, but hints about will be welcome.

Amicalement
Charlie






More information about the Devel mailing list