X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathParser.h;h=5be3b10275ee3e7816858141d4342e735898c6c5;hb=1007714d2ec380d935d59092013ea88373bfb1df;hp=1e4b7b7392a3d5f39173f6f45b6a6de0a2aafec1;hpb=de6418f37765fe452f135f96dee6d49897bff215;p=lyx.git diff --git a/src/mathed/MathParser.h b/src/mathed/MathParser.h index 1e4b7b7392..5be3b10275 100644 --- a/src/mathed/MathParser.h +++ b/src/mathed/MathParser.h @@ -23,9 +23,9 @@ namespace lyx { class MathAtom; -class MathArray; +class MathData; class InsetMathGrid; -class LyXLex; +class Lexer; /// @@ -35,11 +35,23 @@ public: docstring name; /// name of a inset that handles that macro docstring inset; - /// position of the thing in a font + /** + * The string or symbol to draw. + * This is a string of length 1 if \p name is a known symbol, and + * the corresponding font is available. In this case it is + * NO UCS4 STRING! The only "character" of the string simply denotes + * the code point of the symbol in the font. Therefore you have to + * be very careful if you pass \c draw to any function that takes a + * docstring argument. + * If \p name is a known symbol, but the corresponding font is not + * available, or if it is a function name, then \c draw contains a + * regular UCS4 string (actuallay \c draw == \c name) that is painted + * on screen. + */ docstring draw; /// operator/..., fontname e docstring extra; - /// how is this called as XML entity? + /// how is this called as XML entity in MathML? docstring xmlname; /// required LaTeXFeatures docstring requires; @@ -51,17 +63,16 @@ latexkeys const * in_word_set(docstring const & str); /// parse formula from a string bool mathed_parse_normal(MathAtom &, docstring const &); -/// ... a stream -bool mathed_parse_normal(MathAtom &, std::istream &); -/// ... the LyX lexxer -bool mathed_parse_normal(MathAtom &, LyXLex &); /// ... the LyX lexxer +bool mathed_parse_normal(MathAtom &, Lexer &); +/// parse formula from a string into a grid void mathed_parse_normal(InsetMathGrid &, docstring const &); /// parse a single cell from a string -void mathed_parse_cell(MathArray & ar, docstring const &); -/// ... a stream -void mathed_parse_cell(MathArray & ar, std::istream &); +void mathed_parse_cell(MathData & ar, docstring const &); +/// parse a single cell from a stream. Only use this for reading from .lyx +/// file format, for the reason see Parser::tokenize(std::istream &). +void mathed_parse_cell(MathData & ar, std::istream &); void initParser();