X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/6e2b3026c6a496e81642c373796bd39dad33d2a6..1b7818e18ed7bcf3464e307b97c6e0e6d72cc69b:/VHDLConverter.cpp?ds=sidebyside diff --git a/VHDLConverter.cpp b/VHDLConverter.cpp index 88b371f..275ceb4 100644 --- a/VHDLConverter.cpp +++ b/VHDLConverter.cpp @@ -359,14 +359,18 @@ void VHDLConverter::readPorts(QTextStream &in) throw(Exception) { void VHDLConverter::readArchitecture(QTextStream &in) throw(Exception) { QString line = ""; - QString endLine = "end "+archName; + QString endLine1 = "end "+archName; + QString endLine2 = "end architecture "+archName; + bool stop = false; - while (!line.startsWith(endLine)) { + while (!stop) { line = in.readLine(); if (!line.isEmpty()) line = line.simplified(); archLines.append(line); - } - + if ((line.startsWith(endLine1)) || (line.startsWith(endLine2)) ) { + stop = true; + } + } } // This function opens a VHDL file and get the informations about the entity :