]> git.lyx.org Git - lyx.git/blob - src/mathed/math_parser.h
rename commandtags.h to lfuns.h and renumber/cleanup. Rebuild the tree !
[lyx.git] / src / mathed / math_parser.h
1 // -*- C++ -*-
2 /**
3  *  File:        math_parser.h
4  *  Purpose:     Declaration of parsing utilities for mathed
5  *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
6  *  Created:     January 1996
7  *  Description: Parse LaTeX2e math mode code.
8  *
9  *  Dependencies: Xlib, XForms
10  *
11  *  Copyright: 1996, Alejandro Aguilar Sierra
12  *
13  *   Version: 0.8beta.
14  *
15  *   You are free to use and modify this code under the terms of
16  *   the GNU General Public Licence version 2 or later.
17  */
18
19 #ifndef MATH_PARSER_H
20 #define MATH_PARSER_H
21
22
23 #include "LString.h"
24
25 class MathAtom;
26 class MathArray;
27 class MathGridInset;
28 class LyXLex;
29
30
31 ///
32 struct latexkeys {
33         /// name of the macro or primitive
34         string name;
35         /// name of a inset that handles that macro
36         string inset;
37         /// position of the ting in a font
38         string draw;
39         /// operator/..., fontname e
40         string extra;
41         /// how is this called as XML entity?
42         string xmlname;
43 };
44
45
46 /// check whether this is a well-known (La)TeX macro or primitive
47 latexkeys const * in_word_set(string const & str);
48
49 /// parse formula from a string
50 bool mathed_parse_normal(MathAtom &, 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(MathGridInset &, string const &);
57
58 /// parse a single cell from a string
59 void mathed_parse_cell(MathArray & ar, string const &);
60 /// ... a stream
61 void mathed_parse_cell(MathArray & ar, std::istream &);
62
63 #endif