From 4c7849e8d9413ecf8f9bbca2d5ff0cea9fc8505c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Thu, 9 Aug 2001 10:48:50 +0000 Subject: [PATCH] move more stuff to math_hash git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2462 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_hash.C | 6 +++++- src/mathed/math_parser.C | 7 ------- src/mathed/math_spaceinset.C | 1 + src/mathed/support.C | 8 +++----- src/mathed/support.h | 2 -- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/mathed/math_hash.C b/src/mathed/math_hash.C index 0461e9ddc3..325984df69 100644 --- a/src/mathed/math_hash.C +++ b/src/mathed/math_hash.C @@ -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(-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! }; diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index e34d3aa637..ffa08802ac 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -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(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()) { diff --git a/src/mathed/math_spaceinset.C b/src/mathed/math_spaceinset.C index 764a324bfc..46408f177e 100644 --- a/src/mathed/math_spaceinset.C +++ b/src/mathed/math_spaceinset.C @@ -9,6 +9,7 @@ #include "support/LOstream.h" + MathSpaceInset::MathSpaceInset(int sp) : space_(sp) {} diff --git a/src/mathed/support.C b/src/mathed/support.C index bc62d948e4..d751a76632 100644 --- a/src/mathed/support.C +++ b/src/mathed/support.C @@ -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" +}; diff --git a/src/mathed/support.h b/src/mathed/support.h index d5d2a5f942..e32e7683c3 100644 --- a/src/mathed/support.h +++ b/src/mathed/support.h @@ -7,8 +7,6 @@ #include "LString.h" class Painter; -class MathArray; -class MathMatrixInset; extern char const * math_font_name[]; extern char const * latex_mathspace[];