]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_parser.h
forward search in math insets. ugly. seems to work. don't ask why.
[lyx.git] / src / mathed / math_parser.h
index 02e16a885457d1a889c9325c0e3584fcc493f89e..8984fa37633264e09523d3caad6b2071dc3f80c8 100644 (file)
 #endif
 
 #include "LString.h"
-
 #include "math_defs.h"
-#include "symbol_def.h"
 
+class MathHullInset;
+class MathMacroTemplate;
+class MathAtom;
 class MathArray;
-class MathInset;
 class LyXLex;
 
 ///
 enum MathTokenEnum
 {
        ///
-       LM_TK_BOP = 256,
+       LM_TK_SYM = 256,
        ///
-       LM_TK_ALPHA,
+       LM_TK_BOX,
        ///
-       LM_TK_STR,
+       LM_TK_CHOOSE,
        ///
-       LM_TK_SYM,
+       LM_TK_BINOM,
        ///
-       LM_TK_FRAC,
+       LM_TK_ATOP,
        ///
-       LM_TK_CHOOSE,
+       LM_TK_OVER,
        ///
-       LM_TK_SQRT,
+       LM_TK_FRAC,
        ///
-       LM_TK_BEGIN,
+       LM_TK_SQRT,
        ///
-       LM_TK_END,
+       LM_TK_ROOT,
        ///
-       LM_TK_NEWLINE,
+       LM_TK_LEFTEQN,
        ///
-       LM_TK_UNDEF,
+       LM_TK_BEGIN,
        ///
+       LM_TK_END,
+       /// mathcal, mathrm...
+       LM_TK_OLDFONT,
+       /// cal,...
        LM_TK_FONT,
        ///
        LM_TK_LEFT,
@@ -70,7 +74,17 @@ enum MathTokenEnum
        ///
        LM_TK_FUNCLIM,
        ///
-       LM_TK_BIGSYM,
+       LM_TK_CMR,
+       ///
+       LM_TK_CMSY,
+       ///
+       LM_TK_CMM,
+       ///
+       LM_TK_CMEX,
+       ///
+       LM_TK_MSA,
+       ///
+       LM_TK_MSB,
        ///
        LM_TK_LABEL,
        ///
@@ -82,9 +96,9 @@ enum MathTokenEnum
        ///
        LM_TK_LIMIT,
        ///
-       LM_TK_STY,
+       LM_TK_PROTECT,
        ///
-       LM_TK_MACRO,
+       LM_TK_STY,
        ///
        LM_TK_SPECIAL,
        ///
@@ -92,6 +106,12 @@ enum MathTokenEnum
        ///
        LM_TK_NEWCOMMAND,
        ///
+       LM_TK_MATH,
+       ///
+       LM_TK_NOT,
+       ///
+       LM_TK_KERN,
+       ///
        LM_TK_STACK
 };
 
@@ -99,13 +119,17 @@ enum MathTokenEnum
 ///
 struct latexkeys {
        ///
-       char const * name;
+       string name;
        ///
        short token;
        ///
        unsigned int id;
        ///
-       MathBinaryTypes bin;
+       unsigned char latex_font_id;
+       ///
+       string type;
+       ///
+       string xmlname;
 };
 
 
@@ -113,11 +137,17 @@ struct latexkeys {
 latexkeys const * in_word_set(string const & str);
 
 ///
-latexkeys const * lm_get_key_by_id(unsigned int id, short tc);
+void ReadSymbols(string const & file);
+
+bool mathed_parse_normal(MathAtom &, string const &);
+bool mathed_parse_normal(MathAtom &, std::istream &);
+bool mathed_parse_normal(MathAtom &, LyXLex &);
 
+string mathed_parse_macro(string const &);
+string mathed_parse_macro(std::istream &);
+string mathed_parse_macro(LyXLex &);
 
-MathInset * mathed_parse(string const &);
-MathInset * mathed_parse(std::istream &);
-MathInset * mathed_parse(LyXLex &);
+void mathed_parse_cell(MathArray & ar, string const & str);
+void mathed_parse_cell(MathArray & ar, std::istream & is);
 
 #endif