");
statement ();
window.document.write ("");
}
else
window.document.write ("Number of recursive function calls exceedet");
}
function condition () {
boolexpr ();
}
function boolexpr () {
reccountexpr = 0;
numexpr ();
window.document.write ("
< ");
reccountexpr = 0;
numexpr ();
}
function numexpr () {
term ();
numexpr2 ();
}
function numexpr2 () {
reccountexpr++;
if (reccountexpr > reccountexprmax)
return;
if (Math.floor (Math.random ()*2) == 1) {
window.document.write ('+');
term ();
numexpr2 ();
}
}
function term () {
factor ();
term2 ();
}
function term2 () {
reccountexpr++;
if (reccountexpr > reccountexprmax)
return;
if (Math.floor (Math.random ()*2) == 1) {
window.document.write ('*');
factor ();
term2 ();
}
}
function factor () {
if (reccountexpr < reccountexprmax) {
reccountexpr++;
if ((r = Math.floor (Math.random ()*3)) == 0)
window.document.write (Math.floor (Math.random ()*10));
else if (r == 1)
window.document.write (String.fromCharCode(Math.floor (Math.random ()*26) + 65));
else if (r == 2){
window.document.write ('(');
numexpr ();
window.document.write (')');
}
}
else {
if ((r = Math.floor (Math.random ()*2)) == 0)
window.document.write (Math.floor (Math.random ()*10));
else if (r == 1)
window.document.write (String.fromCharCode(Math.floor (Math.random ()*26) + 65));
return;
}
}
var x = document.getElementById ("myscript");
var content = myscript.innerHTML;
content = content.replace ("<", "<");
content = content.replace (">", ">");
content = content.replace(/(?:\r\n|\r|\n)/g, '
');
content = content.replace(/ /g, " ");
window.document.write (content);
program pascgen (input, output);
beginfor X := 8+V*((8*1+(X)))
to L+L+8*U*Z
dowhile U*0
< ((5+4)*(L)*9*E)
doY := Dend