LCOV - code coverage report
Current view: top level - starmath/inc - token.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 1 100.0 %
Date: 2015-06-13 12:38:46 Functions: 3 4 75.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : #ifndef INCLUDED_STARMATH_INC_TOKEN_HXX
      20             : #define INCLUDED_STARMATH_INC_TOKEN_HXX
      21             : 
      22             : #include <sal/types.h>
      23             : #include <rtl/ustring.hxx>
      24             : #include <tools/solar.h>
      25             : 
      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
      45             : 
      46             : 
      47             : enum SmTokenType
      48             : {
      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,       TPRECEDES,      TSUCCEEDS,      TPRECEDESEQUAL, TSUCCEEDSEQUAL,
      95             : /*230*/ TPRECEDESEQUIV, TSUCCEEDSEQUIV, TNOTPRECEDES,   TNOTSUCCEEDS,   TSILVER,
      96             : /*235*/ TGRAY,          TMAROON,        TPURPLE,        TLIME,          TOLIVE,
      97             : /*240*/ TNAVY,          TTEAL,          TAQUA,          TFUCHSIA,       TINTD
      98             : };
      99             : 
     100       33569 : struct SmToken
     101             : {
     102             : 
     103             :     OUString        aText;      // token text
     104             :     SmTokenType     eType;      // token info
     105             :     sal_Unicode cMathChar;
     106             : 
     107             :     // parse-help info
     108             :     sal_uLong       nGroup;
     109             :     sal_uInt16      nLevel;
     110             : 
     111             :     // token position
     112             :     sal_Int32      nRow;
     113             :     sal_Int32      nCol;
     114             : 
     115             :     SmToken();
     116             :     SmToken(SmTokenType eTokenType,
     117             :             sal_Unicode cMath,
     118             :             const sal_Char* pText,
     119             :             sal_uLong nTokenGroup = 0,
     120             :             sal_uInt16 nTokenLevel = 0);
     121             : };
     122             : 
     123             : struct SmTokenTableEntry
     124             : {
     125             :     const sal_Char* pIdent;
     126             :     SmTokenType     eType;
     127             :     sal_Unicode     cMathChar;
     128             :     sal_uLong       nGroup;
     129             :     sal_uInt16      nLevel;
     130             : };
     131             : 
     132             : #endif
     133             : 
     134             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11