Author Topic: Code-Formatter PB 10  (Read 158587 times)

0 Members and 1 Guest are viewing this topic.

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 1037
  • User-Rate: +30/-4
    • it-berater
Re: Code-Formatter PB 10
« Reply #105 on: November 26, 2011, 07:30:48 PM »
Paul, the PowerBasic Code from Peter is understandable to you.
Thats what counts  ;D. PowerBasic connects cultures.

Offline Paul Elliott

  • Full Member
  • ***
  • Posts: 164
  • User-Rate: +40/-32
Re: Code-Formatter PB 10
« Reply #106 on: November 26, 2011, 08:23:48 PM »
Well, I thought I understood it.

But as there are really only a couple main routines  it makes no sense for me to make changes that
Peter may be working on. So I'll stop. It just takes too long to figure out exactly what got changed
and how that impacts what I was working on.

It would be helpful to know what Peter's plan is. What is being changed to cover PB 10 and hopefully
PB CC v6. Why the extra empty tab? Or just stop posting until it is finished.


Offline Peter Weis

  • Sr. Member
  • ****
  • Posts: 326
  • User-Rate: +15/-4
Re: Code-Formatter PB 10
« Reply #107 on: November 26, 2011, 08:38:22 PM »
Paul,
Please do not stop with the program! But it is fun to program with you

I'm working on the function DoFormat

regards Peter


Offline Peter Weis

  • Sr. Member
  • ****
  • Posts: 326
  • User-Rate: +15/-4
Re: Code-Formatter PB 10
« Reply #108 on: November 26, 2011, 09:37:59 PM »
Paul,
 of course with PBCC, it is clear
 greetings Peter

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 1037
  • User-Rate: +30/-4
    • it-berater
Re: Code-Formatter PB 10
« Reply #109 on: November 27, 2011, 08:31:52 AM »
Peter,

Paul möchte wissen was dein Plan ist, damit er sich entsprechend einklinken kann.

Ok, got a Message from Peter to Paul. It contains a real truth.
The heart of a real good "Pretty Printer" must really know any keyword of PB.

Peter writes:

Quote
Hallo Theo,
Habe schon geschrieben,


Like said before ...

Quote
dass ich an der Funktion DoFormat  arbeite! Das Ausarbeiten der Funktion gestaltet sich im Moment noch recht schwierig weil es viele Ausnahmen gibt die ich alle mit einbeziehen möchte!

 I am still busy with the "DoFormat Function". It needs a bit more time because it needs to include a lot of exceptions.

Quote
Ich arbeite schon drei Tage daran! Deswegen hört man so wenig von mir!
Kannst es Paul ausrichten!

This is ongoing for the last three days and may take more time. Please tell it to Paul.

Which i wanted to do hereby.

Peter will tell us when he's done with the "DoFormat".
« Last Edit: November 27, 2011, 11:34:32 AM by Theo Gottwald »

Offline Paul Elliott

  • Full Member
  • ***
  • Posts: 164
  • User-Rate: +40/-32
Re: Code-Formatter PB 10
« Reply #110 on: November 28, 2011, 03:20:47 PM »
did some work but my new code won't fit with what Peter's working on. so here's the exe as I've got
it now. the program is tab.exe dimply because this is the 1st program I've done with PB v10 using a
tab control without creating extra overlay windows/dialogs. it's all created right on the tab page.

and some of the change listing
Code: [Select]
' tab ddt version of code formatter
' 11/23/2011 v3 re-arrange GUI again
'               don't have format_cliked yet
' 11/24/2011    got format_clicked in place
'               fixed problem with text_ascoumn
' 11/25/2011    changing string concats to & instead of +
'               changing concat/add/sub if left var is 1st on right to &=/+=/-=
' 11/26/2011    fix for DIM x(1, 4)
'               handle multiple AS type on 1 line
'               indents variables -- still need fix if it can't fit in space *ERR
' 11/27/2011    eliminated *ERR
'               add ENUM to list of auto-indent
'               process THREAD FUNCTION like CALLBACK FUNCTION
'               indent continued lines tabsize
'              * still need to process continued variable declares
'

later: added progress bar & fixed problem of not saving main dialog handle.

much later: put new archive on my post dated 12/5/2011.



« Last Edit: December 05, 2011, 03:28:08 PM by Paul Elliott »

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 1037
  • User-Rate: +30/-4
    • it-berater
Re: Code-Formatter PB 10
« Reply #111 on: November 29, 2011, 05:54:15 PM »
Does it mean, that you have a final result, and peter will produce another program?
I believe we should bring things together after all because only this will allow further developement.
There are plans to enhance functionality of the Pretty Printer more far then where its now.
For example:
- extraction of strings
- local variables processing (removal of unsused?)

Offline Paul Elliott

  • Full Member
  • ***
  • Posts: 164
  • User-Rate: +40/-32
Re: Code-Formatter PB 10
« Reply #112 on: November 29, 2011, 07:03:34 PM »
Theo,

No, not a complete solution nor a competing program to Peter's.

Just have no idea exactly what Peter's complete plan of enhancements will be or
what changes he's currently making.

Not everybody will have Phoenix v2 to be able to rework the GUI or to easily understand
how the events are handled. I don't really have a problem as I've had Phoenix for years.

I was bored waiting so I did something.
I was just curious as to how easy it would be to do the same program in PB DDT ( which everyone
who wants to change/compile the source will have already ). For me it was very easy to go from
one to the other ( been doing that type of programming for many years ). Also it was easy for me
to make changes to the split variable section of code as I had coded it. As I explained earlier, I got
no feedback when I put the code out there. So I went ahead with my own program which did
nothing but split variables and have made changes that probably wouldn't fit easily into
CodeFormatter. It was bad enough with the way I originally coded it because it bypassed
the main part of the program ( which broke each line into individual elements and then put
them back together ). I figured that was why I got no feedback.

Some of the changes I've made are based on what I've coded for the call-tree/flowchart program
that I've been working on. That code is not ready for public viewing as I'm still getting the
call-tree/cross-reference part to handle most PB sources that I can find ( either on the PB forums
or my older programs ... still not that familiar with all the code for Classes ).

That's where things are as far as I'm concerned.

« Last Edit: November 29, 2011, 07:05:45 PM by Paul Elliott »

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 1037
  • User-Rate: +30/-4
    • it-berater
Re: Code-Formatter PB 10
« Reply #113 on: November 29, 2011, 08:20:30 PM »
Peter asks for the source code of what you have been doing so he can put it all together.
Can you make it available to him?

Offline Paul Elliott

  • Full Member
  • ***
  • Posts: 164
  • User-Rate: +40/-32
Re: Code-Formatter PB 10
« Reply #114 on: November 29, 2011, 10:05:33 PM »
Not at this time.

I'm waiting to see what all Peter does. When will we see a final version?


Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 1037
  • User-Rate: +30/-4
    • it-berater
Re: Code-Formatter PB 10
« Reply #115 on: November 30, 2011, 07:51:26 AM »
Peter, Paul schreibt, dass er derzeit noch nicht seinen Quellcode weitergeben will, sondern erst sehen will was du machst,
Wir warten also auf deinen Stand.

@Paul: I have translated this for Peter.

Offline Peter Weis

  • Sr. Member
  • ****
  • Posts: 326
  • User-Rate: +15/-4
Re: Code-Formatter PB 10
« Reply #116 on: November 30, 2011, 09:39:55 AM »
I am still working on the function DoFormat! The thing assumes shape. Is at testing

greetings Peter

Offline Paul Elliott

  • Full Member
  • ***
  • Posts: 164
  • User-Rate: +40/-32
Re: Code-Formatter PB 10
« Reply #117 on: December 05, 2011, 03:26:17 PM »
still bored so I reworked the variable indenting to better match rest of surrounding lines.

I'll see if I can remove the previously posted archive.

later: removed archive with executable. guess it wasn't wanted.

« Last Edit: December 06, 2011, 01:01:52 PM by Paul Elliott »

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 1037
  • User-Rate: +30/-4
    • it-berater
Re: Code-Formatter PB 10
« Reply #118 on: December 05, 2011, 03:28:27 PM »
Paul, can it be made into several Passes?
Then you get the full code into your pass, and its completely separate from what Peter is doing.

Peter kannst du das ding modular aufbauen dasses nacheinander in "Passes" arbeitet?
So könnte Paul parallel bestimmte dinge tun.

Offline Paul Elliott

  • Full Member
  • ***
  • Posts: 164
  • User-Rate: +40/-32
Re: Code-Formatter PB 10
« Reply #119 on: December 05, 2011, 03:38:59 PM »
Theo,

You've seen the code from v2.  What do you think?

It's obvious to me that you and Peter have been talking & planning but you have not shared
any details with the rest of the forum. Until that happens I don't plan on posting code.

I'm just testing things on my own and sharing the executable to see if anybody finds problems.
Still waiting to see what the plan is and what Peter has coded.