Scripting Resources & Utilities > General Discussion

What to do about the lame EasyUO parser?

(1/3) > >>

TrailMyx:
It's a darn shame I need to keep compatibility with the old EasyUO code.  I've always wanted to be able to parse things like this:


--- Code: ---set %i 0
set %test0t monkey
set %cagedmonkey banana
set %test %caged . ( %test . ( %i , t ) )
display ok %test
stop

--- End code ---

Mine parses this just fine; hand that monkey a "banana"; he doesn't want a "%caged("

At the moment, I believe EasyUO uses 3 or more separate syntax parsers based upon what commands are being executed and the data contained within a command.

Arguments for "display" and "menu" seem to use a simple no math parser.  The rest use a math parser unless certain rules are broken.  I'm figuring those rules out by trial and error and I've written quite a bit of test code that I use to compare what my parser does vs. EUO.

or this one:


--- Code: ---set %i 0
set %test0100 monkey
set %cagedmonkey banana
set %test %caged . ( %test . ( %i , ( 25 * 4 ) ) )
display ok %test
stop

--- End code ---

So going forward, I will be adding a "compatibility" mode for parsing through traditional EasyUO formatted code, but allow for a switch to implement the enhanced parsing features of ScriptUO.

gateCrasher:
I dunno, man, I'm liking something like this sort of legacy code:


--- Code: ---#set %i 0
my $i=0;
#set %test0100 monkey
my $test0100='monkey';
#set %cagedmonkey banana
my $cagedmonkey='banana';
#set %test %caged . ( %test . ( %i , ( 25 * 4 ) ) )
my $test=$cagedmonkey . ($test0100 . ($i (25 * 4) ) );
#display ok %test
print OK "$test","\n";
#stop
exit 0;

--- End code ---

:)

/gC

TrailMyx:
Dreaming of Perlizing your UO scripting experience again gC?  heh.

gateCrasher:

--- Quote from: TrailMyx on July 25, 2008, 09:37:52 PM ---Dreaming of Perlizing your UO scripting experience again gC?  heh.

--- End quote ---

I amz!

UOMaddog:
I'm a traditional C/C++/C# kinda guy. I hate even USING the word "set" just to make a variable! lol CPPFTW

Navigation

[0] Message Index

[#] Next page

Go to full version