I am trying to implement a pattern matching "syntax" and language. I know of regular expressions but these aren't enough for my scopes. I have individuated some "mathematical" operators. In the examples that follow I will suppose that the subject of pattern mathing are character strings but it isn't necessary.
Having read the description bellow: The question is, does any body knows of a mathematical theory explicitating that or any language that takes the same approach implementing it ? I would like to look at it in order to have ideas !
Descprition of approach:
At first we have characters. Characters may be aggregated to form strings.
A pattern is: a) a single character b) an ordered group of patterns with the operator matchAny c) an ordered group of patterns with the operator matchAll d) other various operators to see later on.
Explanation: We have a subject character string and a starting position.
If we check for a match of a single character, then if it matches it moves the current position forward by one position.
If we check for a match of an ordered group of patterns with the operator matchAny then it will check each element of the group in sequence and we will have a proliferation of starting positions that will get multiplied by the number of possible matches being advanced by the length of the match.
E.G suppose the group of patterns is { "a" "aba" "ab" "x" "dd" } and the string under examination is: "Dabaxddc" with current position 2 ( counting from 1 ). Then applying matchAny with the previous group we have that "a" mathces "aba" matches and "ab" matches while "x" and "dd" do not match. After having those matches there are 3 starting positions 3 4 5 ( corresponding to "a" "ab" "aba" ).
We may continue our pattern matching by accepting to have more then one starting positions. So now we may continue to the next case under examination and check for a matchAll. matchAll means that all patterns must match sequentially and are applied sequentially. subcases of matchAll are match0+ match1+ etc.
I have to add that the same fact to try to ask the question has already helped me and cleared me out some things. But I would like to know of similar approaches in order to study them. Please only languages used by you and not bibliography !!!