Reduct  v1.0.4-3-gdaf0d70
A functional and immutable language.
Loading...
Searching...
No Matches
parse_impl.h File Reference
#include "atom.h"
#include "char.h"
#include "core.h"
#include "error.h"
#include "gc.h"
#include "item.h"
#include "list.h"
#include "parse.h"
Include dependency graph for parse_impl.h:

Go to the source code of this file.

Data Structures

struct  reduct_parse_ctx_t
 

Macros

#define REDUCT_PARSE_STACK_MAX   256
 

Enumerations

enum  reduct_parse_precedence_t {
  REDUCT_PARSE_PRECEDENCE_NONE = 0 , REDUCT_PARSE_PRECEDENCE_LOGICAL_OR , REDUCT_PARSE_PRECEDENCE_LOGICAL_AND , REDUCT_PARSE_PRECEDENCE_COMPARISON ,
  REDUCT_PARSE_PRECEDENCE_SHIFT , REDUCT_PARSE_PRECEDENCE_BITWISE , REDUCT_PARSE_PRECEDENCE_ADD_SUB , REDUCT_PARSE_PRECEDENCE_MUL_DIV ,
  REDUCT_PARSE_PRECEDENCE_UNARY , REDUCT_PARSE_PRECEDENCE_MAX
}
 

Functions

static reduct_parse_precedence_t reduct_parse_get_precedence (reduct_handle_t handle, reduct_bool_t unary)
 
static reduct_handle_t reduct_parse_infix_transform_recursive (reduct_t *reduct, reduct_list_t *list, reduct_size_t *pos, reduct_parse_precedence_t minPrecedence)
 
static reduct_handle_t reduct_parse_infix_transform (reduct_t *reduct, reduct_list_t *list)
 
static void reduct_parse_whitespace (reduct_parse_ctx_t *ctx)
 
static void reduct_parse_quoted_atom (reduct_t *reduct, reduct_parse_ctx_t *ctx)
 
static void reduct_parse_unquoted_atom (reduct_t *reduct, reduct_parse_ctx_t *ctx)
 
REDUCT_API reduct_handle_t reduct_parse_input (reduct_t *reduct, reduct_input_t *input)
 
REDUCT_API reduct_handle_t reduct_parse (reduct_t *reduct, const char *str, reduct_size_t len, const char *path)
 Parse a Reduct string.
 
REDUCT_API reduct_handle_t reduct_parse_file (reduct_t *reduct, const char *path)
 Parse a Reduct file.
 

Macro Definition Documentation

◆ REDUCT_PARSE_STACK_MAX

#define REDUCT_PARSE_STACK_MAX   256

Definition at line 13 of file parse_impl.h.

Enumeration Type Documentation

◆ reduct_parse_precedence_t

Enumerator
REDUCT_PARSE_PRECEDENCE_NONE 
REDUCT_PARSE_PRECEDENCE_LOGICAL_OR 
REDUCT_PARSE_PRECEDENCE_LOGICAL_AND 
REDUCT_PARSE_PRECEDENCE_COMPARISON 
REDUCT_PARSE_PRECEDENCE_SHIFT 
REDUCT_PARSE_PRECEDENCE_BITWISE 
REDUCT_PARSE_PRECEDENCE_ADD_SUB 
REDUCT_PARSE_PRECEDENCE_MUL_DIV 
REDUCT_PARSE_PRECEDENCE_UNARY 
REDUCT_PARSE_PRECEDENCE_MAX 

Definition at line 24 of file parse_impl.h.

Function Documentation

◆ reduct_parse_get_precedence()

static reduct_parse_precedence_t reduct_parse_get_precedence ( reduct_handle_t  handle,
reduct_bool_t  unary 
)
static

Definition at line 38 of file parse_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduct_parse_infix_transform_recursive()

static reduct_handle_t reduct_parse_infix_transform_recursive ( reduct_t reduct,
reduct_list_t list,
reduct_size_t pos,
reduct_parse_precedence_t  minPrecedence 
)
static

Definition at line 94 of file parse_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduct_parse_infix_transform()

static reduct_handle_t reduct_parse_infix_transform ( reduct_t reduct,
reduct_list_t list 
)
static

Definition at line 148 of file parse_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduct_parse_whitespace()

static void reduct_parse_whitespace ( reduct_parse_ctx_t ctx)
static

Definition at line 159 of file parse_impl.h.

Here is the caller graph for this function:

◆ reduct_parse_quoted_atom()

static void reduct_parse_quoted_atom ( reduct_t reduct,
reduct_parse_ctx_t ctx 
)
static

Definition at line 196 of file parse_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduct_parse_unquoted_atom()

static void reduct_parse_unquoted_atom ( reduct_t reduct,
reduct_parse_ctx_t ctx 
)
static

Definition at line 238 of file parse_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduct_parse_input()

REDUCT_API reduct_handle_t reduct_parse_input ( reduct_t reduct,
reduct_input_t input 
)

Definition at line 266 of file parse_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function: