#include "ptree_util.h"
#include "ptree_util_i.h"
Include dependency graph for ptree_util.cc:
Go to the source code of this file.
Functions | |
Ptree * | do_function (Ptree *lhs, Ptree *lpar, Ptree *args, Ptree *rpar) |
void | flatten_specifier_list (Ptree *tree, std::vector< Ptree * > *nodes) |
void | flatten_ptree (Ptree *tree, std::vector< Ptree * > *nodes) |
bool | ptree_is_name (Ptree *tree) |
True iff the given tree is a name. More... | |
Ptree * | convert_comma_expr_to_list (Ptree *input) |
Convert an expression [[[a , b] , c] , d] into [a , b , c , d]. More... | |
Ptree * | convert_node_to_name (Ptree *p) |
Ptree * | convert_decl_to_expr (Ptree *lhs, Ptree *rhs) |
Convert a declaration (consisting of a type-specifier lhs and a declarator side rhs) into an expression. More... |
|
Convert an expression [[[a , b] , c] , d] into [a , b , c , d]. This is needed for expressions: "(foo)(1, 2, 3)" is parsed as [(foo) ( [[1 , 2] , 3] )] whereas the correct parse would be [[( foo )] ( [1 , 2 , 3] )]. Definition at line 53 of file ptree_util.cc. References Ptree::Cons(), Ptree::First(), Ptree::Second(), and Ptree::Third(). Referenced by Expr_annotator::visit_cast(). |
|
Convert a declaration (consisting of a type-specifier lhs and a declarator side rhs) into an expression.
Definition at line 102 of file ptree_util.cc. References Ptree::Car(), Ptree::Cdr(), compile_error(), CONST, convert_node_to_name(), Ptree::Display(), do_function(), Ptree::Eq(), expect_ptree(), Ptree::IsA(), Ptree::IsLeaf(), Ptree::List(), Ptree::Second(), Ptree::Third(), and VOLATILE. Referenced by do_function(), and Expr_annotator::visit_cast(). |
|
Definition at line 86 of file ptree_util.cc. References Ptree::GetLength(), Ptree::GetPosition(), Ptree::IsLeaf(), and ntName. Referenced by convert_decl_to_expr(). |
|
Definition at line 67 of file ptree_util.cc. References Ptree::Car(), Ptree::Cdr(), convert_decl_to_expr(), Ptree::Eq(), Ptree::First(), Ptree::Length(), Ptree::List(), Ptree::Second(), and Ptree::Snoc(). Referenced by convert_decl_to_expr(). |
|
Definition at line 22 of file ptree_util.cc. References Ptree::Car(), Ptree::Cdr(), and Ptree::IsLeaf(). |
|
Definition at line 14 of file ptree_util.cc. |
|
True iff the given tree is a name. LeafName doesn't respond to "IsA(ntName)". D'ooh! Definition at line 41 of file ptree_util.cc. References Ptree::IsA(), and ntName. Referenced by Expr_annotator::visit_funcall(), and Expr_annotator::visit_unary(). |