]> git.lyx.org Git - lyx.git/blob - src/mathed/math_parser.h
fix pullArg when pressing <Delete> at the end of an cell
[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 #ifdef __GNUG__
23 #pragma interface
24 #endif
25
26 #include "LString.h"
27
28 #include "symbol_def.h"
29
30 class MathArray;
31 class MathInset;
32 class LyXLex;
33
34 ///
35 enum MathTokenEnum
36 {
37         ///
38         LM_TK_BOP = 256,
39         ///
40         LM_TK_ALPHA,
41         ///
42         LM_TK_STR,
43         ///
44         LM_TK_SYM,
45         ///
46         LM_TK_FRAC,
47         ///
48         LM_TK_CHOOSE,
49         ///
50         LM_TK_SQRT,
51         ///
52         LM_TK_BEGIN,
53         ///
54         LM_TK_END,
55         ///
56         LM_TK_NEWLINE,
57         ///
58         LM_TK_UNDEF,
59         ///
60         LM_TK_FONT,
61         ///
62         LM_TK_LEFT,
63         ///
64         LM_TK_RIGHT,
65         ///
66         LM_TK_DECORATION,
67         ///
68         LM_TK_FUNC,
69         ///
70         LM_TK_FUNCLIM,
71         ///
72         LM_TK_BIGSYM,
73         ///
74         LM_TK_LABEL,
75         ///
76         LM_TK_NONUM,
77         ///
78         LM_TK_SPACE,
79         ///
80         LM_TK_DOTS,
81         ///
82         LM_TK_LIMIT,
83         ///
84         LM_TK_STY,
85         ///
86         LM_TK_PMOD,
87         ///
88         LM_TK_BMOD,
89         ///
90         LM_TK_MACRO,
91         ///
92         LM_TK_SPECIAL,
93         ///
94         LM_TK_ARGUMENT, 
95         ///
96         LM_TK_NEWCOMMAND,
97         ///
98         LM_TK_STACK
99 };
100
101
102 ///
103 struct latexkeys {
104         ///
105         char const * name;
106         ///
107         short token;
108         ///
109         unsigned int id;
110 };
111
112
113 ///
114 latexkeys const * in_word_set(string const & str);
115
116 ///
117 latexkeys const * lm_get_key_by_id(unsigned int id, short tc);
118
119
120 MathInset * mathed_parse(string const &);
121 MathInset * mathed_parse(std::istream &);
122 MathInset * mathed_parse(LyXLex &);
123
124 #endif