My Project
|
Abstract Syntaxic tree. More...
#include <inttypes.h>
Go to the source code of this file.
Data Structures | |
struct | Tag |
struct | Var_Decl_ |
struct | Stmt_Exp_ |
struct | Stmt_Index_ |
struct | Stmt_Flow_ |
struct | Match |
struct | Stmt_Code_ |
struct | Stmt_For_ |
struct | Stmt_Each_ |
struct | Stmt_Loop_ |
struct | Stmt_If_ |
struct | Handler_ |
struct | ParserHandler |
struct | Stmt_Try_ |
struct | Stmt_PP_ |
struct | Stmt_Defer_ |
struct | Stmt_Using_ |
struct | Stmt_Import_ |
struct | Spread_Def_ |
struct | Stmt |
union | Stmt::stmt_data |
struct | Variable_ |
variable declaration More... | |
struct | TmplArg |
struct | Type_Decl_ |
struct | Arg_ |
struct | Exp_Dot |
a dot expression. More... | |
struct | Capture |
struct | Exp_Lambda |
a lambda expression. More... | |
struct | Array_Sub_ |
array_subscript. More... | |
struct | Exp_Array |
array expression. More... | |
struct | Range_ |
range. More... | |
struct | Exp_Slice |
slice. More... | |
struct | Specialized |
struct | AstString |
struct | Exp_Decl |
struct | gwint |
struct | yyint |
a gwint with a larger int type for parsing More... | |
struct | Exp_Primary |
union | Exp_Primary::prim_data |
struct | Tmpl_ |
struct | Exp_Call_ |
struct | Exp_Cast |
struct | Exp_Binary |
struct | Exp_Postfix |
struct | Exp_If |
struct | UnaryNew |
struct | Exp_Unary |
struct | Exp_Named |
struct | Exp |
union | Exp::exp_data |
struct | EnumValue |
struct | Enum_Def_ |
struct | Upvalues |
struct | Func_Base_ |
struct | Fptr_Def_ |
struct | Type_Def_ |
struct | Union_Def_ |
struct | Func_Def_ |
union | Func_Def_::func_def_data |
struct | Trait_Def_ |
struct | Prim_Def_ |
struct | Section_ |
union | Section_::section_data |
struct | Extend_Def_ |
struct | Class_Def_ |
Macros | |
#define | AST_NEW(type, name, ...) |
#define | AST_FREE(type, name) |
#define | MK_TAG(a, b) |
#define | MK_STMT(_type, _loc, ...) |
#define | MK_STMT_PP(_type, _pos, ...) |
#define | MK_STMT_EXP(_pos, _exp) |
#define | MK_STMT_RETURN(_pos, _exp) |
#define | MK_VAR(a, b) |
#define | MK_TMPLARG_TD(a) |
#define | MK_TMPLARG_EXP(a) |
#define | GWINT(a, b) |
#define | MK_SECTION(_type, _target, _data, _loc) |
Typedefs | |
typedef struct Class_Def_ * | Class_Def |
typedef struct Extend_Def_ * | Extend_Def |
typedef struct Func_Def_ * | Func_Def |
typedef struct Exp | Exp |
typedef struct Stmt | Stmt |
typedef struct Array_Sub_ * | Array_Sub |
typedef struct Fptr_Def_ * | Fptr_Def |
typedef struct Type_Decl_ | Type_Decl |
typedef struct SectionList * | Ast |
typedef struct Tag | Tag |
typedef struct Var_Decl_ | Var_Decl |
typedef struct Stmt_Exp_ * | Stmt_Exp |
typedef struct Stmt_Index_ * | Stmt_Index |
typedef struct Stmt_Flow_ * | Stmt_Flow |
typedef struct Match * | Stmt_Match |
typedef struct Stmt_Code_ * | Stmt_Code |
typedef struct Handler_ | Handler |
typedef struct ParserHandler | ParserHandler |
typedef struct Stmt_Try_ * | Stmt_Try |
typedef struct Stmt_Using_ * | Stmt_Using |
typedef struct Stmt_Using_ | UsingStmt |
typedef Stmt_Using | Using |
typedef struct Stmt_Import_ * | Stmt_Import |
typedef struct Spread_Def_ * | Spread_Def |
typedef struct Stmt_For_ * | Stmt_For |
typedef struct Stmt_Each_ * | Stmt_Each |
typedef struct Stmt_Loop_ * | Stmt_Loop |
typedef struct Stmt_If_ * | Stmt_If |
typedef struct Stmt_PP_ * | Stmt_PP |
typedef struct Stmt_Defer_ * | Stmt_Defer |
typedef struct Variable_ | Variable |
variable declaration | |
typedef struct TmplArg | TmplArg |
typedef Type_Decl * | TD |
typedef struct Arg_ | Arg |
typedef struct Capture | Capture |
typedef struct Range_ | Range |
range. | |
typedef struct Specialized | Specialized |
typedef struct Tmpl_ | Tmpl |
typedef struct Exp_Call_ | Exp_Call |
typedef Exp * | E |
typedef struct EnumValue | EnumValue |
typedef struct Enum_Def_ * | Enum_Def |
typedef struct Upvalues | Upvalues |
typedef struct Func_Base_ | Func_Base |
typedef struct Type_Def_ * | Type_Def |
typedef struct Union_Def_ * | Union_Def |
typedef struct Trait_Def_ * | Trait_Def |
typedef struct Prim_Def_ * | Prim_Def |
typedef struct Section_ | Section |
Functions | |
MK_VECTOR_TYPE (Tag, tag) | |
static Stmt * | stmt_self (const void *data) |
ANEW | AST_NEW (Stmt *, stmt, const ae_stmt_t, const loc_t) |
ANN ANEW | AST_NEW (Stmt *, stmt_exp, const ae_stmt_t, Exp *, const loc_t) |
ANN ANEW | AST_NEW (Stmt *, stmt_code, StmtList *, const loc_t) |
ANN ANEW | AST_NEW (Stmt *, stmt_if, Exp *, Stmt *, const loc_t) |
ANEW ANN | AST_NEW (Stmt *, stmt_flow, const ae_stmt_t, Exp *, Stmt *, const bool, const loc_t) |
ANEW | AST_NEW (Stmt *, stmt_for, Stmt *, Stmt *, Exp *, Stmt *, const loc_t) |
ANEW ANN | AST_NEW (Stmt *, stmt_each, struct Symbol_ *, Exp *, Stmt *, const loc_t) |
ANEW ANN | AST_NEW (Stmt *, stmt_loop, Exp *, Stmt *, const loc_t) |
ANEW | ANN2 (1, 3) AST_NEW(Stmt * |
ANEW ANN | AST_NEW (Stmt *, stmt_defer, Stmt *, const loc_t) |
ANEW ANN | AST_NEW (Stmt *, stmt_try, Stmt *, HandlerList *) |
ANN void | free_stmt (MemPool p, Stmt *) |
ANN void | free_variablelist (MemPool p, VariableList *) |
ANEW ANN | AST_NEW (Type_Decl *, type_decl, const Symbol, const loc_t) |
ANN void | free_type_decl (MemPool p, Type_Decl *) |
static ANN uint32_t | tmplarg_has_const (const TmplArgList *tl) |
static ANN uint32_t | tmplarg_ntypes (const TmplArgList *tl) |
enum fbflag | __attribute__ ((packed)) |
ANN2 (1, 2, 4) AST_NEW(Exp * | |
AST_NEW (Exp *, exp_lambda2, const Symbol xid, ArgList *args, Exp *exp, const loc_t) | |
ANEW | AST_NEW (Array_Sub, array_sub, Exp *) |
ANN2 (1) Array_Sub prepend_array_sub(const Array_Sub | |
Exp *ANN void | free_array_sub (MemPool p, Array_Sub) |
ANEW ANN | AST_NEW (Exp *, exp_array, Exp *, const Array_Sub, const loc_t) |
AST_NEW (Range *, range, Exp *, Exp *) | |
ANEW ANN | AST_NEW (Exp *, exp_slice, Exp *, Range *, const loc_t) |
ANN void | free_specialized_list (MemPool p, SpecializedList *) |
ANN void | free_tmplarg_list (MemPool p, TmplArgList *) |
ANN void | free_arg_list (MemPool p, ArgList *) |
ANN ANEW | AST_NEW (Tmpl *, tmpl, SpecializedList *) |
ANN ANEW | AST_NEW (Tmpl *, tmpl_call, TmplArgList *) |
ANN void | free_tmpl (MemPool p, Tmpl *) |
static ANN bool | is_spread_tmpl (const Tmpl *tmpl) |
static bool | tmpl_base (const Tmpl *a) |
AST_NEW (Exp *, exp_named, Exp *exp, const Tag tag, const loc_t loc) | |
static ANN int | exp_getuse (const Exp *e) |
static ANN void | exp_setuse (Exp *e, const bool val) |
static ANN int | exp_getvar (const Exp *e) |
static ANN void | exp_setvar (Exp *e, const bool val) |
static ANN int | exp_getprot (const Exp *e) |
static ANN void | exp_setprot (Exp *e, const bool val) |
static ANN int | exp_getmeta (const Exp *e) |
static ANN void | exp_setmeta (Exp *e, const bool val) |
static ANN m_str | exp_access (const Exp *e) |
static Exp * | exp_self (const void *data) |
static Exp_Primary * | prim_self (const void *data) |
static Exp * | prim_exp (const void *data) |
static loc_t | prim_pos (const void *data) |
ANEW ANN | AST_NEW (Exp *, prim_id, struct Symbol_ *, const loc_t) |
ANEW | AST_NEW (Exp *, prim_int, const m_uint, const loc_t) |
ANEW | AST_NEW (Exp *, prim_float, const m_float, const loc_t) |
ANEW ANN | AST_NEW (Exp *, prim_string, const m_str, const uint16_t delim, const loc_t) |
ANEW ANN | AST_NEW (Exp *, prim_array, const Array_Sub, const loc_t) |
ANEW ANN | AST_NEW (Exp *, prim_range, Range *, const loc_t) |
ANEW | AST_NEW (Exp *, prim_dict, Exp *, const loc_t) |
ANEW | AST_NEW (Exp *, prim_hack, Exp *, const loc_t) |
ANEW ANN | AST_NEW (Exp *, prim_char, const m_str, const loc_t) |
ANEW | AST_NEW (Exp *, prim_nil, const loc_t) |
ANEW ANN | AST_NEW (Exp *, prim_interp, Exp *exp, const loc_t) |
ANEW ANN | AST_NEW (Exp *, exp_decl, Type_Decl *, const Var_Decl *, const loc_t) |
ANEW ANN | AST_NEW (Exp *, exp_binary, Exp *, const Symbol, Exp *, const loc_t) |
ANEW ANN | AST_NEW (Exp *, exp_post, Exp *, const Symbol, const loc_t) |
ANEW | AST_NEW (Exp *, exp_call, Exp *, Exp *args, const loc_t) |
ANEW ANN | AST_NEW (Exp *, exp_cast, Type_Decl *, Exp *, const loc_t) |
ANEW | AST_NEW (Exp *, exp_if, Exp *, Exp *, Exp *, const loc_t) |
ANEW ANN | AST_NEW (Exp *, exp_dot, Exp *, const Tag tag, const loc_t) |
ANEW ANN | AST_NEW (Exp *, exp_unary, const Symbol, Exp *, const loc_t) |
ANEW | ANN2 (1, 2, 3) AST_NEW(Exp * |
ANEW ANN | AST_NEW (Exp *, exp_unary3, const Symbol, StmtList *, const loc_t) |
ANN void | free_stmt_list (MemPool, StmtList *) |
ANEW ANN | AST_NEW (Exp *, exp_td, Type_Decl *, const loc_t) |
static uint32_t | exp_count (Exp *exp) |
static Exp * | take_exp (Exp *exp, const uint32_t n) |
ANN void | free_exp (MemPool p, Exp *) |
ANEW | AST_NEW (Enum_Def, enum_def, EnumValueList *, struct Symbol_ *, const loc_t) |
ANN void | free_enum_def (MemPool p, Enum_Def) |
AST_NEW (Func_Base *, func_base, Type_Decl *, const Symbol, ArgList *, const ae_flag flag, const loc_t) | |
ANEW ANN | AST_NEW (Fptr_Def, fptr_def, Func_Base *) |
ANN void | free_fptr_def (MemPool p, Fptr_Def) |
ANEW ANN | AST_NEW (Type_Def, type_def, Type_Decl *, const Symbol, const loc_t) |
ANN void | free_type_def (MemPool p, Type_Def) |
ANEW ANN | AST_NEW (Union_Def, union_def, VariableList *, const loc_t) |
ANN void | free_union_def (MemPool p, Union_Def) |
ANEW | AST_NEW (Func_Def, func_def, Func_Base *, StmtList *) |
ANN void | free_func_base (MemPool p, Func_Base *) |
ANN void | free_func_def (MemPool p, Func_Def) |
ANN ANEW Trait_Def | new_trait_def (MemPool p, const ae_flag, const Symbol, const Ast, const loc_t) |
ANN void | free_trait_def (MemPool p, Trait_Def) |
AST_NEW (Prim_Def, prim_def, const Symbol name, const m_uint size, const loc_t, const ae_flag flag) | |
ANN void | free_prim_def (MemPool p, Prim_Def) |
static bool | is_prim (const Exp *e) |
static bool | is_prim_int (const Exp *e) |
static bool | is_prim_float (const Exp *e) |
ANEW ANN | AST_NEW (Section *, section_stmt_list, StmtList *) |
ANEW ANN | AST_NEW (Section *, section_func_def, const Func_Def) |
ANEW ANN | AST_NEW (Section *, section_class_def, const Class_Def) |
ANEW ANN | AST_NEW (Section *, section_trait_def, const Trait_Def) |
ANEW ANN | AST_NEW (Section *, section_extend_def, const Extend_Def) |
ANEW ANN | AST_NEW (Section *, section_enum_def, const Enum_Def) |
ANEW ANN | AST_NEW (Section *, section_union_def, const Union_Def) |
ANEW ANN | AST_NEW (Section *, section_fptr_def, const Fptr_Def) |
ANEW ANN | AST_NEW (Section *, section_type_def, const Type_Def) |
ANEW Extend_Def | new_extend_def (MemPool p, Type_Decl *const, TagList *const) |
ANN void | free_extend_def (MemPool p, Extend_Def) |
static ANN int | cflag (const Class_Def c, const enum cflag flag) |
ANEW Class_Def | new_class_def (MemPool p, const ae_flag, const Tag, Type_Decl *, const Ast) |
ANN void | free_class_def (MemPool p, Class_Def) |
ANN void | free_ast (MemPool p, Ast) |
Variables | |
typedef | __attribute__ |
ANEW | stmt_pp |
ANEW enum ae_pp_type type const m_str const | loc_t |
fbflag_none = 1 << 0 | |
fbflag_op = 1 << 1 | |
fbflag_unary = 1 << 3 | |
fbflag_postfix = 1 << 4 | |
fbflag_internal = 1 << 5 | |
fbflag_lambda = 1 << 6 | |
fbflag_default = 1 << 7 | |
fbflag_locale = 1 << 8 | |
exp_lambda | |
const | Symbol |
ANEW | prim_perform |
ANEW | exp_unary2 |
ANEW const Type_Decl Exp * | exp |
Abstract Syntaxic tree.
Definition in file absyn.h.
#define AST_FREE | ( | type, | |
name ) |
#define AST_NEW | ( | type, | |
name, | |||
... ) |
#define GWINT | ( | a, | |
b ) |
#define MK_SECTION | ( | _type, | |
_target, | |||
_data, | |||
_loc ) |
#define MK_STMT | ( | _type, | |
_loc, | |||
... ) |
#define MK_STMT_EXP | ( | _pos, | |
_exp ) |
#define MK_STMT_PP | ( | _type, | |
_pos, | |||
... ) |
#define MK_STMT_RETURN | ( | _pos, | |
_exp ) |
#define MK_TAG | ( | a, | |
b ) |
#define MK_TMPLARG_EXP | ( | a | ) |
Definition at line 271 of file absyn.h.
#define MK_TMPLARG_TD | ( | a | ) |
Definition at line 266 of file absyn.h.
#define MK_VAR | ( | a, | |
b ) |
typedef struct Array_Sub_* Array_Sub |
typedef struct Capture Capture |
typedef struct Class_Def_* Class_Def |
typedef struct EnumValue EnumValue |
typedef struct Extend_Def_* Extend_Def |
typedef struct Func_Base_ Func_Base |
typedef struct ParserHandler ParserHandler |
typedef struct Specialized Specialized |
typedef struct Spread_Def_ * Spread_Def |
typedef struct Stmt_Code_ * Stmt_Code |
typedef struct Stmt_Defer_* Stmt_Defer |
typedef struct Stmt_Each_* Stmt_Each |
typedef struct Stmt_Flow_ * Stmt_Flow |
typedef struct Stmt_Import_ * Stmt_Import |
typedef struct Stmt_Index_ * Stmt_Index |
typedef struct Stmt_Loop_* Stmt_Loop |
typedef struct Match * Stmt_Match |
typedef struct Stmt_Using_ * Stmt_Using |
typedef struct Tag Tag |
typedef struct TmplArg TmplArg |
typedef struct Trait_Def_ * Trait_Def |
typedef struct Type_Decl_ Type_Decl |
typedef struct Union_Def_ * Union_Def |
typedef struct Upvalues Upvalues |
typedef Stmt_Using Using |
typedef struct Stmt_Using_ UsingStmt |
enum ae_Exp_Meta |
enum ae_exp_t |
Enumerator | |
---|---|
ae_exp_decl | |
ae_exp_binary | |
ae_exp_unary | |
ae_exp_primary | |
ae_exp_cast | |
ae_exp_post | |
ae_exp_call | |
ae_exp_array | |
ae_exp_slice | |
ae_exp_if | |
ae_exp_dot | |
ae_exp_lambda | |
ae_exp_td | |
ae_exp_named |
Definition at line 399 of file absyn.h.
enum ae_pp_type |
Enumerator | |
---|---|
ae_pp_include | |
ae_pp_define | |
ae_pp_pragma | |
ae_pp_undef | |
ae_pp_ifdef | |
ae_pp_ifndef | |
ae_pp_else | |
ae_pp_endif | |
ae_pp_locale | |
ae_pp_nl |
Definition at line 109 of file absyn.h.
enum ae_prim_t |
Enumerator | |
---|---|
ae_prim_id | |
ae_prim_num | |
ae_prim_float | |
ae_prim_str | |
ae_prim_array | |
ae_prim_range | |
ae_prim_dict | |
ae_prim_hack | |
ae_prim_char | |
ae_prim_nil | |
ae_prim_interp | |
ae_prim_perform | |
ae_prim_locale |
Definition at line 422 of file absyn.h.
enum ae_section_t |
Enumerator | |
---|---|
ae_section_stmt | |
ae_section_func | |
ae_section_class | |
ae_section_trait | |
ae_section_extend | |
ae_section_enum | |
ae_section_union | |
ae_section_fptr | |
ae_section_type | |
ae_section_primitive |
Definition at line 824 of file absyn.h.
enum ae_stmt_t |
Definition at line 158 of file absyn.h.
enum cflag |
Enumerator | |
---|---|
cflag_none | |
cflag_struct |
enum exp_comptime |
Enumerator | |
---|---|
comptime_no | |
comptime_yes | |
comptime_need |
enum exp_state |
Enumerator | |
---|---|
exp_state_meta | |
exp_state_prot | |
exp_state_addr | |
exp_state_use |
enum fbflag |
Definition at line 317 of file absyn.h.
enum gwint_type |
Enumerator | |
---|---|
gwint_decimal | |
gwint_binary | |
gwint_hexa | |
gwint_octal |
enum tmplarg_t |
enum unary_type |
enum fbflag __attribute__ | ( | (packed) | ) |
ANN2 | ( | 1 | ) | const |
ANEW ANN2 | ( | 1 | , |
2 | , | ||
3 | ) |
ANN2 | ( | 1 | , |
2 | , | ||
4 | ) |
ANEW ANN2 | ( | 1 | , |
3 | ) |
Definition at line 49 of file ast_new.c.
AST_NEW | ( | Func_Base * | , |
func_base | , | ||
Type_Decl * | td, | ||
const Symbol | xid, | ||
ArgList * | args, | ||
const ae_flag | flag, | ||
const loc_t | loc ) |
AST_NEW | ( | Prim_Def | , |
prim_def | , | ||
const Symbol | name, | ||
const m_uint | size, | ||
const loc_t | loc, | ||
const ae_flag | flag ) |
ANEW ANN AST_NEW | ( | Section * | , |
section_extend_def | , | ||
const Extend_Def | ) |
ANEW ANN AST_NEW | ( | Section * | , |
section_stmt_list | , | ||
StmtList * | ) |
ANEW ANN AST_NEW | ( | Stmt * | , |
stmt_each | , | ||
struct Symbol_ * | sym, | ||
Exp * | exp, | ||
Stmt * | body, | ||
const loc_t | loc ) |
ANEW ANN AST_NEW | ( | Stmt * | , |
stmt_flow | , | ||
const ae_stmt_t | type, | ||
Exp * | cond, | ||
Stmt * | body, | ||
const bool | is_do, | ||
const loc_t | loc ) |
ANN ANEW AST_NEW | ( | Tmpl * | , |
tmpl | , | ||
SpecializedList * | list ) |
ANN ANEW AST_NEW | ( | Tmpl * | , |
tmpl_call | , | ||
TmplArgList * | tl ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
ANN void free_arg_list | ( | MemPool | p, |
ArgList * | ) |
ANN void free_ast | ( | MemPool | p, |
Ast | ) |
ANN void free_class_def | ( | MemPool | p, |
Class_Def | ) |
ANN void free_enum_def | ( | MemPool | p, |
Enum_Def | ) |
ANN void free_exp | ( | MemPool | p, |
Exp * | ) |
ANN void free_extend_def | ( | MemPool | p, |
Extend_Def | ) |
ANN void free_fptr_def | ( | MemPool | p, |
Fptr_Def | ) |
ANN void free_func_base | ( | MemPool | p, |
Func_Base * | ) |
ANN void free_func_def | ( | MemPool | p, |
Func_Def | ) |
ANN void free_prim_def | ( | MemPool | p, |
Prim_Def | ) |
ANN void free_specialized_list | ( | MemPool | p, |
SpecializedList * | ) |
ANN void free_stmt | ( | MemPool | p, |
Stmt * | ) |
ANN void free_stmt_list | ( | MemPool | , |
StmtList * | ) |
ANN void free_tmpl | ( | MemPool | p, |
Tmpl * | ) |
ANN void free_tmplarg_list | ( | MemPool | p, |
TmplArgList * | ) |
ANN void free_trait_def | ( | MemPool | p, |
Trait_Def | ) |
ANN void free_type_decl | ( | MemPool | p, |
Type_Decl * | ) |
ANN void free_type_def | ( | MemPool | p, |
Type_Def | ) |
ANN void free_union_def | ( | MemPool | p, |
Union_Def | ) |
ANN void free_variablelist | ( | MemPool | p, |
VariableList * | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
MK_VECTOR_TYPE | ( | Tag | , |
tag | ) |
ANEW Extend_Def new_extend_def | ( | MemPool | p, |
Type_Decl * const | , | ||
TagList * const | ) |
ANN ANEW Trait_Def new_trait_def | ( | MemPool | p, |
const ae_flag | , | ||
const Symbol | , | ||
const Ast | , | ||
const loc_t | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 293 of file absyn.h.
|
inlinestatic |
typedef __attribute__ |