comparison parse.rhope @ 5:a4d2d633a356

Groundwork for parsing expressions in new parser
author Mike Pavone <pavone@retrodev.com>
date Wed, 13 May 2009 00:43:12 -0400
parents 0c5f24b4f69d
children 0a4682be2db2
comparison
equal deleted inserted replaced
4:0c5f24b4f69d 5:a4d2d633a356
43 } 43 }
44 44
45 Add Node Output@Worker Node[node,output:out] 45 Add Node Output@Worker Node[node,output:out]
46 { 46 {
47 out <- [node]Outputs <<[[[node]Outputs >>]Append[output]] 47 out <- [node]Outputs <<[[[node]Outputs >>]Append[output]]
48 }
49
50 Blueprint Statement
51 {
52 Expression
53 Assignments
54 Blocks
55 }
56
57 Statement[expression,assignments:out]
58 {
59 out <- [[[Build["Statement"]]Expression <<[expression]]Assignments <<[assignments]]Blocks <<[()]
60 }
61
62 Add Block@Statement[statement,block:out]
63 {
64 out <- [statement]Blocks <<[ [[statement]Blocks >>]Append[block] ]
65 }
66
67 Blueprint Worker Expression
68 {
69 Worker
70 Blueprint
71 Arguments
72 }
73
74 Blueprint Global Expression
75 {
76 Store
77 Variable
78 }
79
80 Blueprint Pipe Expression
81 {
82 Name
83 }
84
85 Pipe Expression[name:out]
86 {
87 out <- [Build["Pipe Expression"]]Name <<[name]
88 }
89
90 Blueprint Block
91 {
92 Tree
93 }
94
95 Block[:out]
96 {
97 out <- [Build["Block"]]Tree <<[()]
98 }
99
100 Blueprint Field Expression
101 {
102 Name
103 Set?
104 }
105
106 Field Expression[name,set?:out]
107 {
108 out <- [[Build["Field Expression"]]Name <<[name]]Set? <<[set?]
48 } 109 }
49 110
50 Body[node,tokens,current,depth:out,out index, done] 111 Body[node,tokens,current,depth:out,out index, done]
51 { 112 {
52 Print[["Body: Depth="]Append[depth]] 113 Print[["Body: Depth="]Append[depth]]