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