Lines Matching defs:element
414 /* Can be a directive, type name or element
432 * it's an element name
681 struct element {
686 struct element *children;
687 struct element *next;
688 struct element *render_next;
689 struct element *list_next;
708 struct element *element;
798 static struct element *parse_type(struct token **_cursor, struct token *stop,
819 type->element = parse_type(&cursor, type[1].name, NULL);
820 type->element->type_def = type;
833 static struct element *element_list;
835 static struct element *alloc_elem(void)
837 struct element *e = calloc(1, sizeof(*e));
847 static struct element *parse_compound(struct token **_cursor, struct token *end,
853 static struct element *parse_type(struct token **_cursor, struct token *end,
856 struct element *top, *element;
863 top = element = alloc_elem();
864 element->class = ASN1_UNIV;
865 element->method = ASN1_PRIM;
866 element->tag = token_to_tag[cursor->token_type];
867 element->name = name;
876 element->class = ASN1_UNIV;
880 element->class = ASN1_APPL;
884 element->class = ASN1_CONT;
887 element->class = ASN1_PRIV;
904 element->tag &= ~0x1f;
905 element->tag |= strtoul(cursor->content, &p, 10);
906 element->flags |= ELEMENT_TAG_SPECIFIED;
926 element->flags |= ELEMENT_IMPLICIT;
932 element->flags |= ELEMENT_EXPLICIT;
940 element->method |= ASN1_CONS;
941 element->compound = implicit ? TAG_OVERRIDE : SEQUENCE;
942 element->children = alloc_elem();
943 element = element->children;
944 element->class = ASN1_UNIV;
945 element->method = ASN1_PRIM;
946 element->tag = token_to_tag[cursor->token_type];
947 element->name = name;
951 element->type = cursor;
954 element->compound = ANY;
962 element->compound = NOT_COMPOUND;
967 element->method = ASN1_CONS;
985 element->compound = NOT_COMPOUND;
991 element->compound = NOT_COMPOUND;
1001 element->compound = NOT_COMPOUND;
1011 element->compound = TYPE_REF;
1025 element->compound = CHOICE;
1027 element->children = parse_compound(&cursor, end, 1);
1031 element->compound = SEQUENCE;
1032 element->method = ASN1_CONS;
1037 element->compound = SEQUENCE_OF;
1041 element->children = parse_type(&cursor, end, NULL);
1043 element->children = parse_compound(&cursor, end, 0);
1048 element->compound = SET;
1049 element->method = ASN1_CONS;
1054 element->compound = SET_OF;
1058 element->children = parse_type(&cursor, end, NULL);
1060 element->children = parse_compound(&cursor, end, 1);
1118 element->action = action;
1147 static struct element *parse_compound(struct token **_cursor, struct token *end,
1150 struct element *children, **child_p = &children, *element;
1177 element = parse_type(&cursor, end, name);
1179 element->flags |= ELEMENT_SKIPPABLE | ELEMENT_CONDITIONAL;
1181 *child_p = element;
1182 child_p = &element->next;
1210 static void dump_element(const struct element *e, int level)
1212 const struct element *c;
1244 dump_element(e->type->type->element, level + 3);
1253 dump_element(type_list[0].element, 0);
1256 static void render_element(FILE *out, struct element *e, struct element *tag);
1261 static struct element *render_list, **render_list_p = &render_list;
1294 struct element *e;
1360 render_element(NULL, root->element, NULL);
1375 render_element(out, root->element, NULL);
1394 struct element *e, *ce;
1437 * Render an element.
1439 static void render_element(FILE *out, struct element *e, struct element *tag)
1441 struct element *ec, *x;
1525 render_element(out, e->type->type->element, tag);
1588 * a stack of bitmasks to make sure no element is repeated.