Cthulhu  0.2.10
Cthulhu compiler collection
ast.h File Reference
#include "core/where.h"
#include "cthulhu/tree/ops.h"
#include <gmp.h>
#include "pl0/pl0.inc"
Include dependency graph for ast.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pl0_t
 

Macros

#define PL0_TYPE(id, name)   id,
 

Enumerations

enum  pl0_type_t { ePl0Count }
 

Functions

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)
 

Macro Definition Documentation

◆ PL0_TYPE

#define PL0_TYPE (   id,
  name 
)    id,

Definition at line 17 of file ast.h.

Enumeration Type Documentation

◆ pl0_type_t

enum pl0_type_t
Enumerator
ePl0Count 

Definition at line 15 of file ast.h.

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_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.