Lines Matching refs:element
651 struct element { struct
656 struct element *children; argument
657 struct element *next; argument
658 struct element *render_next; argument
659 struct element *list_next; argument
678 struct element *element; member
771 static struct element *parse_type(struct token **_cursor, struct token *stop,
792 type->element = parse_type(&cursor, type[1].name, NULL); in parse()
793 type->element->type_def = type; in parse()
807 static struct element *element_list;
809 static struct element *alloc_elem(struct token *type) in alloc_elem()
811 struct element *e = calloc(1, sizeof(*e)); in alloc_elem()
821 static struct element *parse_compound(struct token **_cursor, struct token *end,
827 static struct element *parse_type(struct token **_cursor, struct token *end, in parse_type()
830 struct element *top, *element; in parse_type() local
837 top = element = alloc_elem(cursor); in parse_type()
838 element->class = ASN1_UNIV; in parse_type()
839 element->method = ASN1_PRIM; in parse_type()
840 element->tag = token_to_tag[cursor->token_type]; in parse_type()
841 element->name = name; in parse_type()
850 element->class = ASN1_UNIV; in parse_type()
854 element->class = ASN1_APPL; in parse_type()
858 element->class = ASN1_CONT; in parse_type()
861 element->class = ASN1_PRIV; in parse_type()
880 element->tag &= ~0x1f; in parse_type()
881 element->tag |= strtoul(cursor->value, &p, 10); in parse_type()
902 element->flags |= ELEMENT_IMPLICIT; in parse_type()
908 element->flags |= ELEMENT_EXPLICIT; in parse_type()
916 element->method |= ASN1_CONS; in parse_type()
917 element->compound = implicit ? TAG_OVERRIDE : SEQUENCE; in parse_type()
918 element->children = alloc_elem(cursor); in parse_type()
919 element = element->children; in parse_type()
920 element->class = ASN1_UNIV; in parse_type()
921 element->method = ASN1_PRIM; in parse_type()
922 element->tag = token_to_tag[cursor->token_type]; in parse_type()
923 element->name = name; in parse_type()
927 element->type = cursor; in parse_type()
930 element->compound = ANY; in parse_type()
938 element->compound = NOT_COMPOUND; in parse_type()
943 element->method = ASN1_CONS; in parse_type()
961 element->compound = NOT_COMPOUND; in parse_type()
967 element->compound = NOT_COMPOUND; in parse_type()
977 element->compound = NOT_COMPOUND; in parse_type()
987 element->compound = TYPE_REF; in parse_type()
1002 element->compound = CHOICE; in parse_type()
1004 element->children = parse_compound(&cursor, end, 1); in parse_type()
1008 element->compound = SEQUENCE; in parse_type()
1009 element->method = ASN1_CONS; in parse_type()
1014 element->compound = SEQUENCE_OF; in parse_type()
1018 element->children = parse_type(&cursor, end, NULL); in parse_type()
1020 element->children = parse_compound(&cursor, end, 0); in parse_type()
1025 element->compound = SET; in parse_type()
1026 element->method = ASN1_CONS; in parse_type()
1031 element->compound = SET_OF; in parse_type()
1035 element->children = parse_type(&cursor, end, NULL); in parse_type()
1037 element->children = parse_compound(&cursor, end, 1); in parse_type()
1098 element->action = action; in parse_type()
1129 static struct element *parse_compound(struct token **_cursor, struct token *end, in parse_compound()
1132 struct element *children, **child_p = &children, *element; in parse_compound() local
1160 element = parse_type(&cursor, end, name); in parse_compound()
1162 element->flags |= ELEMENT_SKIPPABLE | ELEMENT_CONDITIONAL; in parse_compound()
1164 *child_p = element; in parse_compound()
1165 child_p = &element->next; in parse_compound()
1194 static void render_element(FILE *out, struct element *e, struct element *tag);
1199 static struct element *render_list, **render_list_p = &render_list;
1232 struct element *e; in render()
1298 render_element(NULL, root->element, NULL); in render()
1313 render_element(out, root->element, NULL); in render()
1332 struct element *e, *ce; in render_out_of_line_list()
1377 static void render_element(FILE *out, struct element *e, struct element *tag) in render_element()
1379 struct element *ec; in render_element()
1466 render_element(out, e->type->type->element, tag); in render_element()