view testparse.html @ 251:2557ce4e671f

Fix a couple of compiler bugs. topenv was getting initialized in multiple places. This resulted in multiple copies of modules getting created which caused problems for macro expansion. Additionally, arguments were not being marked as declared during code generation so assigning to an argument that was not closed over generated invalid C code.
author Michael Pavone <pavone@retrodev.com>
date Fri, 11 Apr 2014 22:29:32 -0700
parents 668f533e5284
children
line wrap: on
line source

<!DOCTYPE html>
<html style="height: 100%">
<head>
	<title>Parser Test</title>
	<script src="peg.js"></script>
	<script src="mquery.js"></script>
	<script src="parser.js"></script>
	<script src="compiler.js"></script>
	<script src="jsbackend.js"></script>
	<script src="cbackend.js"></script>
	<script src="testparse.js"></script>
</head>
<body style="height: 100%">
	<textarea style="width: 90%; height: 50%; display: block; margin: 0 auto;"></textarea>
	<input id="parse" type="button" value="Parse!" style="width: 90%;display: block; margin: 0 auto;">
	<input id="tojs" type="button" value="To Javascript!" style="width: 90%;display: block; margin: 0 auto;">
	<input id="toc" type="button" value="To C!" style="width: 90%; display: block; margin: 0 auto;">
	<input id="run" type="button" value="Run!" style="width: 90%;display: block; margin: 0 auto;">
	<pre>
	</pre>
</body>
</html>