def _getSyntaxByFirstLine(self, firstLine):
        """Get syntax by first line of the file
        """
        for pattern, xmlFileName in self._firstLineToXmlFileName.items():
            if fnmatch.fnmatch(firstLine, pattern):
                return self._getSyntaxByXmlFileName(xmlFileName)
        else:
            raise KeyError("No syntax for " + firstLine)