working out semantic syntax highlighting problems