Add sorry messages for missing array methods
This commit is contained in:
parent
89eabdfa35
commit
5442f3fee7
92
elab_expr.cc
92
elab_expr.cc
|
|
@ -4349,6 +4349,98 @@ NetExpr* PEIdent::elaborate_expr(Design*des, NetScope*scope,
|
|||
|
||||
fun->parm(0, arg);
|
||||
return fun;
|
||||
} else if (member_comp.name == "find") {
|
||||
cerr << get_fileline() << ": sorry: 'find()' "
|
||||
"array location method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "find_index") {
|
||||
cerr << get_fileline() << ": sorry: 'find_index()' "
|
||||
"array location method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "find_first") {
|
||||
cerr << get_fileline() << ": sorry: 'find_first()' "
|
||||
"array location method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "find_first_index") {
|
||||
cerr << get_fileline() << ": sorry: 'find_first_index()' "
|
||||
"array location method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "find_last") {
|
||||
cerr << get_fileline() << ": sorry: 'find_last()' "
|
||||
"array location method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "find_last_index") {
|
||||
cerr << get_fileline() << ": sorry: 'find_last_index()' "
|
||||
"array location method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "min") {
|
||||
cerr << get_fileline() << ": sorry: 'min()' "
|
||||
"array location method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "max") {
|
||||
cerr << get_fileline() << ": sorry: 'max()' "
|
||||
"array location method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "unique") {
|
||||
cerr << get_fileline() << ": sorry: 'unique()' "
|
||||
"array location method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "unique_index") {
|
||||
cerr << get_fileline() << ": sorry: 'unique_index()' "
|
||||
"array location method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
// FIXME: Check this is a real or integral type.
|
||||
} else if (member_comp.name == "sum") {
|
||||
cerr << get_fileline() << ": sorry: 'sum()' "
|
||||
"array reduction method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "product") {
|
||||
cerr << get_fileline() << ": sorry: 'product()' "
|
||||
"array reduction method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
// FIXME: Check this is only an integral type.
|
||||
} else if (member_comp.name == "and") {
|
||||
cerr << get_fileline() << ": sorry: 'and()' "
|
||||
"array reduction method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "or") {
|
||||
cerr << get_fileline() << ": sorry: 'or()' "
|
||||
"array reduction method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (member_comp.name == "xor") {
|
||||
cerr << get_fileline() << ": sorry: 'xor()' "
|
||||
"array reduction method is not currently "
|
||||
"implemented." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
25
elaborate.cc
25
elaborate.cc
|
|
@ -3816,6 +3816,31 @@ NetProc* PCallTask::elaborate_method_(Design*des, NetScope*scope,
|
|||
IVL_VT_BOOL, 32,
|
||||
true, method_name,
|
||||
"$size");
|
||||
else if (method_name=="reverse") {
|
||||
cerr << get_fileline() << ": sorry: 'reverse()' "
|
||||
"array sorting method is not currently supported."
|
||||
<< endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (method_name=="sort") {
|
||||
cerr << get_fileline() << ": sorry: 'sort()' "
|
||||
"array sorting method is not currently supported."
|
||||
<< endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (method_name=="rsort") {
|
||||
cerr << get_fileline() << ": sorry: 'rsort()' "
|
||||
"array sorting method is not currently supported."
|
||||
<< endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
} else if (method_name=="shuffle") {
|
||||
cerr << get_fileline() << ": sorry: 'shuffle()' "
|
||||
"array sorting method is not currently supported."
|
||||
<< endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (net->queue_type()) {
|
||||
|
|
|
|||
33
parse.y
33
parse.y
|
|
@ -3851,6 +3851,39 @@ expr_primary
|
|||
$$ = tmp;
|
||||
delete $1;
|
||||
}
|
||||
/* These are array methods that cannot be matched with the above rule */
|
||||
| hierarchy_identifier '.' K_and
|
||||
{ pform_name_t * nm = $1;
|
||||
nm->push_back(name_component_t(lex_strings.make("and")));
|
||||
PEIdent*tmp = pform_new_ident(@1, *nm);
|
||||
FILE_NAME(tmp, @1);
|
||||
$$ = tmp;
|
||||
delete nm;
|
||||
}
|
||||
| hierarchy_identifier '.' K_or
|
||||
{ pform_name_t * nm = $1;
|
||||
nm->push_back(name_component_t(lex_strings.make("or")));
|
||||
PEIdent*tmp = pform_new_ident(@1, *nm);
|
||||
FILE_NAME(tmp, @1);
|
||||
$$ = tmp;
|
||||
delete nm;
|
||||
}
|
||||
| hierarchy_identifier '.' K_unique
|
||||
{ pform_name_t * nm = $1;
|
||||
nm->push_back(name_component_t(lex_strings.make("unique")));
|
||||
PEIdent*tmp = pform_new_ident(@1, *nm);
|
||||
FILE_NAME(tmp, @1);
|
||||
$$ = tmp;
|
||||
delete nm;
|
||||
}
|
||||
| hierarchy_identifier '.' K_xor
|
||||
{ pform_name_t * nm = $1;
|
||||
nm->push_back(name_component_t(lex_strings.make("xor")));
|
||||
PEIdent*tmp = pform_new_ident(@1, *nm);
|
||||
FILE_NAME(tmp, @1);
|
||||
$$ = tmp;
|
||||
delete nm;
|
||||
}
|
||||
|
||||
| PACKAGE_IDENTIFIER K_SCOPE_RES hierarchy_identifier
|
||||
{ $$ = pform_package_ident(@2, $1, $3);
|
||||
|
|
|
|||
Loading…
Reference in New Issue