I have been thinking about extending it so it can explain in
more verbose what a regexp does. See this url for example:
http://rubyforge.org/tracker/index.php?func=detail&aid=383&gro
up_id=18&atid=152
wow, that is really helpful. The regex#tree and regex#explain would help
a lot of regex newbies (like me). Your regex package, if complete w all
these goodies, could be a lifesaver for a programmer (docs not needed :-).
Pls keep on enriching your regex module.
I hope you can do something like this for your other
packages as well
(aeditor eg, -who knows aeditor may just run on a
browser!). This way,
people can see your contribs in action before they download just to
test. And since you know your product better, you can
display/demo all
the needing testings. And they can thus say “ah, it’s working”. [I hope other packagers will have some demo page as well. Is this possible w Rubyforge or something??]. Hope I wasn’t asking too much
An editor web frontend, that new. Its sligthly more complex
to move a cursor around, and send the position back to a
server, rendering and transfer buffer text. It may require
either JavaScipt or Java. I rather spend some time on
finishing the sub-components: regexp, rubyembed, coverage…
Sorry no web frontend this time. I could make some animated
gif’s, or a whole movie of the editor in action?
Well, I was just shooting for the stars. Your work and that of
ErikVeenstra’s webdialog just pop in my mind… just maybe… it could be
possible…
However you are on to something, AEditor is too complex to
install, because of the dependency on Ncurses. I have long
been thinking about making a frontend for Curses which is
distributed with Ruby, so that compilation of Ncurses can be
avoided. However I plan to make a Fox widget, which can do
some nice antialiased
rendering and do other fancy graphics stuff. However regexp
has top priority.
yes, you’re right there, especially since I also do windows stuff. Anyway,
your aeditor is promising. I’d love to have an editor that is pure 100% ruby
(I’m a text fan btw). Keep aeditor up, too.
I’m testing the sample. And the regexp.tree is cool
Great. BTW: Do you have ideas to how ‘regexp.tree’ can be
made even cooler ?
well, I also removed the word “error” in “Mismatch error” (sometimes I
prefer “NO match” :-).
Is it possible to point on the tree where the match failed?? For example
(don’t worry, I know I’m shooting for the stars again here :
C:\ruby181-12\installer\regexp-engine-0.8\samples>interactive ‘((ab)*x)’
‘ab’
±Group register=1
±Sequence
±Repeat greedy{0,-1}
> ±Group register=2
> ±Sequence
> ±Literal “a”
> ±Literal “b”
±Literal “x”
Mismatch Error: regexp does not match string.
C:\ruby181-12\installer\regexp-engine-0.8\samples>interactive ‘((ab)*x)’
‘abx’
±Group register=1
±Sequence
±Repeat greedy{0,-1}
> ±Group register=2
> ±Sequence
> ±Literal “a”
> ±Literal “b”
±Literal “x”
<>
[“abx”, “abx”, “ab”]
It would be nice as for the first case, to display:
C:\ruby181-12\installer\regexp-engine-0.8\samples>interactive ‘((ab)*x)’
‘ab’
±Group register=1
±Sequence
±Repeat greedy{0,-1}
> ±Group register=2
> ±Sequence
> ±Literal “a”
> ±Literal “b”
±Literal “x” <=== Match Failed here!
NO Match. regexp /((ab)*x)/ does not match string ‘ab’. See tree pls.
btw, a stupid question: how do you run the
web_interface.rb? I’m using
windowsxp actually.I run it via ‘mod_ruby’ through apache. I think it also can
be run with FastCGI, but I have never tried it out. I have
made a link named ‘regexp.rbx’ pointing at that file in my
www folder. Bommer, I forgot to write these instructions in
the top of ‘web_interface.rb’.
thanks for this. 'will try if I can run it on webdialog
botp, Thanks for your reply, It has been helpful to me.
–
Simon Strandgaard
kind regards -botp
···
Simon Strandgaard [mailto:neoneye@adslhome.dk] humbly wrote: