Changing the Parsing Order

0 views
Skip to first unread message

Semih BUDAK

unread,
Jan 1, 2016, 11:01:57 PM1/1/16
to MOO-...@googlegroups.com
Hello,
I'm currently working on a Turkish MOO Project, however, I need to
change how verbs are parsed.
In English, Word order is, verb, direct object, preposition, indirect
object. But in Turkish, it's indirect object, preposition, direct
object, verb. Prepositions are also appended at the name of the object
names, so I need to find a way to:
1. Change the parsing order,
2. Change the parsing of the prepositions so MOO knows that the suffix
is a preposition.
Is there anybody WHO tried such a thing on here? Or someone WHO can
guide me in this endeavour.
Thanks,
Semih Budak.

Tim van Dijen

unread,
Jan 2, 2016, 5:12:32 AM1/2/16
to MOO-...@googlegroups.com
Hello Semih,

You could probably accomplish the first part by altering the parse_cmd.c
file.
Also, you may want to extend the list of prepositions with Turkish ones
in db_verbs.c
I'm a bit reluctant to believe the second part is feasible, but I'm not
sure because I'm not familiar with the Turkish language.
Good luck with it anyway.. I hope this helps a bit.

Tim

Op 31-12-2015 om 20:01 schreef Semih BUDAK:

Tim van Dijen

unread,
Jan 2, 2016, 10:22:27 AM1/2/16
to Semih BUDAK, MOO-...@googlegroups.com
Okay, so if I understand this right, both dobj and iobj can be appended
with a preposition in Turkish, the order should be the other way around
and the verb is the last word of the command.

I think this is possible when you:
1. turn around verb, dobj and iobj in the parse_cmd.c file. (might
take a little more effort than just turning them around)
2. use the match_object patch and move the object-matching in-MOO
(taking care of the composed dobj+prepstr case).
http://sourceforge.net/p/lambdamoo/patches/11/

One concern I have is that you basically introduce an extra preposition
after the iobj (or dobj in the Turkish form). That kind of breaks with
the <any> <prep> <any> format that MOO uses. Perhaps it could be an
option to tell your end-users to only used the composed form? In that
case, the above 2 actions should suffice.

It's a pretty interesting case though, since MOO's been pretty much been
English-focused throughout the years..
One of the other problems you're going to run into is the lack of
support for special characters, because I know Turkish uses some
cyrillic characters. They can be printed from moo > user, but input from
the user to the moo is simply ignored.. I have seen a working solution
once on UtopiaMOO, but unfortunately I never got a hold of the code..

Op 2-1-2016 om 15:29 schreef Semih BUDAK:
> Hello Tim,
> I've extended the list of prepositions like you've said. Let me give
> you an example of the second thing that I want, so we can see if it's
> doable or not. In Turkish, 'den' means, 'from'. You can either type
> 'Tim den', or you can get rid of the space and type 'Timden'. I need
> to tell the parser to match the end of the string to the preposition
> list, if it matches and the rest of the string matches to an object,
> give it to me as dobj or iobj.
> Thanks again,
> Semih Budak.
>> --
>> You received this message because you are subscribed to the Google Groups
>> "MOO Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to MOO-talk+u...@googlegroups.com.
>> To post to this group, send email to MOO-...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/MOO-talk.
>> For more options, visit https://groups.google.com/d/optout.
>>

Semih BUDAK

unread,
Jan 2, 2016, 11:33:20 AM1/2/16
to Tim van Dijen, MOO-...@googlegroups.com
Hello Tim,
I've extended the list of prepositions like you've said. Let me give
you an example of the second thing that I want, so we can see if it's
doable or not. In Turkish, 'den' means, 'from'. You can either type
'Tim den', or you can get rid of the space and type 'Timden'. I need
to tell the parser to match the end of the string to the preposition
list, if it matches and the rest of the string matches to an object,
give it to me as dobj or iobj.
Thanks again,
Semih Budak.

2016-01-02 12:12 GMT+02:00, Tim van Dijen <tvd...@gmail.com>:

Chris Norman

unread,
Jan 2, 2016, 1:00:52 PM1/2/16
to MOO-...@googlegroups.com
Do you happen to know if that patch is included in Stunt? It sounds like
something I'd quite like to have, but the SF page says it's not updated,
and took me to two more sites.

I thought I'd ask before spending too much more time trying to find it.

Cheers,

Tim van Dijen

unread,
Jan 2, 2016, 1:14:38 PM1/2/16
to MOO-...@googlegroups.com
It's not, but it's a really simple patch to match.cc only, so no biggy...
https://gitlab.com/mudmoo/gammamoo/commit/0b25a749b968f49cfa98283f384b511c9717518f
Also, search this list for more info on the patch.. There have been
multiple posts about it..

Op 2-1-2016 om 19:00 schreef 'Chris Norman' via MOO Talk:

Semih BUDAK

unread,
Jan 2, 2016, 3:26:47 PM1/2/16
to Tim van Dijen, MOO-...@googlegroups.com
Hello,
The project is getting clearer now. I'm making the things that I
wanted optional, even to an extend to change the verb order with a
command. I'll release it when I'm done. We don't want to type eval at
the end, do we? :)
Thanks for your help,
Semih Budak.

Semih BUDAK

unread,
Jan 4, 2016, 2:38:00 PM1/4/16
to Tim van Dijen, MOO-...@googlegroups.com
Hello Tim,
I've been trying to alter the parsing order acordingly with a property
on the player WHO typed the command, but I couldn't get it to work.
I'm not that good at server-side programming, can you give me an
example about how to do that?
Thanks,
Semih Budak.
Reply all
Reply to author
Forward
0 new messages