muse_eval.c File Reference

#include "muse_opcodes.h"
#include <stdlib.h>

Include dependency graph for muse_eval.c:


Functions

muse_cell muse_quote (muse_cell args)
 Returns the given arguments quoted.
muse_cell muse_eval (muse_cell sexpr)
 Evaluates the given symbolic expression.
muse_cell muse_evalnext (muse_cell *sexpr)
 Evaluates the head of the list referred to by the given sexpr pointer and steps the pointer to the tail of the list, getting ready for the next call.
muse_cell muse_eval_list (muse_cell list)
 Evaluates each element of the given list, builds a new list out of the results of the evaluations and returns the list.
muse_cell muse_apply_nativefn (muse_cell fn, muse_cell args)
 Calls the given C-native function with the given sexpr as its argument list.
muse_boolean muse_bind_formals (muse_cell formals, muse_cell args)
 Binds the symbols in the given formals list to the corresponding values in the args list.
muse_cell muse_apply_lambda (muse_cell fn, muse_cell args)
 Applies the given function specification to the given argument list and returns whatever the function returns.
static muse_cell quick_quote_list (muse_cell list)
 Quick quoting a cell is used as an efficient means to pass expressions that have already been evaluated.
static muse_cell quick_unquote_list (muse_cell list)
 After quick quoting a list when passing to a native function, it must be unquoted before doing anything else.
muse_cell muse_apply (muse_cell fn, muse_cell args, muse_boolean args_already_evaluated)
 Applies the given native function or lambda to the given list of arguments and returns the result.
muse_cell muse_do (muse_cell block)
 A block of code is a list of expressions to evaluate in sequence.

Detailed Description

Author:
Srikumar K. S. (mailto:kumar@muvee.com)
Copyright (c) 2006 Jointly owned by Srikumar K. S. and muvee Technologies Pte. Ltd.

All rights reserved. See LICENSE.txt distributed with this source code or http://muvee-symbolic-expressions.googlecode.com/svn/trunk/LICENSE.txt for terms and conditions under which this software is provided to you.


Function Documentation

muse_cell muse_apply_nativefn ( muse_cell  fn,
muse_cell  args 
)

Calls the given C-native function with the given sexpr as its argument list.

muse_cell muse_apply_lambda ( muse_cell  fn,
muse_cell  args 
)

Applies the given function specification to the given argument list and returns whatever the function returns.

The function *must* be a lambda function and not a C-native function. The formal argument list of the function is bound to the given argument list and the body of the function is invoked. The formals are unbound after the function completes and the result of evaluating the body is returned.

See also:
syntax_lambda

static muse_cell quick_quote_list ( muse_cell  list  )  [static]

Quick quoting a cell is used as an efficient means to pass expressions that have already been evaluated.

The cell's reference is simply negated to indicate that it has been "quick-quoted". If you call muse_eval() on a quick-quoted objects, the object will be unquoted by just negating its cell reference.

static muse_cell quick_unquote_list ( muse_cell  list  )  [static]

After quick quoting a list when passing to a native function, it must be unquoted before doing anything else.


Generated on Mon Sep 25 23:12:47 2006 for muSE by  doxygen 1.4.7