base class for parsers