bump product version to 5.0.4.1
[LibreOffice.git] / starmath / inc / token.hxx
blobec01bcf65030937863bb34fee4258fe1de1e4c55
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_STARMATH_INC_TOKEN_HXX
20 #define INCLUDED_STARMATH_INC_TOKEN_HXX
22 #include <sal/types.h>
23 #include <rtl/ustring.hxx>
24 #include <tools/solar.h>
26 // TokenGroups
27 #define TGOPER 0x00000001
28 #define TGRELATION 0x00000002
29 #define TGSUM 0x00000004
30 #define TGPRODUCT 0x00000008
31 #define TGUNOPER 0x00000010
32 #define TGPOWER 0x00000020
33 #define TGATTRIBUT 0x00000040
34 #define TGALIGN 0x00000080
35 #define TGFUNCTION 0x00000100
36 #define TGBLANK 0x00000200
37 #define TGLBRACES 0x00000400
38 #define TGRBRACES 0x00000800
39 #define TGCOLOR 0x00001000
40 #define TGFONT 0x00002000
41 #define TGSTANDALONE 0x00004000
42 #define TGDISCARDED 0x00008000
43 #define TGLIMIT 0x00010000
44 #define TGFONTATTR 0x00020000
47 enum SmTokenType
49 /* 0*/ TEND, TLGROUP, TRGROUP, TLPARENT, TRPARENT,
50 /* 5*/ TLBRACKET, TRBRACKET, TPLUS, TMINUS, TMULTIPLY,
51 /* 10*/ TDIVIDEBY, TASSIGN, TPOUND, TSPECIAL, TSLASH,
52 /* 15*/ TBACKSLASH, TBLANK, TSBLANK, TRSUB, TRSUP,
53 /* 20*/ TCSUB, TCSUP, TLSUB, TLSUP, TGT,
54 /* 25*/ TLT, TAND, TOR, TINTERSECT, TUNION,
55 /* 30*/ TNEWLINE, TBINOM, TFROM, TTO, TINT,
56 /* 35*/ TSUM, TOPER, TABS, TSQRT, TFACT,
57 /* 40*/ TNROOT, TOVER, TTIMES, TGE, TLE,
58 /* 45*/ TGG, TLL, TDOTSAXIS, TDOTSLOW, TDOTSVERT,
59 /* 50*/ TDOTSDIAG, TDOTSUP, TDOTSDOWN, TACUTE, TBAR,
60 /* 55*/ TBREVE, TCHECK, TCIRCLE, TDOT, TDDOT,
61 /* 60*/ TDDDOT, TGRAVE, THAT, TTILDE, TVEC,
62 /* 65*/ TUNDERLINE, TOVERLINE, TOVERSTRIKE, TITALIC, TNITALIC,
63 /* 70*/ TBOLD, TNBOLD, TPHANTOM, TFONT, TSIZE,
64 /* 75*/ TCOLOR, TALIGNL, TALIGNC, TALIGNR, TLEFT,
65 /* 80*/ TRIGHT, TLANGLE, TLBRACE, TLLINE, TLDLINE,
66 /* 85*/ TLCEIL, TLFLOOR, TNONE, TMLINE, TRANGLE,
67 /* 90*/ TRBRACE, TRLINE, TRDLINE, TRCEIL, TRFLOOR,
68 /* 95*/ TSIN, TCOS, TTAN, TCOT, TFUNC,
69 /*100*/ TSTACK, TMATRIX, TMATFORM, TDPOUND, TPLACE,
70 /*105*/ TTEXT, TNUMBER, TCHARACTER, TIDENT, TNEQ,
71 /*110*/ TEQUIV, TDEF, TPROP, TSIM, TSIMEQ,
72 /*115*/ TAPPROX, TPARALLEL, TORTHO, TIN, TNOTIN,
73 /*120*/ TSUBSET, TSUBSETEQ, TSUPSET, TSUPSETEQ, TPLUSMINUS,
74 /*125*/ TMINUSPLUS, TOPLUS, TOMINUS, TDIV, TOTIMES,
75 /*130*/ TODIVIDE, TTRANSL, TTRANSR, TIINT, TIIINT,
76 /*135*/ TLINT, TLLINT, TLLLINT, TPROD, TCOPROD,
77 /*140*/ TFORALL, TEXISTS, TNOTEXISTS, TLIM, TNABLA,
78 /*145*/ TTOWARD, TSINH, TCOSH, TTANH, TCOTH,
79 /*150*/ TASIN, TACOS, TATAN, TLN, TLOG,
80 /*155*/ TUOPER, TBOPER, TBLACK, TWHITE, TRED,
81 /*160*/ TGREEN, TBLUE, TCYAN, TMAGENTA, TYELLOW,
82 /*165*/ TFIXED, TSANS, TSERIF, TPOINT, TASINH,
83 /*170*/ TACOSH, TATANH, TACOTH, TACOT, TEXP,
84 /*175*/ TCDOT, TODOT, TLESLANT, TGESLANT, TNSUBSET,
85 /*180*/ TNSUPSET, TNSUBSETEQ, TNSUPSETEQ, TPARTIAL, TNEG,
86 /*185*/ TNI, TBACKEPSILON, TALEPH, TIM, TRE,
87 /*190*/ TWP, TEMPTYSET, TINFINITY, TESCAPE, TLIMSUP,
88 /*195*/ TLIMINF, TNDIVIDES, TDRARROW, TDLARROW, TDLRARROW,
89 /*200*/ TUNDERBRACE, TOVERBRACE, TCIRC, TTOP, THBAR,
90 /*205*/ TLAMBDABAR, TLEFTARROW, TRIGHTARROW, TUPARROW, TDOWNARROW,
91 /*210*/ TDIVIDES, TNDIBVIDES, TSETN, TSETZ, TSETQ,
92 /*215*/ TSETR, TSETC, TWIDEVEC, TWIDETILDE, TWIDEHAT,
93 /*220*/ TWIDESLASH, TWIDEBACKSLASH, TLDBRACKET, TRDBRACKET, TNOSPACE,
94 /*225*/ TUNKNOWN, TDEBUG, TPRECEDES, TSUCCEEDS, TPRECEDESEQUAL,
95 /*230*/ TSUCCEEDSEQUAL, TPRECEDESEQUIV, TSUCCEEDSEQUIV, TNOTPRECEDES, TNOTSUCCEEDS,
96 /*235*/ TSILVER, TGRAY, TMAROON, TPURPLE, TLIME,
97 /*240*/ TOLIVE, TNAVY, TTEAL, TAQUA, TFUCHSIA,
98 /*245*/ TINTD
101 struct SmToken
104 OUString aText; // token text
105 SmTokenType eType; // token info
106 sal_Unicode cMathChar;
108 // parse-help info
109 sal_uLong nGroup;
110 sal_uInt16 nLevel;
112 // token position
113 sal_Int32 nRow;
114 sal_Int32 nCol;
116 SmToken();
117 SmToken(SmTokenType eTokenType,
118 sal_Unicode cMath,
119 const sal_Char* pText,
120 sal_uLong nTokenGroup = 0,
121 sal_uInt16 nTokenLevel = 0);
124 struct SmTokenTableEntry
126 const sal_Char* pIdent;
127 SmTokenType eType;
128 sal_Unicode cMathChar;
129 sal_uLong nGroup;
130 sal_uInt16 nLevel;
133 #endif
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */