Lines Matching refs:element

685 struct element {  struct
690 struct element *children; argument
691 struct element *next; argument
692 struct element *render_next; argument
693 struct element *list_next; argument
712 struct element *element; argument
802 static struct element *parse_type(struct token **_cursor, struct token *stop,
823 type->element = parse_type(&cursor, type[1].name, NULL); in parse()
824 type->element->type_def = type; in parse()
837 static struct element *element_list;
839 static struct element *alloc_elem(struct token *type) in alloc_elem()
841 struct element *e = calloc(1, sizeof(*e)); in alloc_elem()
851 static struct element *parse_compound(struct token **_cursor, struct token *end,
857 static struct element *parse_type(struct token **_cursor, struct token *end, in parse_type()
860 struct element *top, *element; in parse_type() local
867 top = element = alloc_elem(cursor); in parse_type()
868 element->class = ASN1_UNIV; in parse_type()
869 element->method = ASN1_PRIM; in parse_type()
870 element->tag = token_to_tag[cursor->token_type]; in parse_type()
871 element->name = name; in parse_type()
880 element->class = ASN1_UNIV; in parse_type()
884 element->class = ASN1_APPL; in parse_type()
888 element->class = ASN1_CONT; in parse_type()
891 element->class = ASN1_PRIV; in parse_type()
908 element->tag &= ~0x1f; in parse_type()
909 element->tag |= strtoul(cursor->content, &p, 10); in parse_type()
910 element->flags |= ELEMENT_TAG_SPECIFIED; in parse_type()
930 element->flags |= ELEMENT_IMPLICIT; in parse_type()
936 element->flags |= ELEMENT_EXPLICIT; in parse_type()
944 element->method |= ASN1_CONS; in parse_type()
945 element->compound = implicit ? TAG_OVERRIDE : SEQUENCE; in parse_type()
946 element->children = alloc_elem(cursor); in parse_type()
947 element = element->children; in parse_type()
948 element->class = ASN1_UNIV; in parse_type()
949 element->method = ASN1_PRIM; in parse_type()
950 element->tag = token_to_tag[cursor->token_type]; in parse_type()
951 element->name = name; in parse_type()
955 element->type = cursor; in parse_type()
958 element->compound = ANY; in parse_type()
966 element->compound = NOT_COMPOUND; in parse_type()
971 element->method = ASN1_CONS; in parse_type()
989 element->compound = NOT_COMPOUND; in parse_type()
995 element->compound = NOT_COMPOUND; in parse_type()
1005 element->compound = NOT_COMPOUND; in parse_type()
1015 element->compound = TYPE_REF; in parse_type()
1029 element->compound = CHOICE; in parse_type()
1031 element->children = parse_compound(&cursor, end, 1); in parse_type()
1035 element->compound = SEQUENCE; in parse_type()
1036 element->method = ASN1_CONS; in parse_type()
1041 element->compound = SEQUENCE_OF; in parse_type()
1045 element->children = parse_type(&cursor, end, NULL); in parse_type()
1047 element->children = parse_compound(&cursor, end, 0); in parse_type()
1052 element->compound = SET; in parse_type()
1053 element->method = ASN1_CONS; in parse_type()
1058 element->compound = SET_OF; in parse_type()
1062 element->children = parse_type(&cursor, end, NULL); in parse_type()
1064 element->children = parse_compound(&cursor, end, 1); in parse_type()
1122 element->action = action; in parse_type()
1151 static struct element *parse_compound(struct token **_cursor, struct token *end, in parse_compound()
1154 struct element *children, **child_p = &children, *element; in parse_compound() local
1181 element = parse_type(&cursor, end, name); in parse_compound()
1183 element->flags |= ELEMENT_SKIPPABLE | ELEMENT_CONDITIONAL; in parse_compound()
1185 *child_p = element; in parse_compound()
1186 child_p = &element->next; in parse_compound()
1214 static void dump_element(const struct element *e, int level) in dump_element()
1216 const struct element *c; in dump_element()
1248 dump_element(e->type->type->element, level + 3); in dump_element()
1257 dump_element(type_list[0].element, 0); in dump_elements()
1260 static void render_element(FILE *out, struct element *e, struct element *tag);
1265 static struct element *render_list, **render_list_p = &render_list;
1298 struct element *e; in render()
1364 render_element(NULL, root->element, NULL); in render()
1379 render_element(out, root->element, NULL); in render()
1398 struct element *e, *ce; in render_out_of_line_list()
1443 static void render_element(FILE *out, struct element *e, struct element *tag) in render_element()
1445 struct element *ec, *x; in render_element()
1529 render_element(out, e->type->type->element, tag); in render_element()