Lines Matching defs:cursor

806 	struct token *cursor;
812 cursor = type->name;
814 if (cursor[0].token_type != TOKEN_TYPE_NAME ||
815 cursor[1].token_type != TOKEN_ASSIGNMENT)
817 cursor += 2;
819 type->element = parse_type(&cursor, type[1].name, NULL);
822 if (cursor != type[1].name) {
824 filename, cursor->line, cursor->content);
858 struct token *cursor = *_cursor;
866 element->tag = token_to_tag[cursor->token_type];
870 if (cursor->token_type == TOKEN_OPEN_SQUARE) {
871 cursor++;
872 if (cursor >= end)
874 switch (cursor->token_type) {
877 cursor++;
881 cursor++;
888 cursor++;
892 filename, cursor->line, cursor->content);
896 if (cursor >= end)
898 if (cursor->token_type != TOKEN_NUMBER) {
900 filename, cursor->line, cursor->content);
905 element->tag |= strtoul(cursor->content, &p, 10);
907 if (p - cursor->content != cursor->size)
909 cursor++;
911 if (cursor >= end)
913 if (cursor->token_type != TOKEN_CLOSE_SQUARE) {
915 filename, cursor->line, cursor->content);
918 cursor++;
919 if (cursor >= end)
925 if (cursor->token_type == DIRECTIVE_IMPLICIT) {
928 cursor++;
929 if (cursor >= end)
931 } else if (cursor->token_type == DIRECTIVE_EXPLICIT) {
933 cursor++;
934 if (cursor >= end)
946 element->tag = token_to_tag[cursor->token_type];
951 element->type = cursor;
952 switch (cursor->token_type) {
955 cursor++;
963 cursor++;
986 cursor++;
992 cursor++;
993 if (cursor >= end)
995 if (cursor->token_type != DIRECTIVE_STRING)
997 cursor++;
1002 cursor++;
1003 if (cursor >= end)
1005 if (cursor->token_type != DIRECTIVE_IDENTIFIER)
1007 cursor++;
1012 ref = bsearch(cursor, type_index, nr_types, sizeof(type_index[0]),
1016 filename, cursor->line, cursor->content);
1019 cursor->type = *ref;
1021 cursor++;
1026 cursor++;
1027 element->children = parse_compound(&cursor, end, 1);
1033 cursor++;
1034 if (cursor >= end)
1036 if (cursor->token_type == DIRECTIVE_OF) {
1038 cursor++;
1039 if (cursor >= end)
1041 element->children = parse_type(&cursor, end, NULL);
1043 element->children = parse_compound(&cursor, end, 0);
1050 cursor++;
1051 if (cursor >= end)
1053 if (cursor->token_type == DIRECTIVE_OF) {
1055 cursor++;
1056 if (cursor >= end)
1058 element->children = parse_type(&cursor, end, NULL);
1060 element->children = parse_compound(&cursor, end, 1);
1066 filename, cursor->line, cursor->content);
1071 if (cursor < end && (cursor->token_type == DIRECTIVE_OPTIONAL ||
1072 cursor->token_type == DIRECTIVE_DEFAULT)
1074 cursor++;
1078 if (cursor < end && cursor->token_type == TOKEN_OPEN_ACTION) {
1079 cursor++;
1080 if (cursor >= end)
1082 if (cursor->token_type != TOKEN_ELEMENT_NAME) {
1084 filename, cursor->line, cursor->content);
1094 action->name = cursor->content;
1119 cursor->action = action;
1120 cursor++;
1121 if (cursor >= end)
1123 if (cursor->token_type != TOKEN_CLOSE_ACTION) {
1125 filename, cursor->line, cursor->content);
1128 cursor++;
1131 *_cursor = cursor;
1136 filename, cursor->line, cursor->content);
1151 struct token *cursor = *_cursor, *name;
1153 if (cursor->token_type != TOKEN_OPEN_CURLY) {
1155 filename, cursor->line, cursor->content);
1158 cursor++;
1159 if (cursor >= end)
1162 if (cursor->token_type == TOKEN_OPEN_CURLY) {
1164 filename, cursor->line);
1170 if (cursor->token_type == TOKEN_ELEMENT_NAME) {
1171 name = cursor;
1172 cursor++;
1173 if (cursor >= end)
1177 element = parse_type(&cursor, end, name);
1184 if (cursor >= end)
1186 if (cursor->token_type != TOKEN_COMMA)
1188 cursor++;
1189 if (cursor >= end)
1195 if (cursor->token_type != TOKEN_CLOSE_CURLY) {
1197 filename, cursor->line, cursor->content);
1200 cursor++;
1202 *_cursor = cursor;