Back to index

texmacs  1.0.7.15
Classes | Functions
drd_info.hpp File Reference
#include "tree.hpp"
#include "rel_hashmap.hpp"
#include "tag_info.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  drd_info_rep
class  drd_info

Functions

 CONCRETE_CODE (drd_info)
tree drd_env_write (tree env, string var, tree val)
tree drd_env_merge (tree env, tree t)
tree drd_env_read (tree env, string var, tree val=tree(UNINIT))

Function Documentation

tree drd_env_merge ( tree  env,
tree  t 
)

Definition at line 636 of file drd_info.cpp.

                                 {
  int i, n= N(t);
  for (i=0; (i+1)<n; i+=2)
    if (is_atomic (t[i]))
      env= drd_env_write (env, t[i]->label, t[i+1]);
  return env;
}

Here is the call graph for this function:

Here is the caller graph for this function:

tree drd_env_read ( tree  env,
string  var,
tree  val = tree(UNINIT) 
)

Definition at line 645 of file drd_info.cpp.

                                              {
  int i, n= N(env);
  for (i=0; i<n; i+=2)
    if (env[i] == var)
      return env[i+1];
  return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

tree drd_env_write ( tree  env,
string  var,
tree  val 
)

Definition at line 623 of file drd_info.cpp.

                                               {
  for (int i=0; i<=N(env); i+=2)
    if (i == N(env))
      return env * tree (ATTR, var, val);
    else if (var <= env[i]->label) {
      if (var == env[i]->label)
       return env (0, i) * tree (ATTR, var, val) * env (i+2, N(env));
      return env (0, i) * tree (ATTR, var, val) * env (i, N(env));
    }
  return env;
}

Here is the call graph for this function:

Here is the caller graph for this function: