diff parser_old_c.rhope @ 136:fc3815b7462f

Javascript backend now produces working code for some simple examples, still more of the standard lib that needs to be ported.
author Mike Pavone <pavone@retrodev.com>
date Sun, 14 Nov 2010 23:07:55 -0500
parents 04148770c229
children a68e6828d896
line wrap: on
line diff
--- a/parser_old_c.rhope	Sun Nov 14 03:09:49 2010 -0500
+++ b/parser_old_c.rhope	Sun Nov 14 23:07:55 2010 -0500
@@ -31,7 +31,6 @@
 	List End
 	List Delim
 	In Out Delim
-	Do Worker
 	Index Begin
 	Index End
 	Previous
@@ -49,7 +48,7 @@
 
 Parser[:out]
 {
-	out <- [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[Build[Parser()]
+	out <- [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[Build[Parser()]
 	]Arg Begin << ["["]
 	]Arg End <<["]"]
 	]Line Comment <<["//"]
@@ -68,7 +67,6 @@
 	]List End <<[")"]
 	]List Delim <<[","]
 	]In Out Delim <<[":"]
-	]Do Worker <<["$"]
 	]Index Begin <<["("]
 	]Index End <<[")"]
 	]Previous <<["@"]
@@ -138,7 +136,7 @@
 {
 	out <- [[[[Build[Parse Program()]
 	]Workers <<[Dictionary[]]
-	]Imports <<[[Dictionary[]]Set["kernel.rhope", Yes]]
+	]Imports <<[Dictionary[]]
 	]Blueprints <<[Dictionary[]]
 	]Errors <<[()]
 }
@@ -1483,9 +1481,9 @@
 	out <- [prog]Bind Blueprint[[def]Name >>, Fold[Add Blueprint Field[?], NBlueprint[], [def]Fields >>]]
 }
 
-Tree to Program Native[parse tree:out]
+Tree to Program Native[parse tree,number types:out]
 {
-	registered <- Fold[Register Workers Compile[?], [Fold[Add Blueprint Compile[?], NProgram[], [parse tree]Blueprints >>]]Register Builtins, [parse tree]Workers >>]
+	registered <- Fold[Register Workers Compile[?], [Fold[Add Blueprint Compile[?], [NProgram[]]Numtypes <<[number types], [parse tree]Blueprints >>]]Register Builtins, [parse tree]Workers >>]
 	out <- Fold[Add Workers Compile[?], registered, [parse tree]Workers >>]
 	{ Print["Transformed AST to dataflow graph "] }
 }