vm/kite_compiler.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "objs/kite_object.h"
#include "kite_vm.h"

Typedefs

typedef void * yyscan_t
typedef void * YY_BUFFER_STATE

Functions

int yylex_init (yyscan_t *)
void yyset_extra (void *, yyscan_t)
void yyset_in (FILE *, yyscan_t)
int yylex_destroy (yyscan_t)
int yyparse (void *)
kite_object_tkite_vm_compile_from_file (kite_thread_t *thd, char *file)
kite_object_tkite_vm_compile_from_file_without_create (kite_thread_t *thd, char *file, kite_object_t *obj)
kite_object_tkite_vm_compile_from_fp (kite_thread_t *thd, FILE *fp, char *f, kite_object_t *obj)
void yy_switch_to_buffer (YY_BUFFER_STATE, yyscan_t)
void yy_delete_buffer (YY_BUFFER_STATE, yyscan_t)
YY_BUFFER_STATE yy_scan_string (const char *, yyscan_t)
kite_object_tkite_vm_compile_from_string (kite_thread_t *thd, char *code, int ln)
kite_object_tkite_vm_compile_from_string_without_obj (kite_thread_t *thd, char *code, int ln, kite_object_t *obj)

Typedef Documentation

typedef void* YY_BUFFER_STATE

typedef void* yyscan_t


Function Documentation

kite_object_t* kite_vm_compile_from_file ( kite_thread_t thd,
char *  file 
) [read]

Compile Kite code from a file.

Parameters:
thd The current thread.
file The path to the file to compile.
Returns:
The object that has been compiled.
Note:
thd->exception will be non-NULL if there was a problem during compile.

References kite_dereference_and_load(), kite_new_class(), and kite_vm_compile_from_fp().

kite_object_t* kite_vm_compile_from_file_without_create ( kite_thread_t thd,
char *  file,
struct kite_object_t created_obj 
) [read]

Compile Kite code from a file using pre-created object.

Parameters:
thd The current thread.
file The file to compile.
created_obj The pre-created object to use.
Returns:
The object that has been compiled.
Note:
thd->exception will be non-NULL if there was a problem during compile.

References kite_vm_compile_from_fp().

kite_object_t* kite_vm_compile_from_fp ( kite_thread_t thd,
FILE *  fp,
char *  file,
struct kite_object_t created_obj 
) [read]

Compile Kite code from an already open file.

Parameters:
thd The current thread.
fp The file to compile.
file The file name to associate with the object.
created_obj The pre-created object to use.
Returns:
The object that has been compiled.
Note:
thd->exception will be non-NULL if there was a problem during compile.

References kite_object_t::builtin_data, kite_compiler_t::currentLine, kite_compiler_t::decide_exits, FALSE, kite_compiler_t::file, kite_function_t::functype, kite_object_t::funcvalue, kite_destroy_stack(), kite_pop_stack(), kite_push_stack(), kite_compiler_t::obj_created, kite_compiler_t::thd, yylex_destroy(), yylex_init(), yyparse(), yyset_extra(), and yyset_in().

Referenced by kite_vm_compile_from_file(), and kite_vm_compile_from_file_without_create().

kite_object_t* kite_vm_compile_from_string ( kite_thread_t thd,
char *  code,
int  ln 
) [read]

Compile Kite code from a string.

Parameters:
thd The current thread.
code The code to compile.
ln The starting line number.
Returns:
The object that has been compiled.
Note:
thd->exception will be non-NULL if there was a problem during compile.

References kite_dereference_and_load(), kite_new_class(), and kite_vm_compile_from_string_without_obj().

kite_object_t* kite_vm_compile_from_string_without_obj ( kite_thread_t thd,
char *  code,
int  ln,
struct kite_object_t obj 
) [read]

Compile Kite code from a string using pre-made object.

Parameters:
thd The current thread.
code The code to compile.
ln The starting line number.
obj The object that has been pre-made.
Returns:
The object that has been compiled.
Note:
thd->exception will be non-NULL if there was a problem during compile.

References kite_object_t::builtin_data, kite_compiler_t::currentLine, FALSE, kite_compiler_t::file, kite_function_t::functype, kite_object_t::funcvalue, kite_pop_stack(), kite_push_stack(), kite_compiler_t::obj_created, kite_compiler_t::thd, yy_delete_buffer(), yy_scan_string(), yy_switch_to_buffer(), yylex_destroy(), yylex_init(), yyparse(), and yyset_extra().

Referenced by kite_vm_compile_from_string().

void yy_delete_buffer ( YY_BUFFER_STATE  ,
yyscan_t   
)

YY_BUFFER_STATE yy_scan_string ( const char *  ,
yyscan_t   
)

void yy_switch_to_buffer ( YY_BUFFER_STATE  ,
yyscan_t   
)

int yylex_destroy ( yyscan_t   ) 

int yylex_init ( yyscan_t  ) 

int yyparse ( void *   ) 

void yyset_extra ( void *  ,
yyscan_t   
)

void yyset_in ( FILE *  ,
yyscan_t   
)

Referenced by kite_vm_compile_from_fp().


Generated on Mon Apr 13 23:02:00 2009 for Kite by  doxygen 1.5.6