A framework for creating text parsers that create a nested hierarchy of tags and text (like XML or HTML) by using state-based regular expressions.