Corrected an error caused by extending the parsing of the FOREIGN
keyword in LEF. FOREIGN may take an origin offset, but it is optional. The routine to check that there were no offset values in the statement incorrectly checked for a NULL token instead of a value ";" which would indicate an end-of-statement.
This commit is contained in:
parent
02669de267
commit
f1f4b82a30
|
|
@ -881,6 +881,7 @@ LefReadLefPoint(
|
|||
|
||||
token = LefNextToken(f, TRUE);
|
||||
if (!token) return -1;
|
||||
if (*token == ';') return -1;
|
||||
if (*token == '(')
|
||||
{
|
||||
token = LefNextToken(f, TRUE);
|
||||
|
|
@ -2350,7 +2351,7 @@ origin_error:
|
|||
|
||||
/* Read (optional) FOREIGN coordinate */
|
||||
result = LefReadLefPoint(f, &x, &y);
|
||||
if (result == 1) goto origin_error;
|
||||
if (result == 1) goto foreign_error;
|
||||
else if (result == 0)
|
||||
{
|
||||
gdsOffset.p_x += -(int)roundf(x / oscale);
|
||||
|
|
@ -2364,6 +2365,11 @@ origin_error:
|
|||
}
|
||||
LefEndStatement(f);
|
||||
break;
|
||||
foreign_error:
|
||||
LefError(LEF_ERROR, "Bad origin in macro FOREIGN; requires "
|
||||
"0 or 2 values.\n");
|
||||
LefEndStatement(f);
|
||||
break;
|
||||
case LEF_MACRO_END:
|
||||
if (LefParseEndStatement(f, mname) == 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue