Back to index

texmacs  1.0.7.15
Classes | Functions
math_language.cpp File Reference
#include "analyze.hpp"
#include "hyphenate.hpp"
#include "impl_language.hpp"
#include "file.hpp"
#include "iterator.hpp"
#include "packrat_grammar.hpp"

Go to the source code of this file.

Classes

struct  math_language_rep

Functions

language math_language (string name)
string math_symbol_group (string sym, string lang)
array< stringmath_group_members (string gr, string lang)
string math_symbol_type (string sym, string lang)

Function Documentation

Definition at line 285 of file math_language.cpp.

                                            {
  language lan= math_language (lang);
  return lan->get_members (gr);
}

Here is the call graph for this function:

Here is the caller graph for this function:

language math_language ( string  name)

Definition at line 273 of file math_language.cpp.

                            {
  if (language::instances -> contains (name)) return language (name);
  return tm_new<math_language_rep> (name);
}

Here is the call graph for this function:

Here is the caller graph for this function:

string math_symbol_group ( string  sym,
string  lang 
)

Definition at line 279 of file math_language.cpp.

                                            {
  language lan= math_language (lang);
  return lan->get_group (sym);
}

Here is the call graph for this function:

Here is the caller graph for this function:

string math_symbol_type ( string  sym,
string  lang 
)

Definition at line 291 of file math_language.cpp.

                                           {
  int pos= 0;
  language lan= math_language (lang);
  text_property prop= lan->advance (tree (sym), pos);
  switch (prop->op_type) {
  case OP_UNKNOWN:
    return "unknown";
  case OP_SYMBOL:
    return "symbol";
  case OP_UNARY:
    return "unary";
  case OP_BINARY:
    return "binary";
  case OP_N_ARY:
    return "n-ary";
  case OP_PREFIX:
    return "prefix";
  case OP_POSTFIX:
    return "postfix";
  case OP_INFIX:
    return "infix";
  case OP_SEPARATOR:
    return "separator";
  case OP_OPENING_BRACKET:
    return "opening-bracket";
  case OP_MIDDLE_BRACKET:
    return "middle-bracket";
  case OP_CLOSING_BRACKET:
    return "closing-bracket";
  }
  return "unknown";
}

Here is the call graph for this function:

Here is the caller graph for this function: