Skip to content

Commit 9f0997e

Browse files
committed
issue114 liberty colons round 3
Signed-off-by: James Cherry <[email protected]>
1 parent 8720475 commit 9f0997e

File tree

4 files changed

+1
-31
lines changed

4 files changed

+1
-31
lines changed

liberty/LibertyLex.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ HNAME ({PIN_NAME}|{BUS_NAME}|{MIXED_NAME})([\/.]({PIN_NAME}|{BUS_NAME}|{MIXED_NA
7070
/* default_operating_conditions : slow_100_3.00 ; */
7171
/* revision : 1.0.17; */
7272
/* default_wire_load : xc2v250-5_avg; */
73-
TOKEN ({ALPHA}|{DIGIT}|_)({ALPHA}|{DIGIT}|[._\-])*
73+
TOKEN ({ALPHA}|{DIGIT}|_)({ALPHA}|{DIGIT}|[._\-])*(:({ALPHA}|{DIGIT}|_)+)?
7474
/* bus_naming_style : %s[%d] ; */
7575
BUS_STYLE "%s"{BUS_LEFT}"%d"{BUS_RIGHT}
7676
PUNCTUATION [,\:;|(){}+*&!'=]

liberty/LibertyParse.yy

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,6 @@ group:
8686
{ sta::libertyGroupBegin($1, $3, $5); }
8787
statements '}' semi_opt
8888
{ $$ = sta::libertyGroupEnd(); }
89-
/* group(name1:name2) { stmts } */
90-
| KEYWORD '(' KEYWORD ':' KEYWORD ')' line '{'
91-
{ sta::LibertyAttrValueSeq *args = sta::makeLibertyGroupColonArgs($3, $5);
92-
sta::libertyGroupBegin($1, args, $7); }
93-
statements '}' semi_opt
94-
{ $$ = sta::libertyGroupEnd(); }
95-
/* group(name1:name2); */
96-
| KEYWORD '(' KEYWORD ':' KEYWORD ')' line
97-
{ sta::LibertyAttrValueSeq *args = sta::makeLibertyGroupColonArgs($3, $5);
98-
sta::libertyGroupBegin($1, args, $7); }
99-
semi_opt
100-
{ $$ = sta::libertyGroupEnd(); }
10189
;
10290

10391
line: /* empty */

liberty/LibertyParser.cc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,6 @@ libertyGroupEnd()
127127
}
128128
}
129129

130-
// Helper for brain damaged group args with embedded colon.
131-
// group(name1:name2) { stmts }
132-
LibertyAttrValueSeq *
133-
makeLibertyGroupColonArgs(const char *name1,
134-
const char *name2)
135-
{
136-
LibertyAttrValueSeq *attr_values = new sta::LibertyAttrValueSeq;
137-
char *str_arg = stringPrint("%s:%s", name1, name2);
138-
stringDelete(name1);
139-
stringDelete(name2);
140-
LibertyAttrValue *arg = makeLibertyStringAttrValue(str_arg);
141-
attr_values->push_back(arg);
142-
return attr_values;
143-
}
144-
145130
////////////////////////////////////////////////////////////////
146131

147132
LibertyStmt::LibertyStmt(int line) :

liberty/LibertyParser.hh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,6 @@ void
303303
libertyGroupBegin(const char *type,
304304
LibertyAttrValueSeq *params,
305305
int line);
306-
LibertyAttrValueSeq *
307-
makeLibertyGroupColonArgs(const char *name1,
308-
const char *name2);
309306
LibertyGroup *
310307
libertyGroupEnd();
311308
LibertyGroup *

0 commit comments

Comments
 (0)