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