PUMA Library Reference Manual
Loading...
Searching...
No Matches
Puma::CBuilder Class Reference

#include <CBuilder.h>

+ Inheritance diagram for Puma::CBuilder:

Public Member Functions

 CBuilder ()
 
virtual CTreesimple_name ()
 
virtual CTreeliteral ()
 
virtual CTreecmpd_str ()
 
virtual CTreestr_literal ()
 
virtual CTreetrans_unit ()
 
virtual CTreeprim_expr ()
 
virtual CTreecmpd_literal ()
 
virtual CTreepostfix_expr ()
 
virtual CTreepostfix_expr1 ()
 
virtual CTreeexpr_list ()
 
virtual CTreeunary_expr ()
 
virtual CTreeunary_expr1 ()
 
virtual CTreecast_expr ()
 
virtual CTreecast_expr1 ()
 
virtual CTreecast_expr2 ()
 
virtual CTreeoffsetof_expr ()
 
virtual CTreememb_designator ()
 
virtual CTreemul_expr ()
 
virtual CTreeadd_expr ()
 
virtual CTreeshift_expr ()
 
virtual CTreerel_expr ()
 
virtual CTreeequ_expr ()
 
virtual CTreeand_expr ()
 
virtual CTreeexcl_or_expr ()
 
virtual CTreeincl_or_expr ()
 
virtual CTreelog_and_expr ()
 
virtual CTreelog_or_expr ()
 
virtual CTreecond_expr ()
 
virtual CTreeass_expr ()
 
virtual CTreeass_expr1 ()
 
virtual CTreeexpr ()
 
virtual CTreeconst_expr ()
 
virtual CTreestmt ()
 
virtual CTreelabel_stmt ()
 
virtual CTreeexpr_stmt ()
 
virtual CTreecmpd_stmt ()
 
virtual CTreestmt_seq ()
 
virtual CTreeselect_stmt ()
 
virtual CTreesub_stmt ()
 
virtual CTreecondition (CTree *=(CTree *) 0)
 
virtual CTreeiter_stmt ()
 
virtual CTreefor_init_stmt ()
 
virtual CTreejump_stmt ()
 
virtual CTreedecl_seq ()
 
virtual CTreedecl ()
 
virtual CTreeblock_decl ()
 
virtual CTreesimple_decl ()
 
virtual CTreedecl_spec ()
 
virtual CTreemisc_spec ()
 
virtual CTreedecl_spec_seq ()
 
virtual CTreedecl_spec_seq1 ()
 
virtual CTreestorage_class_spec ()
 
virtual CTreefct_spec ()
 
virtual CTreetype_spec ()
 
virtual CTreesimple_type_spec ()
 
virtual CTreetype_name ()
 
virtual CTreeelaborated_type_spec ()
 
virtual CTreeenum_key ()
 
virtual CTreeenum_spec ()
 
virtual CTreeenum_spec1 ()
 
virtual CTreeenumerator_list ()
 
virtual CTreeenumerator_def ()
 
virtual CTreeenumerator ()
 
virtual CTreeasm_def ()
 
virtual CTreeinit_declarator_list ()
 
virtual CTreeinit_declarator ()
 
virtual CTreeinit_declarator1 ()
 
virtual CTreedeclarator ()
 
virtual CTreedirect_declarator ()
 
virtual CTreedirect_declarator1 ()
 
virtual CTreeidentifier_list ()
 
virtual CTreearray_delim ()
 
virtual CTreeptr_operator ()
 
virtual CTreecv_qual_seq ()
 
virtual CTreecv_qual ()
 
virtual CTreedeclarator_id ()
 
virtual CTreetype_id ()
 
virtual CTreeabst_declarator ()
 
virtual CTreedirect_abst_declarator ()
 
virtual CTreedirect_abst_declarator1 ()
 
virtual CTreeparam_decl_clause ()
 
virtual CTreeparam_decl_list ()
 
virtual CTreeparam_decl ()
 
virtual CTreeparam_decl1 ()
 
virtual CTreefct_def ()
 
virtual CTreearg_decl_seq ()
 
virtual CTreefct_body ()
 
virtual CTreeinit ()
 
virtual CTreeinit_clause ()
 
virtual CTreeinit_list ()
 
virtual CTreeinit_list_item ()
 
virtual CTreedesignation ()
 
virtual CTreedesignator ()
 
virtual CTreeclass_spec ()
 
virtual CTreeclass_head ()
 
virtual CTreeclass_key ()
 
virtual CTreemember_spec ()
 
virtual CTreemember_decl ()
 
virtual CTreemember_declarator_list ()
 
virtual CTreemember_declarator ()
 
- Public Member Functions inherited from Puma::Builder
virtual void destroyNode (CTree *node)
 Destroy the given syntax tree node.
 
void errors (ErrorSink &e)
 Print the collected error messages on the given error output stream.
 
ErrorSinkerr () const
 Get the collected errors.
 
void save_state ()
 Save the current state.
 
void forget_state ()
 Discard the saved state.
 
void restore_state ()
 Restore the saved state.
 
CTreetoken (Token *t)
 Create a new CT_Token object for the given token.
 
CTreeerror ()
 Create a new CT_Error object.
 
int nodes () const
 Get the current number of nodes on the builder stack.
 
CTreeget_node (int n=0) const
 Get the n-th node from the builder stack.
 
void setTokenCounter (unsigned long v)
 Reset the token counter.
 
unsigned long getTokenCounter () const
 Get the current token count.
 
- Public Member Functions inherited from Puma::PtrStack< CTree >
 PtrStack (long size=8192, long incr=8192)
 Construct a new layered stack.
 
virtual ~PtrStack ()
 Destructor.
 
void Push (const CTree *item)
 Add a new item on the top of the current layer.
 
void Pop ()
 Remove the top item from the current layer.
 
CTreeTop () const
 Get the top item from the current layer.
 
long Length () const
 Get the number of items added to the current layer.
 
CTreeGet (long n) const
 Get the n-th item on the current layer.
 
void New ()
 Create a new layer.
 
void Forget ()
 Remove the top layer and add its items to the underlying layer.
 
void Reject ()
 Remove the top layer.
 
void Destroy ()
 Remove the top layer and delete its items.
 
long Stacks () const
 Get the number of layers.
 
void Reset ()
 Remove all layers.
 

Protected Member Functions

CTreelr_bin_expr ()
 
CTreeprim_ds ()
 
- Protected Member Functions inherited from Puma::Builder
 Builder ()
 Constructor.
 
void Delete ()
 Destroy the top tree node of the builder stack.
 
CTreecontainer () const
 Put all nodes on the builder stack into a Container object.
 
CTreelist (CT_List *l) const
 Add all nodes on the builder stack to the given list node.
 
CTreecopy_list (CT_List *l, Container *c) const
 Add all nodes of the given container to the given list node.
 
- Protected Member Functions inherited from Puma::PtrStack< CTree >
virtual void Remove ()
 Remove the top item of the current layer.
 

Additional Inherited Members

- Static Public Member Functions inherited from Puma::Builder
static void destroy (CTree *tree, bool recursive=true)
 Destroy the given syntax tree recursively.
 
- Protected Attributes inherited from Puma::Builder
ErrorCollector ec
 The error collector object.
 
- Static Protected Attributes inherited from Puma::Builder
static unsigned long int token_counter
 Counter for the created CT_Token object.
 

Constructor & Destructor Documentation

◆ CBuilder()

Puma::CBuilder::CBuilder ( )
inline

Member Function Documentation

◆ abst_declarator()

virtual CTree * Puma::CBuilder::abst_declarator ( )
virtual

◆ add_expr()

virtual CTree * Puma::CBuilder::add_expr ( )
virtual

◆ and_expr()

virtual CTree * Puma::CBuilder::and_expr ( )
virtual

◆ arg_decl_seq()

virtual CTree * Puma::CBuilder::arg_decl_seq ( )
virtual

◆ array_delim()

virtual CTree * Puma::CBuilder::array_delim ( )
virtual

◆ asm_def()

virtual CTree * Puma::CBuilder::asm_def ( )
virtual

◆ ass_expr()

virtual CTree * Puma::CBuilder::ass_expr ( )
virtual

◆ ass_expr1()

virtual CTree * Puma::CBuilder::ass_expr1 ( )
virtual

◆ block_decl()

virtual CTree * Puma::CBuilder::block_decl ( )
virtual

◆ cast_expr()

virtual CTree * Puma::CBuilder::cast_expr ( )
virtual

◆ cast_expr1()

virtual CTree * Puma::CBuilder::cast_expr1 ( )
virtual

◆ cast_expr2()

virtual CTree * Puma::CBuilder::cast_expr2 ( )
virtual

◆ class_head()

virtual CTree * Puma::CBuilder::class_head ( )
virtual

Reimplemented in Puma::CCBuilder.

◆ class_key()

virtual CTree * Puma::CBuilder::class_key ( )
virtual

◆ class_spec()

virtual CTree * Puma::CBuilder::class_spec ( )
virtual

Reimplemented in Puma::CCBuilder.

◆ cmpd_literal()

virtual CTree * Puma::CBuilder::cmpd_literal ( )
virtual

◆ cmpd_stmt()

virtual CTree * Puma::CBuilder::cmpd_stmt ( )
virtual

◆ cmpd_str()

virtual CTree * Puma::CBuilder::cmpd_str ( )
virtual

◆ cond_expr()

virtual CTree * Puma::CBuilder::cond_expr ( )
virtual

◆ condition()

virtual CTree * Puma::CBuilder::condition ( CTree * = (CTree *) 0)
virtual

◆ const_expr()

virtual CTree * Puma::CBuilder::const_expr ( )
virtual

◆ cv_qual()

virtual CTree * Puma::CBuilder::cv_qual ( )
virtual

◆ cv_qual_seq()

virtual CTree * Puma::CBuilder::cv_qual_seq ( )
virtual

◆ decl()

virtual CTree * Puma::CBuilder::decl ( )
virtual

Reimplemented in Puma::CCBuilder.

◆ decl_seq()

virtual CTree * Puma::CBuilder::decl_seq ( )
virtual

◆ decl_spec()

virtual CTree * Puma::CBuilder::decl_spec ( )
virtual

◆ decl_spec_seq()

virtual CTree * Puma::CBuilder::decl_spec_seq ( )
virtual

◆ decl_spec_seq1()

virtual CTree * Puma::CBuilder::decl_spec_seq1 ( )
virtual

◆ declarator()

virtual CTree * Puma::CBuilder::declarator ( )
virtual

Reimplemented in Puma::CCBuilder.

◆ declarator_id()

virtual CTree * Puma::CBuilder::declarator_id ( )
virtual

Reimplemented in Puma::CCBuilder.

◆ designation()

virtual CTree * Puma::CBuilder::designation ( )
virtual

◆ designator()

virtual CTree * Puma::CBuilder::designator ( )
virtual

◆ direct_abst_declarator()

virtual CTree * Puma::CBuilder::direct_abst_declarator ( )
virtual

◆ direct_abst_declarator1()

virtual CTree * Puma::CBuilder::direct_abst_declarator1 ( )
virtual

◆ direct_declarator()

virtual CTree * Puma::CBuilder::direct_declarator ( )
virtual

◆ direct_declarator1()

virtual CTree * Puma::CBuilder::direct_declarator1 ( )
virtual

◆ elaborated_type_spec()

virtual CTree * Puma::CBuilder::elaborated_type_spec ( )
virtual

Reimplemented in Puma::CCBuilder.

◆ enum_key()

virtual CTree * Puma::CBuilder::enum_key ( )
virtual

◆ enum_spec()

virtual CTree * Puma::CBuilder::enum_spec ( )
virtual

◆ enum_spec1()

virtual CTree * Puma::CBuilder::enum_spec1 ( )
virtual

◆ enumerator()

virtual CTree * Puma::CBuilder::enumerator ( )
virtual

◆ enumerator_def()

virtual CTree * Puma::CBuilder::enumerator_def ( )
virtual

◆ enumerator_list()

virtual CTree * Puma::CBuilder::enumerator_list ( )
virtual

◆ equ_expr()

virtual CTree * Puma::CBuilder::equ_expr ( )
virtual

◆ excl_or_expr()

virtual CTree * Puma::CBuilder::excl_or_expr ( )
virtual

◆ expr()

virtual CTree * Puma::CBuilder::expr ( )
virtual

◆ expr_list()

virtual CTree * Puma::CBuilder::expr_list ( )
virtual

◆ expr_stmt()

virtual CTree * Puma::CBuilder::expr_stmt ( )
virtual

◆ fct_body()

virtual CTree * Puma::CBuilder::fct_body ( )
virtual

◆ fct_def()

virtual CTree * Puma::CBuilder::fct_def ( )
virtual

◆ fct_spec()

virtual CTree * Puma::CBuilder::fct_spec ( )
virtual

◆ for_init_stmt()

virtual CTree * Puma::CBuilder::for_init_stmt ( )
virtual

◆ identifier_list()

virtual CTree * Puma::CBuilder::identifier_list ( )
virtual

◆ incl_or_expr()

virtual CTree * Puma::CBuilder::incl_or_expr ( )
virtual

◆ init()

virtual CTree * Puma::CBuilder::init ( )
virtual

◆ init_clause()

virtual CTree * Puma::CBuilder::init_clause ( )
virtual

◆ init_declarator()

virtual CTree * Puma::CBuilder::init_declarator ( )
virtual

◆ init_declarator1()

virtual CTree * Puma::CBuilder::init_declarator1 ( )
virtual

◆ init_declarator_list()

virtual CTree * Puma::CBuilder::init_declarator_list ( )
virtual

◆ init_list()

virtual CTree * Puma::CBuilder::init_list ( )
virtual

◆ init_list_item()

virtual CTree * Puma::CBuilder::init_list_item ( )
virtual

◆ iter_stmt()

virtual CTree * Puma::CBuilder::iter_stmt ( )
virtual

◆ jump_stmt()

virtual CTree * Puma::CBuilder::jump_stmt ( )
virtual

◆ label_stmt()

virtual CTree * Puma::CBuilder::label_stmt ( )
virtual

◆ literal()

virtual CTree * Puma::CBuilder::literal ( )
virtual

◆ log_and_expr()

virtual CTree * Puma::CBuilder::log_and_expr ( )
virtual

◆ log_or_expr()

virtual CTree * Puma::CBuilder::log_or_expr ( )
virtual

◆ lr_bin_expr()

CTree * Puma::CBuilder::lr_bin_expr ( )
protected

◆ memb_designator()

virtual CTree * Puma::CBuilder::memb_designator ( )
virtual

◆ member_decl()

virtual CTree * Puma::CBuilder::member_decl ( )
virtual

Reimplemented in Puma::CCBuilder.

◆ member_declarator()

virtual CTree * Puma::CBuilder::member_declarator ( )
virtual

Reimplemented in Puma::CCBuilder.

◆ member_declarator_list()

virtual CTree * Puma::CBuilder::member_declarator_list ( )
virtual

◆ member_spec()

virtual CTree * Puma::CBuilder::member_spec ( )
virtual

◆ misc_spec()

virtual CTree * Puma::CBuilder::misc_spec ( )
virtual

◆ mul_expr()

virtual CTree * Puma::CBuilder::mul_expr ( )
virtual

◆ offsetof_expr()

virtual CTree * Puma::CBuilder::offsetof_expr ( )
virtual

◆ param_decl()

virtual CTree * Puma::CBuilder::param_decl ( )
virtual

◆ param_decl1()

virtual CTree * Puma::CBuilder::param_decl1 ( )
virtual

◆ param_decl_clause()

virtual CTree * Puma::CBuilder::param_decl_clause ( )
virtual

◆ param_decl_list()

virtual CTree * Puma::CBuilder::param_decl_list ( )
virtual

◆ postfix_expr()

virtual CTree * Puma::CBuilder::postfix_expr ( )
virtual

◆ postfix_expr1()

virtual CTree * Puma::CBuilder::postfix_expr1 ( )
virtual

◆ prim_ds()

CTree * Puma::CBuilder::prim_ds ( )
protected

◆ prim_expr()

virtual CTree * Puma::CBuilder::prim_expr ( )
virtual

Reimplemented in Puma::CCBuilder.

◆ ptr_operator()

virtual CTree * Puma::CBuilder::ptr_operator ( )
virtual

◆ rel_expr()

virtual CTree * Puma::CBuilder::rel_expr ( )
virtual

◆ select_stmt()

virtual CTree * Puma::CBuilder::select_stmt ( )
virtual

◆ shift_expr()

virtual CTree * Puma::CBuilder::shift_expr ( )
virtual

◆ simple_decl()

virtual CTree * Puma::CBuilder::simple_decl ( )
virtual

◆ simple_name()

virtual CTree * Puma::CBuilder::simple_name ( )
virtual

◆ simple_type_spec()

virtual CTree * Puma::CBuilder::simple_type_spec ( )
virtual

Reimplemented in Puma::CCBuilder.

◆ stmt()

virtual CTree * Puma::CBuilder::stmt ( )
virtual

◆ stmt_seq()

virtual CTree * Puma::CBuilder::stmt_seq ( )
virtual

◆ storage_class_spec()

virtual CTree * Puma::CBuilder::storage_class_spec ( )
virtual

◆ str_literal()

virtual CTree * Puma::CBuilder::str_literal ( )
virtual

◆ sub_stmt()

virtual CTree * Puma::CBuilder::sub_stmt ( )
virtual

◆ trans_unit()

virtual CTree * Puma::CBuilder::trans_unit ( )
virtual

◆ type_id()

virtual CTree * Puma::CBuilder::type_id ( )
virtual

◆ type_name()

virtual CTree * Puma::CBuilder::type_name ( )
virtual

◆ type_spec()

virtual CTree * Puma::CBuilder::type_spec ( )
virtual

◆ unary_expr()

virtual CTree * Puma::CBuilder::unary_expr ( )
virtual

◆ unary_expr1()

virtual CTree * Puma::CBuilder::unary_expr1 ( )
virtual