[REBOL Internals] question
[1/6] from: gerardcote:sympatico:ca at: 26-Mar-2004 14:55
Hi List,
While looking at another script from the cookbook posted by Carl [0042 code REBOL Parser
in 10 Lines (plus Pretty Printer)] I
thought about the possibility to create an analyser for REBOL code that could offer programmers
some useful tools normally found in
other programming language developers environment, that is cross-reference and autonumbering
tools (to go hand in hand with the
REBOL messages line numbers) and ultimately restart after some reported errors or manually
inserted halt (even may be some sort of
named breakpoints) and finally some more useful trace mechanism since I don't know anything
about the actual virtual machine
actually used by REBOL.
I would like to know if someone already discussed with Carl about the possibility of
restarting some broken REBOL script after
manual editing to help recovery. Something like was done in BASIC in the past. We could
modify some variables and check some
contents in immediate mode and restart the script. - this sometimes acelerated the debugging
process a bit.
The real question is : Can we intercept (or at least get some access to) the halting
point where REBOL was asked to stop and
manually restart from this point if this is wanted by the programmer.
How-to ? Would be the next question if the first one is answered positively...
I also saw the mark: and :mark notation used by the parse word. It already permits this
kind of manip but where is kept the internal
representation of the actual running script and what can be done with it ?
I think I would have to look at depth in the system object to get more answers but this
can take a lot of time to do so... and I am
not yet well prepared ebough for this at the moment - may be later.
Thanks for all clues if any,
Gerard
P.S. Creating a complete simulator seems ridiculous to me since there is too much work
involved in - at least for me. Some work
already done for some REBOL statement evaluator would help here I think.
Marteen, Joel, Ladislav or somebody else have you not been trying that in the past ?
[2/6] from: robert:muench:robertmuench at: 27-Mar-2004 9:47
On Fri, 26 Mar 2004 14:55:50 -0500, Gerard Cote <[gerardcote--sympatico--ca]>
wrote:
> I also saw the mark: and :mark notation used by the parse word. It
> already permits this kind of manip but where is kept the internal
> representation of the actual running script and what can be done with it
> ?
Hi, as parse being a native! it does quite some magiv behind the scenes.
It's the only (?) dialect not written with Rebol, which is logical because
you would need a parse ;-). So the parse dialect just assigns the current
position in the script to your mark: and restores is with :mark.
> I think I would have to look at depth in the system object to get more
> answers but this can take a lot of time to do so... and I am
> not yet well prepared ebough for this at the moment - may be later.
I don't expect that parse offers something from the internals. But I can
be wrong. I strongly suggest that you look into Gabriele's compile-rule
dialect. It helps a lot when writing more complex parsers. Robert
[3/6] from: maarten:vrijheid at: 27-Mar-2004 11:28
Robert M. M=FCnch wrote:
> On Fri, 26 Mar 2004 14:55:50 -0500, Gerard Cote <[gerardcote--sympatico--ca]>
> wrote:
<<quoted lines omitted: 6>>
> you would need a parse ;-). So the parse dialect just assigns the current
> position in the script to your mark: and restores is with :mark.
No. Function! uses a dialect too that is native.
--Maarten
[4/6] from: brett::codeconscious::com at: 27-Mar-2004 23:52
>> It's the only (?) dialect not written with Rebol, which is logical
because
>> you would need a parse ;-). So the parse dialect just assigns the current
>> position in the script to your mark: and restores is with :mark.
> No. Function! uses a dialect too that is native.
Secure ?
Mold ?! :-)
Regards,
Brett.
[5/6] from: gerardcote:sympatico:ca at: 28-Mar-2004 15:44
Hi Brett,
You wrote:
> >> It's the only (?) dialect not written with Rebol, which is logical
> because
<<quoted lines omitted: 3>>
> Secure ?
> Mold ?! :-)
Simply hoped someone could go farther ... with PARSE than I was able to but this is already
far enough for all of what I have to do
for now!
Regards,
Gerard
[6/6] from: gerardcote:sympatico:ca at: 28-Mar-2004 15:47
Hi Robert and Maarten,
Thanks for your prompt replies about my PARSE internals question. So it is closed and
it will be left alone forever ...
Regards,
Gerard
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted