diff parser_old.rhope @ 83:27bb051d631c

Initial implementation of Dictionary
author Mike Pavone <pavone@retrodev.com>
date Tue, 27 Jul 2010 23:33:31 -0400
parents 2e2e55fc12f9
children e09c2d1d6d5b
line wrap: on
line diff
--- a/parser_old.rhope	Tue Jul 27 15:23:32 2010 -0400
+++ b/parser_old.rhope	Tue Jul 27 23:33:31 2010 -0400
@@ -318,7 +318,7 @@
 
 Add Param Wire[worker,param,input num,end index,blocks,parse worker,assignments:out]
 {
-	param worker, start index, output num <- [param]Add Wires[worker, blocks, parse worker, assignments] { Print["got param worker"] }
+	param worker, start index, output num <- [param]Add Wires[worker, blocks, parse worker, assignments] {}
 	{
 		out <- [param worker]Add Wire[start index, output num, end index, input num]
 	}{}{
@@ -634,11 +634,7 @@
 
 Add Wires@Literal Node[node,worker,blocks,parse worker,assignments:worker,index,num,unused]
 {
-	Print[["Add Wires@Literal Node, Literal Type: "]Append[Type Of[[node]Value >>]]]
 	worker,index,num <- Add Wires Literal or Global[node, worker, blocks, parse worker, assignments]
-	{ Print["Got worker"] }
-	{ Print["got index"] }
-	{ Print["got num"] }
 }
 
 Check Worker Literals@Literal Node[node,program:out]
@@ -1414,7 +1410,7 @@
 
 Register Workers Compile[prog, worker, name:out]
 {
-	Print[["Registering "]Append[name]]
+	//Print[["Registering "]Append[name]]
 	If[[ Type Of[[worker]Trees >>] ] = ["Foreign Lib"]]
 	{ convention <- Val[[[worker]Trees >>]Language >>] }
 	{ convention <- "rhope" }
@@ -1423,6 +1419,7 @@
 
 Add Workers Compile[prog, worker, name:out]
 {
+	Print[["Transforming "]Append[name]]
 		If[[Type Of[[worker]Trees >>]] = ["Foreign Lib"]]
 		{
 			//TODO: Handle foreign func
@@ -1434,20 +1431,9 @@
 			]Library <<[ [[worker]Trees >>]Name >> ]
 			
 		}{
-			Print[["Transforming "]Append[name]]
 			trees, nworker, refs <- Add List to Worker[[worker]Trees >>, [[NWorker["rhope"]]Uses[[worker]Uses Stores >>]]Outputs <<[ [worker]Outputs >> ], prog, worker, Dictionary[]]
 			{
-				,proceed <- If[[name] = ["Main"]]
-				{ Print["Added Trees to worker"]
-				{ proceed <- Pretty Print[trees, ""] }}
-				Val[proceed]
-				{
 				final nworker <- Fold[[["Add Wires Helper"]Set Input[3, worker]]Set Input[4, refs], nworker, trees]
-				{
-					If[[name] = ["Main"]]
-					{ Print["Added wires to worker"] }
-				}
-				}
 			}
 			
 		}