implemented a finit state machine for the scheme part of URIs