]> git.lyx.org Git - lyx.git/blob - src/mathed/MathParser.h
fix reading UTF8 encoded symbol file
[lyx.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 #include "support/docstring.h"
18
19 #include <string>
20 #include <vector>
21
22 namespace lyx {
23
24
25 class MathAtom;
26 class MathArray;
27 class InsetMathGrid;
28 class LyXLex;
29
30
31 ///
32 class latexkeys {
33 public:
34         /// name of the macro or primitive
35         docstring name;
36         /// name of a inset that handles that macro
37         docstring inset;
38         /// position of the thing in a font     
39         docstring draw;
40         /// operator/..., fontname e
41         docstring extra;
42         /// how is this called as XML entity?
43         docstring xmlname;
44         /// required LaTeXFeatures
45         docstring requires;
46 };
47
48
49 /// check whether this is a well-known (La)TeX macro or primitive
50 latexkeys const * in_word_set(docstring const & str);
51
52 /// parse formula from a string
53 bool mathed_parse_normal(MathAtom &, docstring const &);
54 /// ... a stream
55 bool mathed_parse_normal(MathAtom &, std::istream &);
56 /// ... the LyX lexxer
57 bool mathed_parse_normal(MathAtom &, LyXLex &);
58 /// ... the LyX lexxer
59 void mathed_parse_normal(InsetMathGrid &, docstring const &);
60
61 /// parse a single cell from a string
62 void mathed_parse_cell(MathArray & ar, docstring const &);
63 /// ... a stream
64 void mathed_parse_cell(MathArray & ar, std::istream &);
65
66 void initParser();
67
68
69 } // namespace lyx
70
71 #endif