File tree Expand file tree Collapse file tree 4 files changed +31
-1
lines changed Expand file tree Collapse file tree 4 files changed +31
-1
lines changed Original file line number Diff line number Diff 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}|[._\-])*
7474/* bus_naming_style : %s [%d ] ; */
7575BUS_STYLE "%s" {BUS_LEFT}"%d" {BUS_RIGHT}
7676PUNCTUATION [,\:;|(){}+*&!'=]
Original file line number Diff line number Diff line change @@ -86,6 +86,18 @@ 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(); }
89101 ;
90102
91103line : /* empty */
Original file line number Diff line number Diff line change @@ -127,6 +127,21 @@ 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+
130145// //////////////////////////////////////////////////////////////
131146
132147LibertyStmt::LibertyStmt (int line) :
Original file line number Diff line number Diff line change 303303libertyGroupBegin (const char *type,
304304 LibertyAttrValueSeq *params,
305305 int line);
306+ LibertyAttrValueSeq *
307+ makeLibertyGroupColonArgs (const char *name1,
308+ const char *name2);
306309LibertyGroup *
307310libertyGroupEnd ();
308311LibertyGroup *
You can’t perform that action at this time.
0 commit comments