]> git.lyx.org Git - features.git/blob - src/mathed/math_parser.h
Replace LString.h with support/std_string.h,
[features.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
17 #include "support/std_string.h"
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         string name;
29         /// name of a inset that handles that macro
30         string inset;
31         /// position of the ting in a font
32         string draw;
33         /// operator/..., fontname e
34         string extra;
35         /// how is this called as XML entity?
36         string xmlname;
37 };
38
39
40 /// check whether this is a well-known (La)TeX macro or primitive
41 latexkeys const * in_word_set(string const & str);
42
43 /// parse formula from a string
44 bool mathed_parse_normal(MathAtom &, 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 &, string const &);
51
52 /// parse a single cell from a string
53 void mathed_parse_cell(MathArray & ar, string const &);
54 /// ... a stream
55 void mathed_parse_cell(MathArray & ar, std::istream &);
56
57 #endif