summaryrefslogtreecommitdiff
path: root/starmath/inc/parse.hxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2010-10-23 16:20:23 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-10-23 16:20:23 +0100
commit46a1843255067dfcda58d1a00913a5d26627cd04 (patch)
tree28ca6e4d88b790cd9c7fa0afad2a453a507cf6f9 /starmath/inc/parse.hxx
parent88b663b7317ef1c6239c9e5ca52b1a9ec14f1993 (diff)
parentbefebfbf3690989e0eb08dab34b0e8505850760d (diff)
Merge branch 'formula' into intformulae
Conflicts: starmath/inc/node.hxx starmath/source/edit.cxx starmath/source/node.cxx starmath/source/view.cxx
Diffstat (limited to 'starmath/inc/parse.hxx')
-rw-r--r--starmath/inc/parse.hxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index f276d11c77a6..5018340b5a01 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -118,7 +118,7 @@ struct SmToken
String aText;
// token info
SmTokenType eType;
- sal_Unicode cMathChar;
+ sal_Unicode cMathChar;
// parse-help info
ULONG nGroup;
USHORT nLevel;
@@ -127,6 +127,11 @@ struct SmToken
xub_StrLen nCol;
SmToken();
+ SmToken(SmTokenType eTokenType,
+ sal_Unicode cMath,
+ const sal_Char* pText,
+ ULONG nTokenGroup = 0,
+ USHORT nTokenLevel = 0);
};
@@ -168,6 +173,14 @@ enum SmConvert
CONVERT_60_TO_50
};
+struct SmTokenTableEntry
+{
+ const sal_Char* pIdent;
+ SmTokenType eType;
+ sal_Unicode cMathChar;
+ ULONG nGroup;
+ USHORT nLevel;
+};
class SmParser
{
@@ -240,7 +253,10 @@ protected:
public:
SmParser();
+ /** Parse rBuffer to formula tree */
SmNode *Parse(const String &rBuffer);
+ /** Parse rBuffer to formula subtree that constitutes an expression */
+ SmNode *ParseExpression(const String &rBuffer);
const String & GetText() const { return BufferString; };
@@ -257,6 +273,7 @@ public:
const SmErrorDesc * NextError();
const SmErrorDesc * PrevError();
const SmErrorDesc * GetError(USHORT i = 0xFFFF);
+ static const SmTokenTableEntry* GetTokenTableEntry( const String &rName );
};