}
Matcher phraseModifierMatcher = PHRASE_MODIFIERS.matcher(textileLine);
int lastOffset = 0;
PhraseModifierProcessor modifierProcessor = null;
final int textileLineLength = textileLine.length();
for (;;) {
if (dialect != null && (modifierProcessor == null || modifierProcessor.getLineStartOffset() < lastOffset)) {
modifierProcessor = dialect.findPhraseModifier(textileLine, lastOffset);
}
if (lastOffset > 0 && dialect != null) {
phraseModifierMatcher.region(lastOffset, textileLineLength);
}
int offset = -1;
if (phraseModifierMatcher.find()) {
offset = phraseModifierMatcher.start();
}
if (modifierProcessor != null) {
if (offset == -1 || modifierProcessor.getLineStartOffset() < offset) {
offset = modifierProcessor.getLineStartOffset();
if (lastOffset < offset) {
String text = textileLine.substring(lastOffset,offset);
emitText(text);
}
modifierProcessor.setParser(this);
modifierProcessor.setParserServices(services);
modifierProcessor.setBuilder(builder);
modifierProcessor.setTextile(state.textile);
modifierProcessor.emitPhrase();
lastOffset = modifierProcessor.getLineEndOffset();
continue;
}
}
if (offset == -1) {
break;