X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/6e2b3026c6a496e81642c373796bd39dad33d2a6..3bcfe4df6fdde086eb1b59f7a0173358170174a1:/VHDLConverter.cpp?ds=inline 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 :