|pattern matching firstname.lastname@example.org (alderaan) (2003-11-21)|
|Re: pattern matching email@example.com (Basile STARYNKEVITCH) (2003-12-03)|
|Pattern Matching firstname.lastname@example.org (2005-03-04)|
|Re: Pattern Matching email@example.com (2005-05-19)|
|Date:||4 Mar 2005 14:26:30 -0500|
I am interested in implementing an interactive fiction language as a hobby
project. My language will have methods declared as follows: class myClass:
baseclasses myMethod(a _ omeClass,b _ SomeOtherClass)_ ReturnType = block
myMethod(a _ AlfaClass,b _ BetaClass)_ ReturnType = block.
A method implementation should be tried before another if it is more
specialized in all it's arguments. Methods mentioning at least one
specific object should be tried first of all. If neither is more
specialized (ie less specialized in one arg and more specialized in
another) they should be tried in the order declared.
The only differences between classes and object in the language will
be that classes are prefixed by the word 'class', and that only
objects will be matched by the player command parser.
What I want to ask about now is about efficient ways to implement the
pattern matching algorithm, in code that will be run by a bytecode
Return to the
Search the comp.compilers archives again.