[Ohrrpgce] Two related questions
Bob the Hamster
Bob at HamsterRepublic.com
Sat May 28 14:19:04 PDT 2005
On Sat, May 28, 2005 at 04:51:25PM -0400, Mike Caron wrote:
> > It might be more productive (and fun) to re-implement those two features
> > as a plug-in for some existing code-editor (although I don't know a
> > suitable code editor off the top of my head.)
>
> The main problem with writing a plugin for other editors is that the
> syntax rather fluid. Commands can really be called whatever the
> scripter wants (if they want to edit plotscr.hsd), and I can't recall
> any language that treats white space the way Hamster Speak does.
>
> I'll probably write a new editor in VB.Net or something. Or in QBasic.
> *evil grin* Just kidding!
*laugh* Yes.
HamsterSpeak's whietespace behaviour is truly strange. The only language
I have ever enountered that came anywhere close was COBOL... and if you
know COBOL, you will know that is a really inaccurate comparison anyway,
since COBOL's wierd whitepace handling is wierd in a completely
different way.
Anyway. Any editor that supports symbol regognition (and syntax
highlighing) according to Regular Expressions could totally support
HamsterSpeak.
For example, suppose you wanted to match "suspend NPC walls" no matter
how it was written. You would lowercase it and collapse all spaces to
"suspendnpcwalls" then you would insert " *" between each letter,
optionally matching an unknown number of spaces, getting
"s *u *s *p *e *n *d *n *p *c *w *a *l *l *s" and then you would do a
case-insensitive regex match, and it would match "suspend NPC walls" no
matter how the spacing was written, just like HSPEAK does (HSPEAK
doesn't use regular expressions, but I *wish* it did. It would be
simpler.)
Oh dear. I have started ranting about regexes, so I think I shall shut
up now before I talk all your ears off ;)
---
James
More information about the Ohrrpgce
mailing list