Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
compile.h File Reference
#include "mruby.h"
#include <setjmp.h>
Include dependency graph for compile.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mrbc_context
struct  mrb_ast_node
struct  mrb_parser_message
struct  mrb_parser_heredoc_info
struct  mrb_parser_state

Macros

#define STR_FUNC_PARSING   0x01
#define STR_FUNC_EXPAND   0x02
#define STR_FUNC_REGEXP   0x04
#define STR_FUNC_WORD   0x08
#define STR_FUNC_SYMBOL   0x10
#define STR_FUNC_ARRAY   0x20
#define STR_FUNC_HEREDOC   0x40
#define STR_FUNC_XQUOTE   0x80
#define MRB_PARSER_BUF_SIZE   1024

Typedefs

typedef struct mrbc_context mrbc_context
typedef struct mrb_ast_node mrb_ast_node

Enumerations

enum  mrb_lex_state_enum {
  EXPR_BEG, EXPR_END, EXPR_ENDARG, EXPR_ENDFN,
  EXPR_ARG, EXPR_CMDARG, EXPR_MID, EXPR_FNAME,
  EXPR_DOT, EXPR_CLASS, EXPR_VALUE, EXPR_MAX_STATE
}
enum  mrb_string_type {
  str_not_parsing = (0), str_squote = (STR_FUNC_PARSING), str_dquote = (STR_FUNC_PARSING|STR_FUNC_EXPAND), str_regexp = (STR_FUNC_PARSING|STR_FUNC_REGEXP|STR_FUNC_EXPAND),
  str_sword = (STR_FUNC_PARSING|STR_FUNC_WORD|STR_FUNC_ARRAY), str_dword = (STR_FUNC_PARSING|STR_FUNC_WORD|STR_FUNC_ARRAY|STR_FUNC_EXPAND), str_ssym = (STR_FUNC_PARSING|STR_FUNC_SYMBOL), str_ssymbols = (STR_FUNC_PARSING|STR_FUNC_SYMBOL|STR_FUNC_ARRAY),
  str_dsymbols = (STR_FUNC_PARSING|STR_FUNC_SYMBOL|STR_FUNC_ARRAY|STR_FUNC_EXPAND), str_heredoc = (STR_FUNC_PARSING|STR_FUNC_HEREDOC), str_xquote = (STR_FUNC_PARSING|STR_FUNC_XQUOTE|STR_FUNC_EXPAND)
}

Functions

mrbc_contextmrbc_context_new (mrb_state *mrb)
void mrbc_context_free (mrb_state *mrb, mrbc_context *cxt)
const char * mrbc_filename (mrb_state *mrb, mrbc_context *c, const char *s)
void mrbc_partial_hook (mrb_state *mrb, mrbc_context *c, int(*partial_hook)(struct mrb_parser_state *), void *data)
struct mrb_parser_statemrb_parser_new (mrb_state *)
void mrb_parser_free (struct mrb_parser_state *)
void mrb_parser_parse (struct mrb_parser_state *, mrbc_context *)
void mrb_parser_set_filename (struct mrb_parser_state *, char const *)
char const * mrb_parser_get_filename (struct mrb_parser_state *, uint16_t idx)
struct mrb_parser_statemrb_parse_string (mrb_state *, const char *, mrbc_context *)
struct mrb_parser_statemrb_parse_nstring (mrb_state *, const char *, int, mrbc_context *)
int mrb_generate_code (mrb_state *, struct mrb_parser_state *)
mrb_value mrb_load_string (mrb_state *mrb, const char *s)
mrb_value mrb_load_nstring (mrb_state *mrb, const char *s, int len)
mrb_value mrb_load_string_cxt (mrb_state *mrb, const char *s, mrbc_context *cxt)
mrb_value mrb_load_nstring_cxt (mrb_state *mrb, const char *s, int len, mrbc_context *cxt)

Macro Definition Documentation

#define MRB_PARSER_BUF_SIZE   1024

Definition at line 100 of file compile.h.

#define STR_FUNC_ARRAY   0x20

Definition at line 71 of file compile.h.

#define STR_FUNC_EXPAND   0x02

Definition at line 67 of file compile.h.

#define STR_FUNC_HEREDOC   0x40

Definition at line 72 of file compile.h.

#define STR_FUNC_PARSING   0x01

Definition at line 66 of file compile.h.

#define STR_FUNC_REGEXP   0x04

Definition at line 68 of file compile.h.

#define STR_FUNC_SYMBOL   0x10

Definition at line 70 of file compile.h.

#define STR_FUNC_WORD   0x08

Definition at line 69 of file compile.h.

#define STR_FUNC_XQUOTE   0x80

Definition at line 73 of file compile.h.

Typedef Documentation

typedef struct mrb_ast_node mrb_ast_node
typedef struct mrbc_context mrbc_context

Enumeration Type Documentation

Enumerator:
EXPR_BEG 
EXPR_END 
EXPR_ENDARG 
EXPR_ENDFN 
EXPR_ARG 
EXPR_CMDARG 
EXPR_MID 
EXPR_FNAME 
EXPR_DOT 
EXPR_CLASS 
EXPR_VALUE 
EXPR_MAX_STATE 

Definition at line 44 of file compile.h.

Enumerator:
str_not_parsing 
str_squote 
str_dquote 
str_regexp 
str_sword 
str_dword 
str_ssym 
str_ssymbols 
str_dsymbols 
str_heredoc 
str_xquote 

Definition at line 75 of file compile.h.

Function Documentation

int mrb_generate_code ( mrb_state ,
struct mrb_parser_state  
)

Definition at line 2855 of file codegen.c.

Here is the caller graph for this function:

mrb_value mrb_load_nstring ( mrb_state mrb,
const char *  s,
int  len 
)

Definition at line 11101 of file parse.c.

Here is the call graph for this function:

mrb_value mrb_load_nstring_cxt ( mrb_state mrb,
const char *  s,
int  len,
mrbc_context cxt 
)

Definition at line 11095 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

mrb_value mrb_load_string ( mrb_state mrb,
const char *  s 
)

Definition at line 11113 of file parse.c.

Here is the call graph for this function:

mrb_value mrb_load_string_cxt ( mrb_state mrb,
const char *  s,
mrbc_context cxt 
)

Definition at line 11107 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

struct mrb_parser_state* mrb_parse_nstring ( mrb_state ,
const char *  ,
int  ,
mrbc_context  
)
read

Definition at line 11009 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

struct mrb_parser_state* mrb_parse_string ( mrb_state ,
const char *  ,
mrbc_context  
)
read

Definition at line 11023 of file parse.c.

Here is the call graph for this function:

void mrb_parser_free ( struct mrb_parser_state )

Definition at line 10915 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char const* mrb_parser_get_filename ( struct mrb_parser_state ,
uint16_t  idx 
)

Definition at line 10984 of file parse.c.

Here is the call graph for this function:

struct mrb_parser_state* mrb_parser_new ( mrb_state )
read

Definition at line 10873 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void mrb_parser_parse ( struct mrb_parser_state ,
mrbc_context  
)

Definition at line 10847 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void mrb_parser_set_filename ( struct mrb_parser_state ,
char const *   
)

Definition at line 10956 of file parse.c.

Here is the call graph for this function:

void mrbc_context_free ( mrb_state mrb,
mrbc_context cxt 
)

Definition at line 10929 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

mrbc_context* mrbc_context_new ( mrb_state mrb)

Definition at line 10920 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

const char* mrbc_filename ( mrb_state mrb,
mrbc_context c,
const char *  s 
)

Definition at line 10936 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void mrbc_partial_hook ( mrb_state mrb,
mrbc_context c,
int(*)(struct mrb_parser_state *)  partial_hook,
void *  data 
)

Definition at line 10949 of file parse.c.