Re: Bach & SciTe

new topic     » goto parent     » topic index » view thread      » older message » newer message

Karl wrote:

> It got me thinking -- Would you (or anyone else) be interested in modifying
> the Scintilla source to create a real editor/debugger for Bach/Euphoria). I
> would certainly be willing to modify Bach to support such an effort and 
> Rob might even be willing to do the same for Euphoria (NO changes to the
> language!).

I haven't used Scintilla directly, but I've put together a small IDE using 
wxWindows - it's available as a wxStyledTextCtrl class. It's quite nice.

So if you want to support wxWindows, you'll get it for free.

>  Would you consider Bach's addition of 'break' and 'watch' opcodes that
> could communicate with outside programs to be a violation of the 'tracing'
> clause of the source license? 

I has also suggested some time back that Robert add some sort of hooks for 
Euphoria's trace. I was thinking of something along the lines of a meta 
control of Euphoria:

   - Step ahead to the next instruction (etc.)
   - Run until next break
   - Return line X of the source code
   - Return the current line number of source code being executed

So you could write a meta trace program in Euphoria itself; something like:

   procedure myTrace( sequence fileName )
      integer theLineNumber
      sequence theLineText

      readFile( fileName )
      while 1
         if finished_running() then
            exit while
         end if
         run_until_break()
         while trace()
            -- display the line with the break
            theLineNumber = get_current_line_num()
            printf( 1, "At line %d: %s\n", { theLineNumber,
               get_source_text( theLineNumber ) )
            -- display information about a value
            printf( 1, "the variable b = %s\n", get_variable_value( "b" ) );
         end while
      end while
   end procedure

It's a crummy example, but it should give the general flavor of the thing. 
Obviously, with this much control, it would be trivial for the user to get 
around the 300 line limit.

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu