|
@@ -34,7 +34,7 @@ struct ident_st *init_ident(lgwseq_t ident) {
|
|
|
return i;
|
|
|
}
|
|
|
struct top_code_st *init_top_code() {
|
|
|
- struct tc = (struct top_code_st*)malloc(sizeof(struct top_code_st));
|
|
|
+ struct top_code_st *tc = (struct top_code_st*)malloc(sizeof(struct top_code_st));
|
|
|
tc->package=NULL;
|
|
|
INIT_LIST_HEAD(&tc->imports_head);
|
|
|
tc->context=init_context();
|
|
@@ -61,7 +61,6 @@ struct context_st *get_context(struct top_code_st *top_code) {
|
|
|
}
|
|
|
struct context_st *open_context(struct context_st *current_context) {
|
|
|
struct context_st *c = init_context();
|
|
|
- c->enclosing_context=current_context;
|
|
|
list_add_tail(&c->subcontext_list,¤t_context->subcontext_head);
|
|
|
c->enclosing=current_context;
|
|
|
return c;
|
|
@@ -183,6 +182,14 @@ struct maybequalif_schent *mayqual_ary;
|
|
|
size_t ary_len;
|
|
|
size_t at_end_idx;
|
|
|
|
|
|
+lgwseq_t schent(struct maybequalif_schent *mayqual) {
|
|
|
+ return mayqual->just_qualif?mayqual->schent.ident_mark->mark.ident:mayqual->schent.justqualif;
|
|
|
+}
|
|
|
+
|
|
|
+int maybequalif_schent_compar(const struct maybequalif_schent *a, const struct maybequalif_schent *b) {
|
|
|
+ return lgwseq_t_compar(&schent(a),&schent(b));
|
|
|
+}
|
|
|
+
|
|
|
/* Set up a data structure of anithing that may be a qualifier, regardless if indeed it is.
|
|
|
* X may be a qualifier if any of the following expressions denotes a referential:
|
|
|
* X.Y.Z, Y.X.Z, even Y.Z.X, otherwise noting about X doesn't match to be a qualifier
|
|
@@ -243,7 +250,7 @@ void expand_qualifiees(struct maybequalif_schent *bounds, size_t *at_end_idx, si
|
|
|
eqcls_repre->qualifiee_base=at_end_idx;
|
|
|
|
|
|
while(bounds->qualifiee_base+bounds->qualifiee_nelems!=eqcls_other&&!maybequalif_schent_compar(eqcls_repre, eqcls_other)) {
|
|
|
- bare_expand(eqcls_other,eqcls_repre,&at_end_idx,&ary_len); // TODO ARRAY_APPPEND(at_end_idx,ary_len,data=other); repre->qualifiee_nelems++;
|
|
|
+ bare_expand(eqcls_other,eqcls_repre,&at_end_idx,&ary_len);
|
|
|
if(eqcls_other==eqcls_repre)
|
|
|
eqcls_repre->eqcls_vec=NULL;
|
|
|
else
|