Executor on the site works now

This commit is contained in:
Dale Weiler 2012-11-13 05:04:06 +00:00
parent ef80c6da7e
commit f5884d72ce
73 changed files with 12167 additions and 2628 deletions

BIN
dat/0.dat Normal file

Binary file not shown.

BIN
dat/1.dat Normal file

Binary file not shown.

BIN
dat/10.dat Normal file

Binary file not shown.

BIN
dat/11.dat Normal file

Binary file not shown.

BIN
dat/2.dat Normal file

Binary file not shown.

BIN
dat/3.dat Normal file

Binary file not shown.

BIN
dat/4.dat Normal file

Binary file not shown.

BIN
dat/5.dat Normal file

Binary file not shown.

BIN
dat/6.dat Normal file

Binary file not shown.

BIN
dat/7.dat Normal file

Binary file not shown.

BIN
dat/8.dat Normal file

Binary file not shown.

BIN
dat/9.dat Normal file

Binary file not shown.

View file

@ -3,9 +3,11 @@
* just reference these as files, aparently that's not possible, w/e
*/
var examples = new Array();
var eargs = new Array();
/* example code */
examples[0] = 'void(string) print = #1;\nvoid(string what) main = {\n\tprint(what);\n\tprint("\\n");\n};\n';
eargs[0] = '-string "Hello World"';
examples[1] = '\
void(string, ...) print = #1;\n\
string(float) ftos = #2;\n\
@ -21,6 +23,7 @@ void(float a, float b, float c) main = {\n\
\tsum(sum(a, b, c), b, c));\n\
\tprint(ftos(f), \"\\n\");\n\
};\n';
eargs[1] = '-float 100 -float 200 -float 300';
examples[2] = '\
void(string, ...) print = #1;\n\
string(float) ftos = #2;\n\
@ -33,6 +36,7 @@ void(float a, float b) main = {\n\
\tif (a >= b) print("ge\\n");\n\
\tif (a <= b) print("le\\n");\n\
};\n';
eargs[2] = '-float 1000 -float 2000';
examples[3] = '\
void(string, string) print = #1;\n\
entity() spawn = #3;\n\
@ -51,6 +55,7 @@ void() main = {\n\
\te.b = "bar";\n\
\tcallout(e, b);\n\
};\n';
eargs[3] = '';
examples[4] = '\
.float globf;\n\
.vector globv;\n\
@ -98,6 +103,7 @@ void(vector a, vector b) main = {\n\
\n\
\tprint("vis: ", ftos(visible(targ)), "\\n");\n\
};\n';
eargs[5] = "-vector '100 200 0' -vector '2000 1 10'";
examples[6] = '\
void(string, string) print = #1;\n\
\n\
@ -112,6 +118,7 @@ void(string() f) printer = {\n\
void() main = {\n\
\tprinter(getter);\n\
};\n';
eargs[6] = '';
examples[7] = '\
.float globf;\n\
.vector globv;\n\
@ -130,6 +137,7 @@ void(float c) main = {\n\
\telse\n\
\t\tprint("Else\\n");\n\
};\n';
eargs[8] = '-float 1000.45f';
examples[9] = '\
void(string, ...) print = #1;\n\
string(float) ftos = #2;\n\
@ -153,6 +161,7 @@ void(float n) main = {\n\
\t\ti += 1;\n\
\t} while (i < n);\n\
};\n';
eargs[9] = '-float 10';
examples[10] ='\
void(string, ...) print = #1;\n\
string(float) ftos = #2;\n\
@ -168,6 +177,7 @@ void(float a, float b) main = {\n\
\tprint("&& ", ftos(a&&b), "\\n");\n\
\tprint("|| ", ftos(a||b), "\\n");\n\
};\n';
eargs[10] = '-float 10 -float 20';
examples[11] = '\
void(string, string) print = %:1;\n\
\n\
@ -175,12 +185,14 @@ void() main = ??<\n\
\tprint("??=??\'??(??)??!??<??>??-??/??/%>", "??/n");\n\
\tprint("#^[]|{}~\\%>", "\\n");\n\
%>;\n';
eargs[11] = '-string "Hello " -string "World!"';
examples[12] = '\
void(string, ...) print = #1;\n\
\n\
void(string what) main = {\n\
\tprint(what, "\\n");\n\
};\n';
eargs[12] = '-string "Pizza!"';
/* ad-hoc eh? */
function update() {
@ -188,13 +200,19 @@ function update() {
var doc = document.getElementById("input");
doc.value = examples[sel[sel.selectedIndex].value - 1];
document.getElementById("args").value = eargs[sel[sel.selectedIndex].value - 1];
}
function compile() {
var args = [
'dat/' + document.getElementById("eg").selectedIndex.toString() + '.dat'
].concat(document.getElementById("args").value.split());
document.getElementById("output").value = "Executing " + args.toString().replace(',', ' ');
run (args);
var args;
//document.getElementById("args").value.split(' ').concat();
args = document.getElementById("args").value;
args += ' dat/' + document.getElementById("eg").selectedIndex.toString() + '.dat';
document.getElementById("output").value = "Executing " + args + '\n';
run (args.match(/(".*?"|[^" \s]+)(?=\s* |\s*$)/g));
}
/* set initial */

File diff suppressed because it is too large Load diff

View file

@ -46,9 +46,8 @@
<option value="13">Variadic Arguments</option>
</select>
<textarea id="input" rows="25" cols="100%" disabled="disabled"></textarea>
<br>
<button onclick="compile()">Execute</button>
<textarea id="args">Test</textarea>
<textarea id="args" rows="1" cols="100%"></textarea>
<button onclick="compile()" width="10%">Execute</button>
<h4>Execution Output:</h4>
<textarea id="output" rows="25", cols="100%"></textarea>
</section>

View file

@ -0,0 +1 @@
A test message Yeah

1
testsuite/calls/output Normal file
View file

@ -0,0 +1 @@
632719

View file

@ -0,0 +1,3 @@
ne
lt
le

View file

@ -0,0 +1 @@
bar

View file

@ -0,0 +1,5 @@
Field: void at 0
Field: float globf at 0
Field: vector globv at 1
Field: string globs at 4
Field: function globfunc at 5

3
testsuite/fields1/output Normal file
View file

@ -0,0 +1,3 @@
spot1 = '150 2000 175'
spot2 = '220 1300 -175'
vis: 0

View file

@ -0,0 +1 @@
correct

View file

1
testsuite/if1/output Normal file
View file

@ -0,0 +1 @@
Else

30
testsuite/loops1/output Normal file
View file

@ -0,0 +1,30 @@
for 0
for 1
for 2
for 3
for 4
for 5
for 6
for 7
for 8
for 9
while 0
while 1
while 2
while 3
while 4
while 5
while 6
while 7
while 8
while 9
do 0
do 1
do 2
do 3
do 4
do 5
do 6
do 7
do 8
do 9

8
testsuite/maths1/output Normal file
View file

@ -0,0 +1,8 @@
input: 0 and 0
+ 0
* 0
/ 0
& 0
| 0
&& 0
|| 0

1
testsuite/maths2/output Normal file
View file

@ -0,0 +1 @@
dot = 0

2
testsuite/ngraphs/output Normal file
View file

@ -0,0 +1,2 @@
#^[]|{}~\%>
#^[]|{}~\%>

Binary file not shown.

View file

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: builtins/main.qc (qc)
writing 'obj/builtins.qcc.dat'...

BIN
testsuite/obj/calls.qcc.dat Normal file

Binary file not shown.

View file

@ -0,0 +1 @@
calls/main.qc:1: warning: variadic functions are not available in this standard

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: calls/main.qc (qc)
writing 'obj/calls.qcc.dat'...

Binary file not shown.

View file

@ -0,0 +1 @@
equality/main.qc:1: warning: variadic functions are not available in this standard

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: equality/main.qc (qc)
writing 'obj/equality.qcc.dat'...

Binary file not shown.

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: field-parameters/main.qc (qc)
writing 'obj/field-parameters.qcc.dat'...

Binary file not shown.

View file

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: fielddefs/main.qc (qc)
writing 'obj/fielddefs.gm.dat'...

Binary file not shown.

View file

@ -0,0 +1,2 @@
fields1/main.qc:1: warning: variadic functions are not available in this standard
fields1/main.qc:5: warning: variadic functions are not available in this standard

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: fields1/main.qc (qc)
writing 'obj/fields1.qcc.dat'...

Binary file not shown.

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: functions-as-parameters/main.qc (qc)
writing 'obj/functions-as-parameters.qcc.dat'...

Binary file not shown.

View file

@ -0,0 +1,4 @@
globaldefs/main.qc:1: warning: unused global: `globf`
globaldefs/main.qc:2: warning: unused global: `globv`
globaldefs/main.qc:3: warning: unused global: `globs`
globaldefs/main.qc:4: warning: function `globfunc` has no body and in QC implicitly becomes a function-pointer

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: globaldefs/main.qc (qc)
writing 'obj/globaldefs.gm.dat'...

BIN
testsuite/obj/if1.qcc.dat Normal file

Binary file not shown.

View file

@ -0,0 +1 @@
if1/main.qc:1: warning: variadic functions are not available in this standard

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: if1/main.qc (qc)
writing 'obj/if1.qcc.dat'...

View file

View file

@ -0,0 +1,5 @@
invalid-assign/main.qc:3: error: not an l-value (binop)
Mode: manual
There are 1 items to compile:
item: invalid-assign/main.qc (qc)
failed to generate function main

Binary file not shown.

View file

@ -0,0 +1,2 @@
loops1/main.qc:1: warning: variadic functions are not available in this standard
loops1/main.qc:7: warning: for loops are not recognized in the original Quake C standard, to enable try an alternate standard --std=?

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: loops1/main.qc (qc)
writing 'obj/loops1.qcc.dat'...

Binary file not shown.

View file

@ -0,0 +1 @@
maths1/main.qc:1: warning: variadic functions are not available in this standard

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: maths1/main.qc (qc)
writing 'obj/maths1.qcc.dat'...

Binary file not shown.

View file

@ -0,0 +1 @@
maths2/main.qc:1: warning: variadic functions are not available in this standard

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: maths2/main.qc (qc)
writing 'obj/maths2.qcc.dat'...

Binary file not shown.

View file

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: ngraphs/main.qc (qc)
writing 'obj/ngraphs.qcc.dat'...

Binary file not shown.

View file

@ -0,0 +1 @@
variadic/main.qc:1: warning: variadic functions are not available in this standard

View file

@ -0,0 +1,4 @@
Mode: manual
There are 1 items to compile:
item: variadic/main.qc (qc)
writing 'obj/variadic.qcc.dat'...

View file

@ -0,0 +1 @@
A test message Yeah