Is there a limit on variable name length?
P1: M3 - Parallelized Parser Formula Interpreter
Some doubts
#1
in:
var x = 10;
output(string(x));
var x = 5;
free(x);
out:
10
error:
line 3: x has already been declared
#2
in:
var x = 10;
output(string(x));
out:
10
error:
line 1: x is not free
#3
in:
var x = 10;
output(string(x + 2));
x + 3;
sqrt(3 + 4);
string(x);
output(string(x));
out:
12
error:
line 3: invalid expression
string
Definition:
string(variableName | value)
var s = "Hello";
var s2 = string(s);
var s3 = string("this too" + " going crazy" + s);
Is that valid?
Granted, you would ordinarily string assign without string() function.
Jim Dempsey
Please clarify: Right-to-left or left-to-right?
Here
http://software.intel.com/en-us/forums/showpost.php?p=152354
Rama said "right to left" as the default operator order. Did he really mean "left to right"? Right-to-left is terribly non-standard and unintuitive, but if that's the spec, then that's the spec. For example consider:
15 + 15 / 3
l-t-r = 10
r-t-l = 20
Allowable string contents
Previously Rama claimed that strings would only contain [a-zA-Z0-9 \\t]. However examples also contain ':'. What is allowable content of string, really?
Negative numbers disallowed?
right to left vs unary op
Deep in another thread you stated in lack of parenthesis assume right to left evaluation
a = -1 + 2 + 3;
Right to left evaluation is equivalent to -(1 + (2 + 3)) = -6
as opposed to (-1) + (2 + 3) = 4
then there is
a = 1 + -2 + 3; ? -4 or 2 ?
IMHO unary operators +and - have to be specified (presumably with higher precedence than arithmetic operators)
Jim Dempsey
Ranking query
Assume you have a very long input file with no syntax errors.
It is clear for this case that the time to completion is what is important.
Assume you have a very long input file with no syntax errors except at the very end of the file. (syntax test program).
What is more important? Time to completion with error message or correctly identifying line and statement in program?
Note, these require different strategies for different requirements.
Syntax redux
The other thread was getting croweded, so here's a new attempt: Taking comments into account:
The web text problem fixed for Master Problem 3, P1:M3 Parallelized Parser Formula Interpreter
Good news! The Master Problem 3 web problem has been fixed. The complete text is now on the Master Problem 3, P1:M3 Parallelized Parser Formula Interpreter. We will keep the PDF available on the page.
