Lines Matching refs:script
70 "usage: %s [options] [script [args]]\n"
73 " -i enter interactive mode after executing 'script'\n"
155 ** it has 'argv[script]', which is the script name. The arguments
156 ** to the script (everything after 'script') go to positive indices;
157 ** other arguments (before the script name) go to negative indices.
158 ** If there is no script name, assume interpreter's name as base.
160 static void createargtable (lua_State *L, char **argv, int argc, int script) {
162 if (script == argc) script = 0; /* no script name? */
163 narg = argc - (script + 1); /* number of positive indices */
164 lua_createtable(L, narg, script + 1);
167 lua_rawseti(L, -2, i - script);
212 luaL_checkstack(L, n + 3, "too many arguments to script");
227 int n = pushargs(L); /* push arguments to script */
246 ** (either the script name or a bad argument in case of error).
262 return args; /* script "name" is '-' */
292 *first = i; /* no script name */
583 int script;
584 int args = collectargs(argv, &script);
588 print_usage(argv[script]); /* 'script' has index of bad arg. */
598 createargtable(L, argv, argc, script); /* create table 'arg' */
604 if (!runargs(L, argv, script)) /* execute arguments -e and -l */
606 if (script < argc && /* execute main script (if there is one) */
607 handle_script(L, argv + script) != LUA_OK)
611 else if (script == argc && !(args & (has_e | has_v))) { /* no arguments? */