public static TokenRegex compile ( String pattern ) throws ParseException { ExpressionIterator p = QueryToPredicate . PARSER . parse ( pattern ) ; Expression exp ; TransitionFunction top = null ; while ( ( exp = p . next ( ) ) != null ) { if ( top == null ) { top = consumerize ( exp ) ; } else { top = new TransitionFunction . Sequence ( top , consumerize ( exp ) ) ; } } return new TokenRegex ( top ) ; }
Compiles the regular expression