Wolfram Library Archive


All Collections Articles Books Conference Proceedings
Courseware Demos MathSource Technical Notes
Title Downloads

A General Pattern Matcher
Author

Jaime Rangel-Mondragón
Organization: Universidad Autonoma de Querétaro
Department: Facultad de Informatica
Revision date

2010-07-22
Description

In this work we deal with pattern matching on expressions consisting of finite words from the set of non-capital English characters. Patterns will be described by words built from arbitrary English characters with the proviso that capital letters will stand for sub-blocks appearing in a structured context in the expression to be matched. We would like to know why pattern matching is so in the affirmative case, confirming the word as matching the given pattern by offering an explicit instantiation of the names forming its description. This mechanism is referred to as unification and its computation as parsing the given word. We implement the unification and parsing in our main recursive function. Finally, we present the Mathematica pattern mechanism similar to Prolog's backtracking; contrasting thus the two approaches.
Subjects

*Applied Mathematics > Computer Science
*Mathematics > Discrete Mathematics > Combinatorics
Keywords

pattern, matching
Downloads

Download
AGeneralPatternMatcher.rar (21.7 KB) - Unknown MIME type