Block-Structured AMR Software Framework
AMReX_IParser_Y.cpp File Reference
#include <AMReX.H>
#include <AMReX_IParser_Y.H>
#include <amrex_iparser.tab.h>
#include <algorithm>
#include <cstdarg>
#include <string>

Namespaces

 amrex
 

Macros

#define IPARSER_MOVEUP_R(node, v)
 
#define IPARSER_MOVEUP_L(node, v)
 
#define IPARSER_EVAL_R(node)   (node)->r->lvp.v
 
#define IPARSER_EVAL_L(node)   (node)->l->lvp.v
 
#define IPARSER_NEG_MOVEUP(node)
 

Functions

void amrex_iparsererror (char const *s,...)
 
void amrex::iparser_defexpr (struct iparser_node *body)
 
struct iparser_symbol * amrex::iparser_makesymbol (char *name)
 
struct iparser_node * amrex::iparser_newnode (enum iparser_node_t type, struct iparser_node *l, struct iparser_node *r)
 
struct iparser_node * amrex::iparser_newnumber (long long d)
 
struct iparser_node * amrex::iparser_newsymbol (struct iparser_symbol *symbol)
 
struct iparser_node * amrex::iparser_newf1 (enum iparser_f1_t ftype, struct iparser_node *l)
 
struct iparser_node * amrex::iparser_newf2 (enum iparser_f2_t ftype, struct iparser_node *l, struct iparser_node *r)
 
struct iparser_node * amrex::iparser_newf3 (enum iparser_f3_t ftype, struct iparser_node *n1, struct iparser_node *n2, struct iparser_node *n3)
 
struct iparser_node * amrex::iparser_newassign (struct iparser_symbol *sym, struct iparser_node *v)
 
struct iparser_node * amrex::iparser_newlist (struct iparser_node *nl, struct iparser_node *nr)
 
struct amrex_iparser * amrex::amrex_iparser_new ()
 
void amrex::amrex_iparser_delete (struct amrex_iparser *iparser)
 
struct amrex_iparser * amrex::iparser_dup (struct amrex_iparser *source)
 
std::size_t amrex::iparser_ast_size (struct iparser_node *node)
 
struct iparser_node * amrex::iparser_ast_dup (struct amrex_iparser *my_iparser, struct iparser_node *node, int move)
 
void amrex::iparser_ast_optimize (struct iparser_node *node)
 
void amrex::iparser_ast_print (struct iparser_node *node, std::string const &space, AllPrint &printer)
 
int amrex::iparser_ast_depth (struct iparser_node *node)
 
void amrex::iparser_ast_regvar (struct iparser_node *node, char const *name, int i)
 
void amrex::iparser_ast_setconst (struct iparser_node *node, char const *name, long long c)
 
void amrex::iparser_ast_get_symbols (struct iparser_node *node, std::set< std::string > &symbols, std::set< std::string > &local_symbols)
 
void amrex::iparser_regvar (struct amrex_iparser *iparser, char const *name, int i)
 
void amrex::iparser_setconst (struct amrex_iparser *iparser, char const *name, long long c)
 
void amrex::iparser_print (struct amrex_iparser *iparser)
 
std::set< std::string > amrex::iparser_get_symbols (struct amrex_iparser *iparser)
 
int amrex::iparser_depth (struct amrex_iparser *iparser)
 
long long amrex::iparser_atoll (const char *str)
 

Macro Definition Documentation

◆ IPARSER_EVAL_L

#define IPARSER_EVAL_L (   node)    (node)->l->lvp.v

◆ IPARSER_EVAL_R

#define IPARSER_EVAL_R (   node)    (node)->r->lvp.v

◆ IPARSER_MOVEUP_L

#define IPARSER_MOVEUP_L (   node,
 
)
Value:
struct iparser_node* n = (node)->l->r; \
int ip = (node)->l->rip; \
(node)->r = n; \
(node)->lvp.v = v; \
(node)->rip = ip;

◆ IPARSER_MOVEUP_R

#define IPARSER_MOVEUP_R (   node,
 
)
Value:
struct iparser_node* n = (node)->r->r; \
int ip = (node)->r->rip; \
(node)->r = n; \
(node)->lvp.v = v; \
(node)->rip = ip;

◆ IPARSER_NEG_MOVEUP

#define IPARSER_NEG_MOVEUP (   node)
Value:
(node)->r = (node)->l->r; \
(node)->lvp.v = -(node)->l->lvp.v; \
(node)->rip = (node)->l->rip;

Function Documentation

◆ amrex_iparsererror()

void amrex_iparsererror ( char const *  s,
  ... 
)