]> git.lyx.org Git - lyx.git/blob - src/mathed/math_parser.h
Fix math cursor positioning bug
[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 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 };
39
40
41 /// check whether this is a well-known (La)TeX macro or primitive
42 latexkeys const * in_word_set(std::string const & str);
43
44 /// parse formula from a string
45 bool mathed_parse_normal(MathAtom &, std::string const &);
46 /// ... a stream
47 bool mathed_parse_normal(MathAtom &, std::istream &);
48 /// ... the LyX lexxer
49 bool mathed_parse_normal(MathAtom &, LyXLex &);
50 /// ... the LyX lexxer
51 void mathed_parse_normal(MathGridInset &, std::string const &);
52
53 /// parse a single cell from a string
54 void mathed_parse_cell(MathArray & ar, std::string const &);
55 /// ... a stream
56 void mathed_parse_cell(MathArray & ar, std::istream &);
57
58 void initParser();
59
60 #endif