text: public static Automaton ToAutomaton(Term wildcardquery){IList<Automaton> automata = new List<Automaton>();string wildcardText = wildcardquery.Text();for (int i = 0; i < wildcardText.Length; ){int c = Character.CodePointAt(wildcardText, i);int length = Character.CharCount(c);switch (c){case WILDCARD_STRING:automata.Add(BasicAutomata.MakeAnyString());break;case WILDCARD_CHAR:automata.Add(BasicAutomata.MakeAnyChar());break;case WILDCARD_ESCAPE:if (i + length < wildcardText.Length){int nextChar = Character.CodePointAt(wildcardText, i + length);length += Character.CharCount(nextChar);automata.Add(BasicAutomata.MakeChar(nextChar));break;} goto default;default:automata.Add(BasicAutomata.MakeChar(c));break;}i += length;}return BasicOperations.Concatenate(automata);}