Lines Matching refs:tok

105 	struct token tok;
109 cil_lexer_next(&tok);
110 hll_type = cil_strpool_add(tok.value);
119 create_node(&node, *current, tok.line, *hll_lineno, NULL);
123 create_node(&node, *current, tok.line, *hll_lineno, CIL_KEY_SRC_INFO);
126 create_node(&node, *current, tok.line, *hll_lineno, CIL_KEY_SRC_HLL);
138 cil_lexer_next(&tok);
139 if (tok.type != SYMBOL) {
143 *hll_lineno = strtol(tok.value, &end, 10);
151 cil_lexer_next(&tok);
152 if (tok.type != SYMBOL && tok.type != QSTRING) {
157 if (tok.type == QSTRING) {
158 tok.value[strlen(tok.value) - 1] = '\0';
159 tok.value = tok.value+1;
162 hll_file = cil_strpool_add(tok.value);
164 create_node(&node, *current, tok.line, *hll_lineno, hll_file);
168 cil_lexer_next(&tok);
169 if (tok.type != NEWLINE) {
177 cil_log(CIL_ERR, "Problem with high-level line mark at line %d of %s\n", tok.line, path);
211 struct token tok;
228 cil_lexer_next(&tok);
229 switch (tok.type) {
239 create_node(&node, current, tok.line, hll_lineno, NULL);
246 cil_log(CIL_ERR, "Close parenthesis without matching open at line %d of %s\n", tok.line, path);
252 tok.value[strlen(tok.value) - 1] = '\0';
253 tok.value = tok.value+1;
256 cil_log(CIL_ERR, "Symbol not inside parenthesis at line %d of %s\n", tok.line, path);
260 create_node(&node, current, tok.line, hll_lineno, cil_strpool_add(tok.value));
269 while (tok.type != NEWLINE && tok.type != END_OF_FILE) {
270 cil_lexer_next(&tok);
275 if (tok.type != END_OF_FILE) {
281 cil_log(CIL_ERR, "Open parenthesis without matching close at line %d of %s\n", tok.line, path);
285 cil_log(CIL_ERR, "High-level language line marker start without close at line %d of %s\n", tok.line, path);
290 cil_log(CIL_ERR, "Invalid token '%s' at line %d of %s\n", tok.value, tok.line, path);
293 cil_log(CIL_ERR, "Unknown token type '%d' at line %d of %s\n", tok.type, tok.line, path);
297 while (tok.type != END_OF_FILE);