Lines Matching defs:tok

100 	struct token tok;
103 cil_lexer_next(&tok);
104 if (tok.type != SYMBOL) {
108 hll_type = cil_strpool_add(tok.value);
139 create_node(&node, *current, tok.line, *hll_offset, NULL);
143 create_node(&node, *current, tok.line, *hll_offset, CIL_KEY_SRC_INFO);
146 create_node(&node, *current, tok.line, *hll_offset, hll_type);
149 cil_lexer_next(&tok);
150 if (tok.type != SYMBOL) {
155 create_node(&node, *current, tok.line, *hll_offset, cil_strpool_add(tok.value));
158 cil_lexer_next(&tok);
159 if (tok.type != SYMBOL && tok.type != QSTRING) {
164 if (tok.type == QSTRING) {
165 tok.value[strlen(tok.value) - 1] = '\0';
166 tok.value = tok.value+1;
169 create_node(&node, *current, tok.line, *hll_offset, cil_strpool_add(tok.value));
175 cil_lexer_next(&tok);
176 if (tok.type != NEWLINE) {
189 cil_log(CIL_ERR, "Problem with high-level line mark at line %u of %s\n", tok.line, path);
226 struct token tok;
239 cil_lexer_next(&tok);
240 switch (tok.type) {
250 cil_log(CIL_ERR, "Number of open parenthesis exceeds limit of %d at line %d of %s\n", CIL_PARSER_MAX_EXPR_DEPTH, tok.line, path);
253 create_node(&node, current, tok.line, hll_offset, NULL);
260 cil_log(CIL_ERR, "Close parenthesis without matching open at line %d of %s\n", tok.line, path);
266 tok.value[strlen(tok.value) - 1] = '\0';
267 tok.value = tok.value+1;
271 cil_log(CIL_ERR, "Symbol not inside parenthesis at line %d of %s\n", tok.line, path);
275 create_node(&node, current, tok.line, hll_offset, cil_strpool_add(tok.value));
284 while (tok.type != NEWLINE && tok.type != END_OF_FILE) {
285 cil_lexer_next(&tok);
290 if (tok.type != END_OF_FILE) {
297 cil_log(CIL_ERR, "Open parenthesis without matching close at line %d of %s\n", tok.line, path);
301 cil_log(CIL_ERR, "High-level language line marker start without close at line %d of %s\n", tok.line, path);
306 cil_log(CIL_ERR, "Invalid token '%s' at line %d of %s\n", tok.value, tok.line, path);
309 cil_log(CIL_ERR, "Unknown token type '%d' at line %d of %s\n", tok.type, tok.line, path);
313 while (tok.type != END_OF_FILE);