]> git.lyx.org Git - features.git/blob - src/mathed/MathParser.h
Fix some unicode conversion problems, more work needed.
[features.git] / src / mathed / MathParser.h
1 // -*- C++ -*-
2 /**
3  * \file MathParser.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Alejandro Aguilar Sierra
8  * \author André Pönitz
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef MATH_PARSER_H
14 #define MATH_PARSER_H
15
16 #include "support/types.h"
17
18 #include <string>
19 #include <vector>
20
21 namespace lyx {
22
23
24 class MathAtom;
25 class MathArray;
26 class InsetMathGrid;
27 class LyXLex;
28
29
30 ///
31 class latexkeys {
32 public:
33         /// name of the macro or primitive
34         std::string name;
35         /// name of a inset that handles that macro
36         std::string inset;
37         /// position of the ting in a font
38         std::vector<char_type> draw;
39         /// operator/..., fontname e
40         std::string extra;
41         /// how is this called as XML entity?
42         std::string xmlname;
43         /// required LaTeXFeatures
44         std::string requires;
45 };
46
47
48 /// check whether this is a well-known (La)TeX macro or primitive
49 latexkeys const * in_word_set(std::string const & str);
50
51 /// parse formula from a string
52 bool mathed_parse_normal(MathAtom &, std::string const &);
53 /// ... a stream
54 bool mathed_parse_normal(MathAtom &, std::istream &);
55 /// ... the LyX lexxer
56 bool mathed_parse_normal(MathAtom &, LyXLex &);
57 /// ... the LyX lexxer
58 void mathed_parse_normal(InsetMathGrid &, std::string const &);
59
60 /// parse a single cell from a string
61 void mathed_parse_cell(MathArray & ar, std::string const &);
62 /// ... a stream
63 void mathed_parse_cell(MathArray & ar, std::istream &);
64
65 void initParser();
66
67
68 } // namespace lyx
69
70 #endif