Mercurial > repos > rhope
diff parser_old.rhope @ 82:2e2e55fc12f9
Fix bug with conditionally assigning a literal or input to a named pipe
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 27 Jul 2010 15:23:32 -0400 |
parents | 4d5ea487f810 |
children | 27bb051d631c |
line wrap: on
line diff
--- a/parser_old.rhope Thu Jul 22 05:39:08 2010 +0000 +++ b/parser_old.rhope Tue Jul 27 15:23:32 2010 -0400 @@ -313,33 +313,16 @@ Add Multi Wire[worker,ref,junk,end index,input num:out] { - Print["Add Multi Wire"] - { Print[[ref]Index >>] - { Print[[ref]Output Number >>] - { Pretty Print[worker, ""] }}} out <- [worker]Add Wire[[ref]Index >>, [ref]Output Number >>, end index, input num] - { Print["Added wire"] } } Add Param Wire[worker,param,input num,end index,blocks,parse worker,assignments:out] { - Print[["Add Param Wire: "]Append[input num]] - { param worker, start index, output num <- [param]Add Wires[worker, blocks, parse worker, assignments] { Print["got param worker"] } { - Print[["got normal output for param: "]Append[input num]] - { - Print[["Start index: "]Append[start index]] - Print[["Output num: "]Append[output num]] - out <- [param worker]Add Wire[start index, output num, end index, input num] - { Print["Added param wire"] } - } }{}{ - Print["got multi output"] out <- Fold[[["Add Multi Wire"]Set Input[3, end index]]Set Input[4, input num], param worker, ~] - { Print["Added multi wire"] } - } } } @@ -409,22 +392,17 @@ Add Wires@Worker Node[node,worker,blocks,parse worker,assignments:worker,index,num,unused] { - Print[["Add Wires@Worker Node: "]Append[[node]Name >>]] - { worker,index,num <- Add Wires Worker or Field[node, worker, blocks, parse worker, assignments] - } } Add Wires Worker or Field[node,worker,blocks,parse worker,assignments:worker,index,num,unused] { Fold[[["Assignments Add Wires"]Set Input[3, parse worker]]Set Input[4, [node]Index >>], worker, [node]Assignments >>] { - Print["Assignments Add Wires done"] Fold[[[[["Add Block Wire"]Set Input[3, [node]Index >>]]Set Input[4, blocks]]Set Input[5, parse worker]]Set Input[6, assignments], ~, [node]Blocks >>] { - Print["Add Block Wire done"] params worker <- Fold[[[[["Add Param Wire"]Set Input[3, [node]Index >>]]Set Input[4, blocks]]Set Input[5, parse worker]]Set Input[6, assignments], ~, [node]Params >>] - { Print["Add Param Wire done"] + { index <- [node]Index >> num <- 0 }