void VHDLConverter::readArchitecture(QTextStream &in) throw(Exception) {\r
\r
QString line = "";\r
- QString endLine = "end "+archName;\r
+ QString endLine1 = "end "+archName;\r
+ QString endLine2 = "end architecture "+archName;\r
+ bool stop = false;\r
\r
- while (!line.startsWith(endLine)) {\r
+ while (!stop) {\r
line = in.readLine();\r
if (!line.isEmpty()) line = line.simplified();\r
archLines.append(line);\r
- }\r
- \r
+ if ((line.startsWith(endLine1)) || (line.startsWith(endLine2)) ) {\r
+ stop = true;\r
+ }\r
+ } \r
}\r
\r
// This function opens a VHDL file and get the informations about the entity :\r