It might be easier to  a simple pre-processing pass which removes comments, then parse all the service names like normal