etamoo

Safe HaskellNone
LanguageHaskell2010

MOO.Command

Contents

Description

MOO command parsing and execution

Synopsis

Data Structures

data Command Source

A structure describing a player's parsed command

Parsing Typed Commands

parseWords :: Text -> [StrT] Source

Split a typed command into words according to the MOO rules for quoting and escaping.

parseCommand :: Text -> Command Source

Return a Command value describing the arguments of a typed command as parsed into verb, preposition, direct and indirect object, etc.

Executing MOO Code

runCommand :: Command -> MOO Value Source

Execute a typed command by locating and calling an appropriate MOO verb for the current player, matching dobj and iobj objects against the strings in the typed command.