[comp.lang.c] Pattern matching

880716a@aucs.uucp (Dave Astels) (05/29/90)

I am about to start developing pattern matching software using C++.
I have done something similar to what I plan a while ago using LISP. I
would like an algorithm that would be more efficient than the heavily
recursive LISP implementation.  It is to be used in a real-time situation,
to analyse user input.

Input is seen as a list of strings, each being one word.  The patterns are
lists of either strings (requiring a literal match) or sub-lists (commands).
Commands include:
	match any word (0 or one occurance)
	match any words (0 or more) and (1 or more)
	match the 3 cases above, but to match, input must be in a specified list.
	etc.

I would like any information, including pointers to references.
Example code would be appreciated as well.



-- 
- Dave

Internet: 880716a@AcadiaU.CA
Bitnet:   880716a@Acadia