Cthulhu  0.2.10
Cthulhu compiler collection
ast.c File Reference
#include "pl0/ast.h"
#include "cthulhu/broker/scan.h"
#include "base/panic.h"
#include "arena/arena.h"
#include "scan/node.h"
Include dependency graph for ast.c:

Go to the source code of this file.

Functions

pl0_tpl0_new (scan_t *scan, where_t where, pl0_type_t type)
 
pl0_tpl0_digit (scan_t *scan, where_t where, mpz_t digit)
 
pl0_tpl0_ident (scan_t *scan, where_t where, const char *ident)
 
pl0_tpl0_binary (scan_t *scan, where_t where, binary_t binary, pl0_t *lhs, pl0_t *rhs)
 
pl0_tpl0_compare (scan_t *scan, where_t where, compare_t compare, pl0_t *lhs, pl0_t *rhs)
 
pl0_tpl0_unary (scan_t *scan, where_t where, unary_t unary, pl0_t *operand)
 
pl0_tpl0_odd (scan_t *scan, where_t where, pl0_t *operand)
 
pl0_tpl0_print (scan_t *scan, where_t where, pl0_t *operand)
 
pl0_tpl0_assign (scan_t *scan, where_t where, const char *dst, pl0_t *src)
 
pl0_tpl0_call (scan_t *scan, where_t where, const char *procedure)
 
pl0_tpl0_branch (scan_t *scan, where_t where, pl0_t *cond, pl0_t *then)
 
pl0_tpl0_loop (scan_t *scan, where_t where, pl0_t *cond, pl0_t *body)
 
pl0_tpl0_stmts (scan_t *scan, where_t where, vector_t *stmts)
 
pl0_tpl0_procedure (scan_t *scan, where_t where, const char *name, vector_t *locals, vector_t *body)
 
pl0_tpl0_value (scan_t *scan, where_t where, const char *name, pl0_t *value)
 
pl0_tpl0_import (scan_t *scan, where_t where, vector_t *parts)
 
pl0_tpl0_module (scan_t *scan, where_t where, const vector_t *mod, const vector_t *imports, const vector_t *consts, const vector_t *globals, const vector_t *procs, pl0_t *entry)
 

Function Documentation

◆ pl0_assign()

pl0_t* pl0_assign ( scan_t scan,
where_t  where,
const char *  dst,
pl0_t src 
)

Definition at line 79 of file ast.c.

◆ pl0_binary()

pl0_t* pl0_binary ( scan_t scan,
where_t  where,
binary_t  binary,
pl0_t lhs,
pl0_t rhs 
)

Definition at line 39 of file ast.c.

◆ pl0_branch()

pl0_t* pl0_branch ( scan_t scan,
where_t  where,
pl0_t cond,
pl0_t then 
)

Definition at line 94 of file ast.c.

◆ pl0_call()

pl0_t* pl0_call ( scan_t scan,
where_t  where,
const char *  procedure 
)

Definition at line 87 of file ast.c.

◆ pl0_compare()

pl0_t* pl0_compare ( scan_t scan,
where_t  where,
compare_t  compare,
pl0_t lhs,
pl0_t rhs 
)

Definition at line 48 of file ast.c.

◆ pl0_digit()

pl0_t* pl0_digit ( scan_t scan,
where_t  where,
mpz_t  digit 
)

Definition at line 25 of file ast.c.

◆ pl0_ident()

pl0_t* pl0_ident ( scan_t scan,
where_t  where,
const char *  ident 
)

Definition at line 32 of file ast.c.

◆ pl0_import()

pl0_t* pl0_import ( scan_t scan,
where_t  where,
vector_t parts 
)

Definition at line 134 of file ast.c.

◆ pl0_loop()

pl0_t* pl0_loop ( scan_t scan,
where_t  where,
pl0_t cond,
pl0_t body 
)

Definition at line 102 of file ast.c.

◆ pl0_module()

pl0_t* pl0_module ( scan_t scan,
where_t  where,
const vector_t mod,
const vector_t imports,
const vector_t consts,
const vector_t globals,
const vector_t procs,
pl0_t entry 
)

Definition at line 141 of file ast.c.

◆ pl0_new()

pl0_t* pl0_new ( scan_t scan,
where_t  where,
pl0_type_t  type 
)

Definition at line 11 of file ast.c.

◆ pl0_odd()

pl0_t* pl0_odd ( scan_t scan,
where_t  where,
pl0_t operand 
)

Definition at line 65 of file ast.c.

◆ pl0_print()

pl0_t* pl0_print ( scan_t scan,
where_t  where,
pl0_t operand 
)

Definition at line 72 of file ast.c.

◆ pl0_procedure()

pl0_t* pl0_procedure ( scan_t scan,
where_t  where,
const char *  name,
vector_t locals,
vector_t body 
)

Definition at line 117 of file ast.c.

◆ pl0_stmts()

pl0_t* pl0_stmts ( scan_t scan,
where_t  where,
vector_t stmts 
)

Definition at line 110 of file ast.c.

◆ pl0_unary()

pl0_t* pl0_unary ( scan_t scan,
where_t  where,
unary_t  unary,
pl0_t operand 
)

Definition at line 57 of file ast.c.

◆ pl0_value()

pl0_t* pl0_value ( scan_t scan,
where_t  where,
const char *  name,
pl0_t value 
)

Definition at line 126 of file ast.c.