gmqcc/test.html
2012-11-13 05:04:06 +00:00

89 lines
4.2 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>GMQCC by graphitemaster</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
<script src="javascripts/scale.fix.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<a href="https://github.com/graphitemaster/gmqcc"><div class="fork"></div></a>
<div class="wrapper">
<header>
<h1 class="header">GMQCC</h1>
<p class="header">An Improved Quake C Compiler</p>
<ul>
<li class="download"><a href="https://github.com/graphitemaster/gmqcc/zipball/master">Download ZIP</a></li>
<li class="download"><a href="https://github.com/graphitemaster/gmqcc/tarball/master">Download TAR</a></li>
<li class="buttons"><a href="https://github.com/graphitemaster/gmqcc/issues">Issues</a></li>
<li class="Buttons"><a href="test.html">Try it</a></li>
<li class="buttons"><a href="https://github.com/graphitemaster/gmqcc">View On GitHub</a></li>
</ul>
</header>
<section>
<h3>Try it from your browser</h3>
Load Program:
<select id="eg" onchange="update()">
<option selected value="1">Builtins</option>
<option value="2">Calls</option>
<option value="3">Equality</option>
<option value="4">Field Parameters</option>
<option value="5">Field Definitions</option>
<option value="6">Fields</option>
<option value="7">Functions As Paramaters</option>
<option value="8">Global Definitions</option>
<option value="9">If</option>
<option value="10">Loops</option>
<option value="11">Math</option>
<option value="12">Digraphs and Trigraphs</option>
<option value="13">Variadic Arguments</option>
</select>
<textarea id="input" rows="25" cols="100%" disabled="disabled"></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>
<footer>
<!--<script type="text/javascript" src="http://www.ohloh.net/p/602517/widgets/project_partner_badge.js"></script>-->
</footer>
</div>
<script>
var Module = {
preRun: [],
noInitialRun: true,
postRun: [],
print: (function() {
var element = document.getElementById('output');
element.value = ''; // clear browser cache
return function(text) {
// These replacements are necessary if you render to raw HTML
//text = text.replace(/&/g, "&amp;");
//text = text.replace(/</g, "&lt;");
//text = text.replace(/>/g, "&gt;");
//text = text.replace('\n', '<br>', 'g');
element.value += text + "\n";
element.scrollTop = 99999; // focus on bottom
};
})(),
printErr: function(text) {
if (0) { // XXX disabled for safety typeof dump == 'function') {
dump(text + '\n'); // fast, straight to the real console
} else {
console.log(text);
}
}
};
</script>
<script src="javascripts/compiler.js"></script>
<script src="javascripts/vm.js"></script>
<!--[if !IE]><script>fixScale(document);</script><![endif]-->
</body>
</html>