Exemplo n.º 1
0
void
bquote(fcode_env_t *env)
{
	char stringbuff[256];
	int len, count;
	char *strptr;

	count = len = next_bytecode(env);
	if (env->state) {
		COMPILE_TOKEN(&quote_ptr);
		strptr = (char *)HERE;
		*strptr++ = len;
		while (count--)
			*strptr++ = next_bytecode(env);
		*strptr++ = 0;
		set_here(env, (uchar_t *)strptr, "bquote");
		token_roundup(env, "bquote");
	} else {
		strptr = stringbuff;
		while (count--)
			*strptr++ = next_bytecode(env);
		*strptr = 0;
		push_string(env, stringbuff, len);
	}
}
Exemplo n.º 2
0
void
action_colon(fcode_env_t *env)
{
	token_roundup(env, "action_colon");
	env->action_ptr[env->action_count] = (token_t)HERE;
	COMPILE_TOKEN(&do_colon);
	env->action_count++;
	env->state |= 1;
}
Exemplo n.º 3
0
void
actions(fcode_env_t *env)
{
	int n;
	token_t *d;

	token_roundup(env, "actions");
	d = (token_t *)HERE;
	*d++ = (token_t)&do_default_action;
	n = (int)POP(DS);
	*d++ = n;
	env->num_actions = n;
	env->action_count = 0;
	env->action_ptr = d;
	d += n;
	set_here(env, (uchar_t *)d, "actions");
}
Exemplo n.º 4
0
void
header(fcode_env_t *env, char *name, int len, flag_t flag)
{
	char *strptr;
	flag_t *fptr;
	acf_t dptr;
	extern void add_debug_acf(fcode_env_t *, acf_t);

	/* Now form the entry in the dictionary */
	token_roundup(env, "header");
	dptr = (acf_t)HERE;
	if (len) {
		int bytes = len+2+sizeof (flag_t);
		dptr = (acf_t)(TOKEN_ROUNDUP(HERE+bytes));
		fptr = LINK_TO_FLAGS(dptr);
		strptr = (char *)fptr - 1;
		*strptr-- = len;
		*strptr-- = 0;
		while (len)
			*strptr-- = name[--len];
	} else {
		dptr++;
		fptr = LINK_TO_FLAGS(dptr);
		flag |= FLAG_NONAME;
	}
	*fptr = flag;
	*dptr = *((acf_t)env->current);
	env->lastlink = dptr++;
	set_here(env, (uchar_t *)dptr, "header");

	if (name_is_debugged(env, name)) {
		log_message(MSG_INFO, "Turning debug on for %s\n", name);
		add_debug_acf(env, LINK_TO_ACF(env->lastlink));
	}
	debug_msg(DEBUG_HEADER, "Define: '%s' @ %p\n", name, HERE);
}