Mercurial > repos > rhope
comparison parser_old.rhope @ 73:6a1a7d5cc2d9
Add some error checking, cleanup output and add a bad test file
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 19 Jun 2010 23:13:41 -0400 |
parents | d0ce696786cc |
children | a844c623c7df |
comparison
equal
deleted
inserted
replaced
72:f7bcf3db1342 | 73:6a1a7d5cc2d9 |
---|---|
1306 } | 1306 } |
1307 } | 1307 } |
1308 | 1308 |
1309 Register Workers Compile[prog, worker, name:out] | 1309 Register Workers Compile[prog, worker, name:out] |
1310 { | 1310 { |
1311 Print[["Registering "]Append[name]] | |
1311 If[[ Type Of[[worker]Trees >>] ] = ["Foreign Lib"]] | 1312 If[[ Type Of[[worker]Trees >>] ] = ["Foreign Lib"]] |
1312 { convention <- Val[[[worker]Trees >>]Language >>] } | 1313 { convention <- Val[[[worker]Trees >>]Language >>] } |
1313 { convention <- "rhope" } | 1314 { convention <- "rhope" } |
1314 out <- [prog]Register Worker[name, convention, [[worker]Inputs >>]Length, [[worker]Outputs >>]Length] | 1315 out <- [prog]Register Worker[name, convention, [[worker]Inputs >>]Length, [[worker]Outputs >>]Length] |
1315 } | 1316 } |
1325 ]Outputs <<[ [worker]Outputs >> ] | 1326 ]Outputs <<[ [worker]Outputs >> ] |
1326 ]Output Types <<[ [worker]Output Types >> ] | 1327 ]Output Types <<[ [worker]Output Types >> ] |
1327 ]Library <<[ [[worker]Trees >>]Name >> ] | 1328 ]Library <<[ [[worker]Trees >>]Name >> ] |
1328 | 1329 |
1329 }{ | 1330 }{ |
1331 Print[["Transforming "]Append[name]] | |
1330 trees, nworker, refs <- Add List to Worker[[worker]Trees >>, [NWorker["rhope"]]Uses[[worker]Uses Stores >>], prog, worker, Dictionary[]] | 1332 trees, nworker, refs <- Add List to Worker[[worker]Trees >>, [NWorker["rhope"]]Uses[[worker]Uses Stores >>], prog, worker, Dictionary[]] |
1331 final nworker <- Fold[[["Add Wires Helper"]Set Input[3, worker]]Set Input[4, refs], nworker, trees] | 1333 final nworker <- Fold[[["Add Wires Helper"]Set Input[3, worker]]Set Input[4, refs], nworker, trees] |
1332 } | 1334 } |
1333 out <- [prog]Bind Worker[name, final nworker] | 1335 out <- [prog]Bind Worker[name, final nworker] |
1334 } | 1336 } |