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