def parseTagBody(tag)
tagRE = reForTag(tag)
openTags = 1
while(openTags > 0)
tagMatch = tagRE.match(@data[@pos,@len])
begin
@pos += tagMatch.end(0)
@len = @length - @pos
rescue Exception => exception
raise exception, "Trying to match #{tag}"
end
if(tagMatch[DynamicTag] || tagMatch[Shortform])
textToken(tagMatch.pre_match)
parseTag(tagMatch)
elsif(tagMatch[OpenTag])
openTags += 1
textToken(tagMatch.pre_match + tagMatch[0])
elsif(tagMatch[CloseTag])
openTags -= 1
textToken(tagMatch.pre_match)
textToken(tagMatch[0]) unless openTags == 0
end
end
endToken()
end