]> git.lyx.org Git - features.git/commitdiff
move more stuff to math_hash
authorAndré Pönitz <poenitz@gmx.net>
Thu, 9 Aug 2001 10:48:50 +0000 (10:48 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 9 Aug 2001 10:48:50 +0000 (10:48 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2462 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_hash.C
src/mathed/math_parser.C
src/mathed/math_spaceinset.C
src/mathed/support.C
src/mathed/support.h

index 0461e9ddc326552e82a25dd00bae2316147e94b9..325984df69fc3f67b1f0cac0e86eb83084831b10 100644 (file)
@@ -16,12 +16,16 @@ latexkeys const wordlist[] =
        //{"scriptscriptstyle",  LM_TK_STY, LM_ST_SCRIPTSCRIPT, LMB_NONE},
        //{"scriptstyle",  LM_TK_STY, LM_ST_SCRIPT, LMB_NONE},
        //{"textstyle",  LM_TK_STY, LM_ST_TEXT, LMB_NONE},
+       {"!",  LM_TK_SPACE, 0, LMB_NONE},
        {"#",  LM_TK_SPECIAL, '#', LMB_NONE},
        {"$",  LM_TK_SPECIAL, '$', LMB_NONE},
        {"%",  LM_TK_SPECIAL, '%', LMB_NONE},
        {"&",  LM_TK_SPECIAL, '&', LMB_NONE},
        {"(",  LM_TK_BEGIN, LM_OT_SIMPLE, LMB_NONE},
        {")",  LM_TK_END, LM_OT_SIMPLE, LMB_NONE},
+       {",",  LM_TK_SPACE, 1, LMB_NONE},
+       {":",  LM_TK_SPACE, 2, LMB_NONE},
+       {";",  LM_TK_SPACE, 3, LMB_NONE},
        {"Delta",  LM_TK_SYM, LM_Delta, LMB_NONE},
        {"Downarrow",  LM_TK_SYM, LM_Downarrow, LMB_NONE},
        {"Gamma",  LM_TK_SYM, LM_Gamma, LMB_NONE},
@@ -47,7 +51,6 @@ latexkeys const wordlist[] =
        {"Vert",  LM_TK_SYM, LM_Vert, LMB_NONE},
        {"Xi",  LM_TK_SYM, LM_Xi, LMB_NONE},
        {"[",  LM_TK_BEGIN, LM_OT_EQUATION, LMB_NONE},
-// -1 needed in mathed_parse_lines!
        {"\\",  LM_TK_NEWLINE, static_cast<unsigned>(-1), LMB_NONE},
        {"]",  LM_TK_END, LM_OT_EQUATION, LMB_NONE},
        {"_",  LM_TK_SPECIAL, '_', LMB_NONE},
@@ -294,6 +297,7 @@ latexkeys const wordlist[] =
        {"{",  LM_TK_SPECIAL, '{', LMB_NONE},
        {"|",  LM_TK_UNDEF, '|', LMB_NONE},
        {"}",  LM_TK_SPECIAL, '}', LMB_NONE}
+// -1 needed in mathed_parse_lines!
 };
 
 
index e34d3aa6377d6b72039539d284e3f2b7a683bb81..ffa08802ac01124941816d0b0895de92f750baa5 100644 (file)
@@ -292,13 +292,6 @@ int yylex()
                                yylval.i = l->id;
                                return l->token;
                        }
-                       if (lexcode[c] == LexMathSpace) {
-                               int i;
-                               for (i = 0; i < 4 && static_cast<int>(c) != latex_mathspace[i][0]; ++i)
-                                       ;
-                               yylval.i = (i < 4) ? i : 0; 
-                               return LM_TK_SPACE; 
-                       }
                        if (lexcode[c] == LexAlpha) {
                                yytext.erase();
                                while (lexcode[c] == LexAlpha && yyis->good()) {
index 764a324bfc9a045054066e019eccf1df9d8cb8ca..46408f177e2f8e6e49c3d6c8a0ab2dfbf39f7960 100644 (file)
@@ -9,6 +9,7 @@
 #include "support/LOstream.h"
 
 
+
 MathSpaceInset::MathSpaceInset(int sp)
        : space_(sp)
 {}
index bc62d948e43cad03e9fe3d42adcb3c3aa2d42967..d751a766322f9ca5bdddb172681105d45f3de863 100644 (file)
@@ -237,11 +237,6 @@ char const * math_font_name[] = {
 };
 
 
-char const * latex_mathspace[] = {
-       "!", ",", ":", ";", "quad", "qquad"
-};
-
-
 namespace {
 
 /* 
@@ -743,3 +738,6 @@ void math_font_max_dim(MathTextCodes code, MathStyles siz, int & asc, int & des)
        des = lyxfont::maxDescent(font);
 }
 
+char const * latex_mathspace[] = {
+       "!", ",", ":", ";", "quad", "qquad"
+};
index d5d2a5f942c6acad6ad1b86444d52b926d04b7ac..e32e7683c355a43da641dddd40b5b8f37ce47bf6 100644 (file)
@@ -7,8 +7,6 @@
 #include "LString.h"
 
 class Painter;
-class MathArray;
-class MathMatrixInset;
 
 extern char const * math_font_name[];
 extern char const * latex_mathspace[];