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