Back to index

texmacs  1.0.7.15
Functions
tree_traverse.hpp File Reference
#include "tree_cursor.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int minimal_arity (tree t)
int maximal_arity (tree t)
bool correct_arity (tree t, int n)
int insert_point (tree t, int i)
bool is_dynamic (tree t)
bool is_accessible_child (tree t, int i)
array< treeaccessible_children (tree t)
bool all_accessible (tree t)
bool none_accessible (tree t)
string get_name (tree t)
string get_long_name (tree t)
string get_child_name (tree t, int i)
string get_child_long_name (tree t, int i)
string get_child_type (tree t, int i)
tree get_env_child (tree t, int i, string var, tree val)
path next_valid (tree t, path p)
path previous_valid (tree t, path p)
path next_accessible (tree t, path p)
path previous_accessible (tree t, path p)
path next_word (tree t, path p)
path previous_word (tree t, path p)
path next_node (tree t, path p)
path previous_node (tree t, path p)
path next_tag (tree t, path p, scheme_tree labs)
path previous_tag (tree t, path p, scheme_tree labs)
path next_tag_same_argument (tree t, path p, scheme_tree labs)
path previous_tag_same_argument (tree t, path p, scheme_tree labs)
path next_argument (tree t, path p)
path previous_argument (tree t, path p)
bool inside_same (tree t, path p, path q, tree_label which)
bool more_inside (tree t, path p, path q, tree_label which)
array< treesearch_sections (tree t)
path previous_section (tree t, path p)

Function Documentation

Definition at line 53 of file tree_traverse.cpp.

                             {
  array<tree> a;
  int i, n= N(t);
  for (i=0; i<n; i++)
    if (the_drd->is_accessible_child (t, i))
      a << t[i];
  return a;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool all_accessible ( tree  t)

Definition at line 63 of file tree_traverse.cpp.

                        {
  if (is_atomic (t)) return false;
  return the_drd->all_accessible (L(t));
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool correct_arity ( tree  t,
int  n 
)

Definition at line 33 of file tree_traverse.cpp.

                              {
  return the_drd->correct_arity (L(t), n);
}

Here is the caller graph for this function:

string get_child_long_name ( tree  t,
int  i 
)

Definition at line 94 of file tree_traverse.cpp.

                                    {
  return the_drd->get_child_long_name (t, i);
}

Here is the caller graph for this function:

string get_child_name ( tree  t,
int  i 
)

Definition at line 89 of file tree_traverse.cpp.

                               {
  return the_drd->get_child_name (t, i);
}

Here is the caller graph for this function:

string get_child_type ( tree  t,
int  i 
)

Definition at line 99 of file tree_traverse.cpp.

                               {
  return drd_decode_type (the_drd->get_type_child (t, i));
}

Here is the call graph for this function:

Here is the caller graph for this function:

tree get_env_child ( tree  t,
int  i,
string  var,
tree  val 
)

Definition at line 104 of file tree_traverse.cpp.

                                                    {
  return the_drd->get_env_child (t, i, var, val);
}

Here is the caller graph for this function:

Definition at line 84 of file tree_traverse.cpp.

                       {
  return the_drd->get_long_name (L(t));
}

Here is the caller graph for this function:

Definition at line 79 of file tree_traverse.cpp.

                  {
  return the_drd->get_name (L(t));
}

Here is the caller graph for this function:

int insert_point ( tree  t,
int  i 
)

Definition at line 38 of file tree_traverse.cpp.

                             {
  return the_drd->insert_point (L(t), i, N(t));
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool inside_same ( tree  t,
path  p,
path  q,
tree_label  which 
)

Definition at line 417 of file tree_traverse.cpp.

                                                       {
  return
    search_upwards (t, path_up (p), which) ==
    search_upwards (t, path_up (q), which);
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool is_accessible_child ( tree  t,
int  i 
)

Definition at line 48 of file tree_traverse.cpp.

                                    {
  return the_drd->is_accessible_child (t, i);
}

Here is the caller graph for this function:

bool is_dynamic ( tree  t)

Definition at line 43 of file tree_traverse.cpp.

                    {
  return the_drd->is_dynamic (t, false);
}

Here is the caller graph for this function:

int maximal_arity ( tree  t)

Definition at line 28 of file tree_traverse.cpp.

                       {
  return the_drd->get_maximal_arity (L(t));
}

Here is the caller graph for this function:

int minimal_arity ( tree  t)

Definition at line 23 of file tree_traverse.cpp.

                       {
  return the_drd->get_minimal_arity (L(t));
}
bool more_inside ( tree  t,
path  p,
path  q,
tree_label  which 
)

Definition at line 424 of file tree_traverse.cpp.

                                                       {
  return
    search_upwards (t, path_up (q), which) <=
    search_upwards (t, path_up (p), which);
}

Here is the call graph for this function:

Here is the caller graph for this function:

path next_accessible ( tree  t,
path  p 
)

Definition at line 205 of file tree_traverse.cpp.

                                      {
  return move_accessible (t, p, true); }

Here is the call graph for this function:

Here is the caller graph for this function:

path next_argument ( tree  t,
path  p 
)

Definition at line 401 of file tree_traverse.cpp.

                                    {
  return move_argument (t, p, true); }

Here is the call graph for this function:

Here is the caller graph for this function:

path next_node ( tree  t,
path  p 
)

Definition at line 290 of file tree_traverse.cpp.

                                {
  return move_node (t, p, true); }

Here is the call graph for this function:

Here is the caller graph for this function:

path next_tag ( tree  t,
path  p,
scheme_tree  labs 
)

Definition at line 368 of file tree_traverse.cpp.

                                                  {
  return move_tag (t, p, get_labels (which), true, false); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 373 of file tree_traverse.cpp.

                                                                {
  return move_tag (t, p, get_labels (which), true, true); }

Here is the call graph for this function:

Here is the caller graph for this function:

path next_valid ( tree  t,
path  p 
)

Definition at line 188 of file tree_traverse.cpp.

                                 {
  return move_valid (t, p, true); }

Here is the call graph for this function:

Here is the caller graph for this function:

path next_word ( tree  t,
path  p 
)

Definition at line 271 of file tree_traverse.cpp.

                                {
  return move_word (t, p, true); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool none_accessible ( tree  t)

Definition at line 69 of file tree_traverse.cpp.

                         {
  if (is_atomic (t)) return false;
  return the_drd->none_accessible (L(t));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 207 of file tree_traverse.cpp.

                                          {
  return move_accessible (t, p, false); }

Here is the call graph for this function:

Here is the caller graph for this function:

path previous_argument ( tree  t,
path  p 
)

Definition at line 403 of file tree_traverse.cpp.

                                        {
  return move_argument (t, p, false); }

Here is the call graph for this function:

Here is the caller graph for this function:

path previous_node ( tree  t,
path  p 
)

Definition at line 292 of file tree_traverse.cpp.

                                    {
  return move_node (t, p, false); }

Here is the call graph for this function:

Here is the caller graph for this function:

path previous_section ( tree  t,
path  p 
)

Definition at line 479 of file tree_traverse.cpp.

                                  {
  init_sections ();
  path r= previous_section_impl (t, p);
  if (is_nil (r)) return p;
  return path_up (r);
}

Here is the call graph for this function:

Here is the caller graph for this function:

path previous_tag ( tree  t,
path  p,
scheme_tree  labs 
)

Definition at line 370 of file tree_traverse.cpp.

                                                      {
  return move_tag (t, p, get_labels (which), false, false); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 375 of file tree_traverse.cpp.

                                                                    {
  return move_tag (t, p, get_labels (which), false, true); }

Here is the call graph for this function:

Here is the caller graph for this function:

path previous_valid ( tree  t,
path  p 
)

Definition at line 190 of file tree_traverse.cpp.

                                     {
  return move_valid (t, p, false); }

Here is the call graph for this function:

Here is the caller graph for this function:

path previous_word ( tree  t,
path  p 
)

Definition at line 273 of file tree_traverse.cpp.

                                    {
  return move_word (t, p, false); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 496 of file tree_traverse.cpp.

                         {
  init_sections ();
  array<tree> a;
  search_sections (a, t);
  return a;
}

Here is the call graph for this function: