}
//Note that FromString likes to toy with the string, but anything done to the string will be undone.
- bool FromString(char *str, CASDictionary dictionary) {
+ bool FromString(const char *str, CASDictionary dictionary) {
ExpressionFromString(this, str, dictionary);
return Sanitize(this, dictionary);
}
- char *ToString(void) {
-
- }
const char *OpString(void) {
if (type==prefix && prefix.op<PrefixOperator::enumSize)
return prefix_op_string[prefix.op];
Expression op {type=binary};
Expression w;
ExpressionClass pc;
- int order;
if (s[1]==0) { //single-character operator
switch (*s) {
case '+':
}
};
-void ExpressionFromString(Expression expr, char *str, CASDictionary dictionary) {
+void ExpressionFromString(Expression expr, const char *str, CASDictionary dictionary) {
ExpressionTree tree {dictionary};
- char *s, *p, *e; //token start and end
+ const char * s; //token start and end
+ char *p, *e;
CASCharFlag flag;
CASCharFlags cf = cascharflags;
char borrow;
expr.Free();
s = str;
- e = s;
+ e = (char *)s;
while (*s) {
for (;;) //for loop is used so multiple character types that merge into one token can be implemented in the future
{ //grab the next token
flag = (CASCharFlag)f;
break;
}
- p = s;
+ p = (char *)s;
switch (flag) {
case letter: {
uint f;
if (f != (uint)-1)
tree.PushFunction((CASFunction)f);
else do {
- unsigned char c;
uint con = (uint)-1;
UTF8GetChar(p, &charlen);
p += charlen;