October 1997
- Carnage, scripting newbie guides Koster, Raph
- Carnage, scripting newbie guides Nathan Yospe
- Carnage, scripting newbie guides Chris Gray
- Carnage, scripting newbie guides ##Make Nylander
- Carnage, scripting newbie guides ##Make Nylander
- Usability and interface and who the hell is supposed to clawrenc@cup.hp.com
- 101 Spells Not Worth Memorizing clawrenc@cup.hp.com
- more classes (Usability and interface and who the Brian Price
- more classes (Usability and interface and who the Matt Chatterley
- more classes (Usability and interface and who the coder@ibm.net
- Stranger in a Strange Land (was Usability and interface and Maddy
- Tablets. Ola Fosheim Grøstad
- Stranger in a Strange Land (was Usability and interface clawrenc@cup.hp.com
- Usability and interface ... Marian Griffith
- Usability and interface ... Caliban Tiresias Darklock
- Usability and interface ... Broly
- Usability and interface ... Caliban Tiresias Darklock
- Usability and interface ... Derrick Jones
- Usability and interface ... coder@ibm.net
- Usability and interface ... Derrick Jones
- Usability and interface ... coder@ibm.net
- Usability and interface ... coder@ibm.net
- Usability and interface ... Marian Griffith
- Turn-based Combat Jon A. Lambert
- Turn-based Combat Travis Casey
- Turn-based Combat John G.
- OT: I'm moving! coder@ibm.net
- (fwd) New mud release coder@ibm.net
- Riddles for games clawrenc@cup.hp.com
- Riddles for games Chris Gray
- Riddles for games coder@ibm.net
- The Trap Collection clawrenc@cup.hp.com
- Learning through failure Jon A. Lambert
- Learning through failure Maddy
- The Trap Collection - Volume II clawrenc@cup.hp.com
- THE COMPLETE GUIDE TO UNLAWFUL CARNAL KNOWLEDGE FOR FANTASY ROLE-PLAYING GAMES clawrenc@cup.hp.com
- (fwd) New MUD software wanted? coder@ibm.net
- (fwd) New MUD software wanted? Felix A. Croes
- (fwd) New MUD software wanted? coder@ibm.net
- META: File attachments as list postings. coder@ibm.net
- More Riddles... Jon A. Lambert
- More Riddles... Jon A. Lambert
- multiple intelligences Brandon J. Rickman
- multiple intelligences Travis Casey
- multiple intelligences Brandon J. Rickman
- multiple intelligences S001GMU@nova.wright.edu
- multiple intelligences Travis S. Casey
- multiple intelligences coder@ibm.net
- OT: Usability and interface and who the hell is suppo coder@ibm.net
- Fear of magic (was:Usability and interface) Derrick Jones
- Fear of magic (was:Usability and interface) Michael Hohensee
- Fear of magic (was:Usability and interface) coder@ibm.net
- The Official T$R Book of Adventure Suggestions coder@ibm.net
- Mud governance Koster, Raph
- Mud governance Felix A. Croes
- Mud governance Mike Sellers
- Mud governance Travis Casey
- Mud governance coder@ibm.net
- Mud governance Mike Sellers
- Mud governance coder@ibm.net
- Mud governance S001GMU@nova.wright.edu
- Mud governance coder@ibm.net
- Mud governance Koster, Raph
- Mud governance coder@ibm.net
- OT: Usability and interface and who the hell is su Jon A. Lambert
- Fear of magic (was:Usability and interface) Marian Griffith
- Fear of magic (was:Usability and interface) Derrick Jones
- Fear of magic (was:Usability and interface) coder@ibm.net
- Fear of magic (was:Usability and interface) Nathan Yospe
- Fear of magic (was:Usability and interface) Marian Griffith
- Fear of magic (was:Usability and interface) Sauron
- Fear of magic (was:Usability and interface) coder@ibm.net
- Fear of magic (was:Usability and interface) Marian Griffith
- Fear of magic (was:Usability and interface) coder@ibm.net
- Fear of magic (was:Usability and interface) Brandon J. Rickman
- Fear of magic (was:Usability and interface) Derrick Jones
- Fear of magic (was:Usability and interface) Jon A. Lambert
- Fear of magic (was:Usability and interface) Adam Wiggins
- Fear of magic (was:Usability and interface) Derrick Jones
- Fear of magic (was:Usability and interface) Derrick Jones
- Fear of magic (was:Usability and interface) Derrick Jones
- Fear of magic (was:Usability and interface) coder@ibm.net
- Fear of magic (was:Usability and interface) coder@ibm.net
- Fear of magic (was:Usability and interface) Sauron
- Fear of magic (was:Usability and interface) Marian Griffith
- Fear of magic (was:Usability and interface) Marian Griffith
- Fear of magic (was:Usability and interface) Jon A. Lambert
- Fear of magic (was:Usability and interface) coder@ibm.net
- Fear of magic (was:Usability and interface) Vadim Tkachenko
- Fear of magic (was:Usability and interface) Sauron
- Fear of magic (was:Usability and interface) Stephen Zepp
- Fear of magic (was:Usability and interface) Matt Chatterley
- Fear of magic (was:Usability and interface) Vadim Tkachenko
- Fear of magic (was:Usability and interface) Stephen Zepp
- Fear of magic (was:Usability and interface) coder@ibm.net
- Fear of magic (was:Usability and interface) Matt Chatterley
- Fear of magic (was:Usability and interface) coder@ibm.net
- Fear of magic (was:Usability and interface) Alex Oren
- Fear of magic (was:Usability and interface) Alex Oren
- Fear of magic (was:Usability and interface) Koster, Raph
- Fear of magic (was:Usability and interface) Chris Gray
- Fear of magic (was:Usability and interface) Richard Woolcock
- Fear of magic (was:Usability and interface) Stephen Zepp
- META: List burp coder@ibm.net
- To catch a mage (was fear of magic) Derrick Jones
- To catch a mage (was fear of magic) Matt Chatterley
- To catch a mage (was fear of magic) coder@ibm.net
- To catch a mage (was fear of magic) coder@ibm.net
- To catch a mage (was fear of magic) Derrick Jones
- To catch a mage (was fear of magic) coder@ibm.net
- To catch a mage (was fear of magic) Derrick Jones
- To catch a mage (was fear of magic) coder@ibm.net
- CODE RELEASE: [mush mux] Portable Space Engine v0.8.3 RELEASED! coder@ibm.net
- ANNOUNCEMENT: [graphical commercial] Mystic Realms coder@ibm.net
- CODE RELEASE: [server] New Mud Software (SunderMUD 1.0) coder@ibm.net
- string parsing Felix A. Croes
- string parsing Chris Gray
- string parsing Felix A. Croes
- string parsing Jon A. Lambert
- string parsing Felix A. Croes
- string parsing Chris Gray
- string parsing Felix A. Croes
- string parsing Chris Gray
[Felix C:]
: object find_obj_in_obj(mixed *parsetree)
: {
: /*
: * parsetree = ({ obj1name, preposition, obj2name })
: *
: * find obj1 in obj2 (the code below has been simplified)
: */
: return present(parsetree[0], present(parsetree[2]));
: }
:
:Not actually very hackish, is it? Finding an object in another object
:is a fairly common operation.
Well, are you going to have find_obj_on_obj, find_obj_beside_obj,
find_obj_under_obj, etc.? Wouldn't you also want 'present' to be able
to properly parse a noun phrase? That's where I was thinking you might
end up recursively calling parse_string. Nothing really bad here, I
guess - there probably aren't any truly tidy alternatives that work better.
:> give [ARTICLE] ADJECTIVE* NOUN to [ARTICLE] ADJECTIVE* NOUN [PUNCTUATION]
:
:It looks as if your system used regular expressions, rather than a
:context-free grammar (a context-free grammar is just a set of
:production rules as in the example above). The latter is much more
:powerful. There is a great deal that you can find out merely by
:checking the syntax, which cuts down on the need for function calls
:that you mentioned.
Hmm. The syntax might have confused the issue. The metasymbols []* apply
to the word-types - they aren't used on characters like in a traditional
regexp. So, the above rule is read as:
the word 'give', followed by
an optional word of type ARTICLE, followed by
zero or more words of type ADJECTIVE, followed by
a word of type NOUN, followed by
the word 'to', followed by
an optional word of type ARTICLE, followed by
zero or more words of type ADJECTIVE, followed by
a word of type NOUN, followed by
an optional word of type PUNCTUATION
I guess you could think of it as a regexp of words, but I never did.
:What is your new system like?
Erff. Full docs at: ftp.myrias.com:/pub/cg/MUD/AmigaMUD/docs.tar.Z
(Not sure of the filename at the end.) Briefly:
A grammar is basically a hash table of words. It will contain "separator
words" like 'in', 'on', 'from', etc. as well as the "verbs" that will be
the first word of a command. Associated with each verb word is a list of
the forms of that verb (only Verb0, Verb1 and Verb2 forms). Each such
element includes a reference to any "separator word" needed, and a
referenced to the MUD-code routine to handle the semantics of that verb
form. Synonyms can be entered - they just point at another entry. The
verb forms are:
VerbTail - no handling of the rest of the command - it is available
to the verb routine, word by word or as a single string. E.g.
SAY hello to the mouse
Verb0 - no noun-phrase allowed. e.g. NORTH; GET UP
Verb1 - direct object wanted. Several can be given, separated by commas
or 'and', and each will be passed to the handler in turn. E.g.
GET the large rock; PUT DOWN the book and the rod.
Verb2 - direct and indirect objects wanted. First one can be several,
separated by commas or 'and'. E.g.
PUT the sword, big orange pillow INTO trophy case.
The same word can be all of the last 3 kinds, and it will be disambiguated
based on the separator words. The set of articles and punctuation handled
is fixed. Builtin 'Parse' parses an input string against a grammar - it
handles several commands at one time from the string. I have a canonical
form for noun phrases, e.g. "pillow;big,orange", and I have a builtin to
match them (allowing several alternatives for the in-db parameter). This
is used within another builtin which will look at a list of objects in the
database, and try for a match with a given input noun-phrase. In my current
scenario, there is an input command handler which checks for special forms
(leading ", leading :, etc.) as well as aliases, before it passes the
input to 'Parse', with the main grammar.
There is more detailed documentation, and examples, in the 'Parsing'
section of the "ProgConcepts.txt" file in the docs archive.
--
Chris Gray cg@ami-cg.GraySage.Edmonton.AB.CA - string parsing Felix A. Croes
- string parsing Chris Gray
- string parsing coder@ibm.net
- string parsing Felix A. Croes
- string parsing coder@ibm.net
- string parsing Chris Gray
- string parsing coder@ibm.net
- string parsing Chris Gray
- string parsing coder@ibm.net
- string parsing Jon A. Lambert
- string parsing Adam Wiggins
- string parsing Chris Gray
- string parsing Ola Fosheim Grøstad
- string parsing Chris Gray
- string parsing Felix A. Croes
- string parsing Nathan Yospe
- string parsing Felix A. Croes
- string parsing Nathan Yospe
- string parsing coder@ibm.net
- string parsing Chris Gray
- string parsing Nathan Yospe
- string parsing Chris Gray
- string parsing coder@ibm.net
- Idea: Hive-mind monster coder@ibm.net
- Idea: Hive-mind monster Adam Wiggins
- Idea: Hive-mind monster coder@ibm.net
- Idea: Hive-mind monster Sauron
- Idea: Hive-mind monster Derrick Jones
- Idea: Hive-mind monster Michael Hohensee
- Idea: Hive-mind monster Brandon J. Rickman
- Idea: Hive-mind monster coder@ibm.net
- Idea: Hive-mind monster Derrick Jones
- Idea: Hive-mind monster coder@ibm.net
- Idea: Hive-mind monster coder@ibm.net
- Idea: Hive-mind monster coder@ibm.net
- Skill Listing - Part II Jon A. Lambert
- Skill Listing - Part II Derrick Jones
- Skill Listing - Part I Jon A. Lambert
- Poison List - Part II Jon A. Lambert
- Poison List - Part III Jon A. Lambert
- Poison List - Part IV Jon A. Lambert
- Poison List - Part I Jon A. Lambert