maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches
mlispe.h File Reference

MLISP Interpreter Functions and Macros. More...

#include <mlisps.h>
Include dependency graph for mlispe.h:

Go to the source code of this file.

Macros

#define MLISP_TOKEN_SZ_MAX   4096
 
#define MLISP_EXEC_TRACE_LVL   0
 
#define MLISP_ENV_FLAG_BUILTIN   0x02
 
#define MLISP_ENV_FLAG_CMP_GT   0x10
 Flag for _mlisp_env_cb_cmp() specifying TRUE if A > B.
 
#define MLISP_ENV_FLAG_CMP_LT   0x20
 Flag for _mlisp_env_cb_cmp() specifying TRUE if A < B.
 
#define MLISP_ENV_FLAG_CMP_EQ   0x40
 Flag for _mlisp_env_cb_cmp() specifying TRUE if A == B.
 
#define MLISP_ENV_FLAG_ARI_ADD   0x10
 Flag for _mlisp_env_cb_arithmetic() specifying to add A + B.
 
#define MLISP_ENV_FLAG_ARI_MUL   0x20
 Flag for _mlisp_env_cb_arithmetic() specifying to multiply A * B.
 
#define MLISP_ENV_FLAG_ARI_DIV   0x40
 
#define MLISP_ENV_FLAG_ARI_MOD   0x80
 
#define MLISP_ENV_FLAG_ANO_OR   0x10
 
#define MLISP_ENV_FLAG_ANO_AND   0x20
 
#define mlisp_stack_push(exec, i, ctype)
 Push a value onto MLISP_EXEC_STATE::stack.
 
#define _MLISP_TYPE_TABLE_PUSH_PROTO(idx, ctype, name, const_name, fmt)
 
#define mlisp_ast_has_ready_children(exec_child_idx, n)
 
#define MLISP_PSTATE_TABLE_CONST(name, idx)
 

Functions

MERROR_RETVAL mlisp_stack_dump (struct MLISP_PARSER *parser, struct MLISP_EXEC_STATE *exec)
 
MERROR_RETVAL mlisp_stack_pop (struct MLISP_EXEC_STATE *exec, struct MLISP_STACK_NODE *o)
 Pop a value off of (removing from) MLISP_EXEC_STATE::stack and copy it to a provided output.
 
struct MLISP_ENV_NODEmlisp_env_get_strpool (struct MLISP_PARSER *parser, struct MLISP_EXEC_STATE *exec, const char *strpool, size_t token_strpool_idx, size_t token_strpool_sz)
 Get a node from the environment denoted by a string in the strpool.
 
MERROR_RETVAL mlisp_env_unset (struct MLISP_PARSER *parser, struct MLISP_EXEC_STATE *exec, const char *token, size_t token_sz)
 
MERROR_RETVAL mlisp_env_set (struct MLISP_PARSER *parser, struct MLISP_EXEC_STATE *exec, const char *token, size_t token_sz, uint8_t env_type, const void *data, void *cb_data, uint8_t flags)
 
MERROR_RETVAL mlisp_step (struct MLISP_PARSER *parser, struct MLISP_EXEC_STATE *exec)
 

Detailed Description

MLISP Interpreter Functions and Macros.

Macro Definition Documentation

◆ mlisp_ast_has_ready_children

#define mlisp_ast_has_ready_children ( exec_child_idx,
n )
Value:
((exec_child_idx) < (n)->ast_idx_children_sz)

◆ MLISP_PSTATE_TABLE_CONST

#define MLISP_PSTATE_TABLE_CONST ( name,
idx )
Value:
extern MAUG_CONST uint8_t SEG_MCONST name;