static value_t fl_set_top_level_value(value_t *args, u_int32_t nargs) { argcount("set-top-level-value!", nargs, 2); symbol_t *sym = tosymbol(args[0], "set-top-level-value!"); if (!isconstant(sym)) sym->binding = args[1]; return args[1]; }
static value_t fl_constantp(value_t *args, u_int32_t nargs) { argcount("constant?", nargs, 1); if (issymbol(args[0])) return (isconstant((symbol_t*)ptr(args[0])) ? FL_T : FL_F); if (iscons(args[0])) { if (car_(args[0]) == QUOTE) return FL_T; return FL_F; } return FL_T; }
void parseline(char *line) { char *tok; for (tok = strtok(line, delims); tok != NULL; tok = strtok(NULL, delims)) { if (isconstant(tok)) continue; if (iskeyword(tok)) continue; /* Okay, we've got a variable name. For this simple example * we just add it to a global hash table, but we could do * anything else with the list of variables on this line. */ addvariable(tok); } }