-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
Hello. I found that parser cannot properly parse function names ending with number like f1() or test5(). It adds extra token * between function name and opening "(".
so list of tokens looks like: [f1, , (, )] [test5,,(,)]
Here is my correction for method private List Lexer(string expr)
if (ch == '(') {
if (i != 0 && (char.IsDigit(expr[i - 1]) || expr[i - 1] == ')')) {
//correction start
if (expr[i-1] == ')'||!LocalFunctions.Keys.Contains(tokens[tokens.Count-1])) {
tokens.Add("*");
}
//correction end
tokens.Add("(");
}
else {
tokens.Add("(");
}
}
else {
tokens.Add(ch.ToString());
}