Author Topic: What to do about the lame EasyUO parser?  (Read 7820 times)

0 Members and 1 Guest are viewing this topic.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 12916
  • Activity:
    0.8%
  • Reputation Power: 149
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1328
  • Referrals: 32
    • View Profile
    • ScriptUO
What to do about the lame EasyUO parser?
« on: May 31, 2008, 01:05:58 PM »
0
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: [Select]
set %i 0
set %test0t monkey
set %cagedmonkey banana
set %test %caged . ( %test . ( %i , t ) )
display ok %test
stop

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: [Select]
set %i 0
set %test0100 monkey
set %cagedmonkey banana
set %test %caged . ( %test . ( %i , ( 25 * 4 ) ) )
display ok %test
stop

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.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline gateCrasher

  • Jr. Member
  • **
  • Posts: 60
  • Activity:
    0%
  • Reputation Power: 0
  • gateCrasher has no influence.
  • Respect: +7
  • Referrals: 0
    • View Profile
Re: What to do about the lame EasyUO parser?
« Reply #1 on: July 25, 2008, 05:05:01 PM »
0
I dunno, man, I'm liking something like this sort of legacy code:

Code: [Select]
#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;

:)

/gC

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 12916
  • Activity:
    0.8%
  • Reputation Power: 149
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1328
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: What to do about the lame EasyUO parser?
« Reply #2 on: July 25, 2008, 09:37:52 PM »
0
Dreaming of Perlizing your UO scripting experience again gC?  heh.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline gateCrasher

  • Jr. Member
  • **
  • Posts: 60
  • Activity:
    0%
  • Reputation Power: 0
  • gateCrasher has no influence.
  • Respect: +7
  • Referrals: 0
    • View Profile
Re: What to do about the lame EasyUO parser?
« Reply #3 on: July 26, 2008, 07:28:31 AM »
0
Dreaming of Perlizing your UO scripting experience again gC?  heh.

I amz!

Offline UOMaddog

  • Maddog
  • Elite
  • *
  • *
  • Posts: 1620
  • Activity:
    0%
  • Reputation Power: 22
  • UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...
  • Gender: Male
  • Biggest B@D@$$ of the Universe
  • Respect: +165
  • Referrals: 8
    • View Profile
    • My Website
Re: What to do about the lame EasyUO parser?
« Reply #4 on: April 19, 2009, 08:52:05 AM »
0
I'm a traditional C/C++/C# kinda guy. I hate even USING the word "set" just to make a variable! lol CPPFTW
There are 10 kinds of people in this world: those that understand binary and those that don't!

Windows:  A 64-bit tweak of a 32-bit extension to a 16-bit user interface for an 8-bit operating system based on a 4-bit architecture from a 2-bit company that can't stand 1 bit of competition!

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2537
  • Activity:
    0.2%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: What to do about the lame EasyUO parser?
« Reply #5 on: May 27, 2009, 09:50:26 PM »
0
It just has some limitations. You normally have to Take an extra step in order to reach your destination.

set %i 0
set %Next T
set %test0T monkey
set %cagedmonkey banana
set %String1 %I , %next
set %String2 %Test . %String1
set %test %caged . %string2
display ok %test


It means 2 Extra Lines of Code which Is very Annoying, but you can Still do it easily enough....
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 12916
  • Activity:
    0.8%
  • Reputation Power: 149
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1328
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: What to do about the lame EasyUO parser?
« Reply #6 on: May 27, 2009, 11:22:09 PM »
0
Yeh, my hopes are to allow a mode to let the infix parser actually work for all constructs all the time.  That would allow math arguments in places that don't normally.  However, there's so many scripts out there that have been custom coded to work in the "lame" way, that they won't work correctly otherwise.  That's the need for the compatibility mode.  I just got tired of "wondering" if the parser would actually parse like I wanted it to (i.e. C compiler)
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: What to do about the lame EasyUO parser?
« Reply #7 on: July 21, 2009, 12:47:34 PM »
0
Will you have to do a switch?  Why couldn't legacy code be made to run in the "new" parser?  What's the point of having the switch if old scripts would still work in the new one also? :)  Couldn't you just make the parser YOU want, and then make it recognize easyuo's stuff too?  <---limited experience here, but learning. :)

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 12916
  • Activity:
    0.8%
  • Reputation Power: 149
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1328
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: What to do about the lame EasyUO parser?
« Reply #8 on: July 21, 2009, 01:01:54 PM »
0
Yes, will have to have a switch because with my parser, the expressions may evaluate differently between EUO and SUO.  There's no way to describe this, especially if a script was originally written to be interpreted with EUO.  Since SUO applies a strict infix parcer to things, you'll need to let the interpreter know that it'll have to parse in its wonky way.

Mainly it's just to force a compatibility mode for older scripts.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2537
  • Activity:
    0.2%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: What to do about the lame EasyUO parser?
« Reply #9 on: July 22, 2009, 02:31:22 PM »
0
I would of figured Easyuo. (Limited Parsing) Code would still function if ran through something more advanced.

Its still the same functionality. It just can't handle Multiple (different) parsings in 1 Instance very well.

Take the way I broke down the Code for Giving that Monkey a Banana. It should read both your method and My method. I would think........
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 12916
  • Activity:
    0.8%
  • Reputation Power: 149
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1328
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: What to do about the lame EasyUO parser?
« Reply #10 on: July 22, 2009, 03:51:12 PM »
0
Not really.  Take for example the parsing of the command "menu".  This one parses differently than some of the other commands.  It seems that there are exceptions to the precedence in EUO.  Frankly, I haven't quite figured out all the deviations.  It'll take some time to determine when a space actually becomes a delimiter to the next argument, or is included in a string.

Oh, another example:

Code: [Select]
  display ok Hello world how's it going?

Classically, this should be 7 tokens, but the way EUO parses it, it's only 3 since it assumes that "Hello world how's it going?" is strung together.

But it gets deeper since the rules on infix traversal seem to be morphed in the EUO world.  I'm sure there are lots of times when you thought something might parse, but you have to "massage" the syntax a bit to get EUO to parse it the way you might expect.  I get that all the time when I use the DOT and COMMA functions. 
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Guinness

  • Full Member
  • ***
  • Posts: 101
  • Activity:
    0%
  • Reputation Power: 3
  • Guinness has no influence.
  • Gender: Male
  • Crafting Your Wears Since 97
  • Respect: +7
  • Referrals: 4
    • View Profile
    • LIVE Streaming Pros
Re: What to do about the lame EasyUO parser?
« Reply #11 on: November 14, 2012, 09:14:19 AM »
0
can you make scripts with adobe programs?
Community Experience Manager
LIVE Streaming Pros
Guinness Of Atlantic

Offline Crome969

  • RebirthUO - Developer
  • Elite
  • *
  • *
  • Posts: 2090
  • Activity:
    0%
  • Reputation Power: 24
  • Crome969 might someday be someone...Crome969 might someday be someone...Crome969 might someday be someone...Crome969 might someday be someone...
  • Gender: Male
  • StealthUO - Developer
  • Respect: +209
  • Referrals: 9
    • View Profile
    • RebirthUO - UO Freeshard
Re: What to do about the lame EasyUO parser?
« Reply #12 on: November 16, 2012, 12:27:16 PM »
0
Explain it further more what you mean;)

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5270
  • Activity:
    0.8%
  • Reputation Power: 59
  • Endless Night is leading the good life!Endless Night is leading the good life!Endless Night is leading the good life!Endless Night is leading the good life!Endless Night is leading the good life!Endless Night is leading the good life!Endless Night is leading the good life!Endless Night is leading the good life!Endless Night is leading the good life!Endless Night is leading the good life!Endless Night is leading the good life!
  • Respect: +386
  • Referrals: 1
    • View Profile
Re: What to do about the lame EasyUO parser?
« Reply #13 on: November 16, 2012, 12:54:47 PM »
0
can you make scripts with adobe programs?

no.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Tags: