Back to index

texmacs  1.0.7.15
tree_traverse.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : tree_traverse.hpp
00004 * DESCRIPTION: abstract cursor movement and tree traversal
00005 * COPYRIGHT  : (C) 2005  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef TREE_TRAVERSE_H
00013 #define TREE_TRAVERSE_H
00014 #include "tree_cursor.hpp"
00015 
00016 int minimal_arity (tree t);
00017 int maximal_arity (tree t);
00018 bool correct_arity (tree t, int n);
00019 int insert_point (tree t, int i);
00020 bool is_dynamic (tree t);
00021 bool is_accessible_child (tree t, int i);
00022 array<tree> accessible_children (tree t);
00023 bool all_accessible (tree t);
00024 bool none_accessible (tree t);
00025 
00026 string get_name (tree t);
00027 string get_long_name (tree t);
00028 string get_child_name (tree t, int i);
00029 string get_child_long_name (tree t, int i);
00030 string get_child_type (tree t, int i);
00031 tree   get_env_child (tree t, int i, string var, tree val);
00032 
00033 path next_valid (tree t, path p);
00034 path previous_valid (tree t, path p);
00035 path next_accessible (tree t, path p);
00036 path previous_accessible (tree t, path p);
00037 path next_word (tree t, path p);
00038 path previous_word (tree t, path p);
00039 path next_node (tree t, path p);
00040 path previous_node (tree t, path p);
00041 path next_tag (tree t, path p, scheme_tree labs);
00042 path previous_tag (tree t, path p, scheme_tree labs);
00043 path next_tag_same_argument (tree t, path p, scheme_tree labs);
00044 path previous_tag_same_argument (tree t, path p, scheme_tree labs);
00045 path next_argument (tree t, path p);
00046 path previous_argument (tree t, path p);
00047 
00048 bool inside_same (tree t, path p, path q, tree_label which);
00049 bool more_inside (tree t, path p, path q, tree_label which);
00050 
00051 array<tree> search_sections (tree t);
00052 path previous_section (tree t, path p);
00053 
00054 #endif // defined TREE_TRAVERSE_H