P1: M3 - Parallelized Parser Formula Interpreter (Archived)

Please place link to Rules as sticky thread


You have this niceThreading Challenge forum, which is easy to get to, but to get a copy of the rules for the particular challenge you have several click hoop jumps to find the rules. Can you please place in each threading challenge forum a sticky thread containing current and revised rules for that challenge. Example:

Official rules (PDF):http://software.intel.com/file/m/36890

Jim Dempsey

Input clarification

The .PDF filerules state the line termination character is semicolon (;) and makes no reference as to what constitutes an inputline, in particularis it CR, LF, CRLF or the aformentioned are considered whitespace. Meaning

var x=50;var y=10
; var z = 9;

is valid input. I will have to assume since this is not mentioned that this is left as an implementation detail
Note, in your "Valid keywords and functions" table, section "var", lines 3 and 4, column Examples has

var decimal =

Integer division

Since javascript and standard datatypes in other languages are both mentioned, integer division is a gray area. In C,

int i = 5 / 2;

means i = 2. This is what is expected if the standard int datatype is used.In javascript, however,

var i = 5 / 2;

gives us i = 2.5.Which of these is valid?

behaviour on error

there are various errors that may occur - syntax errors, type coercion errors (using a number where a string is expected), arithmetic errors (divide by 0), and possibly others (overflow?)I guess the error message, line number etc. is written to stderr. What output is expected to be written to the output file when these errors occur? Is the output ignored, oor should it contain all output statements up to the point of the line that is in error?

entities and syntax clarification

The text mentions javascript and also the XML entities " and " Is the parser expected to handle these entities or are these just by way of example/clarification/obfuscation?
If entities are to be recognised, is it just specifically these two, or should all XML entities and character references be recognised, e.g. & and other character refereneces, say &#65 for 'A'.
What is allowed within a string?Will quotes appear within strings? Are entities within strings allowed?

Iscriversi a P1: M3 - Parallelized Parser Formula Interpreter (Archived)