Lines Matching refs:tok
60 char **tok; // current token, not on the stack since recursive calls mutate it
136 char *tok;
215 if (!*TT.tok) error_exit("Unexpected end of input");
218 if (!strcmp(*TT.tok, "(")) { // parenthesized expression
219 TT.tok++; // consume (
223 if (!*TT.tok) error_exit("Expected )");
224 if (strcmp(*TT.tok, ")")) error_exit("Expected ) but got %s", *TT.tok);
225 } else ret->s = *TT.tok; // simple literal, all values start as strings
226 TT.tok++;
230 while (*TT.tok) {
233 while (o->tok) { // Look up operator
234 if (!strcmp(*TT.tok, o->tok)) break;
237 if (!o->tok) break; // Not an operator (extra input will fail later)
239 TT.tok++;
251 TT.tok = toys.optargs; // initialize global token
253 if (*TT.tok) error_exit("Unexpected extra input '%s'\n", *TT.tok);