+static void
+check_bad_symbols(Class *c)
+{
+ GList *l;
+ for(l=c->nodes;l;l=g_list_next(l)) {
+ Node *n = l->data;
+ if(n->type == METHOD_NODE) {
+ Method *m = (Method *)n;
+ if((m->scope == SIGNAL_LAST_METHOD ||
+ m->scope == SIGNAL_FIRST_METHOD ||
+ m->scope == PRIVATE_SIGNAL_LAST_METHOD ||
+ m->scope == PRIVATE_SIGNAL_FIRST_METHOD ||
+ m->scope == VIRTUAL_METHOD ||
+ m->scope == PRIVATE_VIRTUAL_METHOD) &&
+ strcmp(m->id,"__parent__")==0) {
+ char *s;
+ s = g_strdup_printf("'%s' not allowed as an "
+ "identifier of signal "
+ "or virtual methods",
+ m->id);
+ print_error(FALSE,s,m->line_no);
+ g_free(s);
+ }
+ } else if(n->type == VARIABLE_NODE) {
+ Variable *v = (Variable *)n;
+ if(strcmp(v->id,"_priv")==0 ||
+ strcmp(v->id,"__parent__")==0) {
+ char *s;
+ s = g_strdup_printf("'%s' not allowed as a data "
+ "member name",v->id);
+ print_error(FALSE,s,v->line_no);
+ g_free(s);
+ }
+ }
+ }
+}
+
+