Mercurial > repos > rhope
annotate parser_old.rhope @ 25:9749109b3198
Fixed spelling error in parser error message.
author | William Morgan <wbm25+rhopehg@drexel.edu> |
---|---|
date | Thu, 25 Jun 2009 02:15:36 +0000 |
parents | 8b2b3f4a2a58 |
children | 914ad38f9b59 |
rev | line source |
---|---|
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 Import extendlib.rhope |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 Blueprint Parser |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 Arg Begin |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 Arg End |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 Line Comment |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 Comment Begin |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 Comment End |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 Assign |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 Block Begin |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 Block End |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
15 Blueprint Type Delim |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 Empty Block |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
17 Binary Operator |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
18 String Begin |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
19 String End |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
20 String Escape |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
21 List Begin |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
22 List End |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
23 List Delim |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
24 In Out Delim |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
25 Do Worker |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
26 Index Begin |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
27 Index End |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
28 Previous |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
29 Block Val |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
30 Set Field |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
31 Get Field |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
32 Import |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
33 Blueprint |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
34 Global Separator |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
35 Uses |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
36 Hex Escape |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
37 Escape Map |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
38 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
39 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
40 New@Parser[:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
41 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
42 out <- [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[Build["Parser"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
43 ]Arg Begin << ["["] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
44 ]Arg End <<["]"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
45 ]Line Comment <<["//"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
46 ]Comment Begin <<["/*"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
47 ]Comment End <<["*/"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
48 ]Assign <<["<-"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
49 ]Block Begin <<["{"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
50 ]Block End <<["}"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
51 ]Blueprint Type Delim <<[":"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
52 ]Empty Block <<[";"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
53 ]Binary Operator <<["`"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
54 ]String Begin <<["\""] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
55 ]String End <<["\""] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
56 ]String Escape <<["\\"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
57 ]List Begin <<["("] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
58 ]List End <<[")"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
59 ]List Delim <<[","] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
60 ]In Out Delim <<[":"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
61 ]Do Worker <<["$"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
62 ]Index Begin <<["("] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
63 ]Index End <<[")"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
64 ]Previous <<["@"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
65 ]Set Field <<["<<"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
66 ]Get Field <<[">>"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
67 ]Import <<["Import"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
68 ]Blueprint <<["Blueprint"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
69 ]Global Separator <<["::"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
70 ]Hex Escape <<["x"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
71 ]Uses <<["uses"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
72 ]Escape Map <<[[[[New@Dictionary[]]Set["n","\n"]]Set["r","\r"]]Set["t","\t"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
73 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
74 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
75 Blueprint Output Reference |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
76 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
77 Index |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
78 Output Number |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
79 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
80 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
81 New@Output Reference[index,num:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
82 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
83 out <- [[Build["Output Reference"]]Index <<[index]]Output Number <<[num] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
84 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
85 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
86 Add Pipe Reference[refs,name,reference:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
87 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
88 reflist <- [refs]Index[name] {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
89 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
90 reflist <- New@List[] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
91 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
92 out <- [refs]Set[name, [reflist]Append[reference]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
93 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
94 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
95 Assignment Save Reference[refs,assignment,output num,parse worker,index:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
96 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
97 [[parse worker]Outputs >>]Find[assignment] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
98 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
99 out <- refs |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
100 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
101 out <- Add Pipe Reference[refs, assignment, New@Output Reference[index, output num]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
102 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
103 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
104 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
105 Blueprint Parse Program |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
106 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
107 Workers |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
108 Imports |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
109 Blueprints |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
110 Errors |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
111 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
112 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
113 New@Parse Program[:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
114 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
115 out <- [[[Build["Parse Program"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
116 ]Workers <<[New@Dictionary[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
117 ]Imports <<[New@Dictionary[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
118 ]Blueprints <<[New@Dictionary[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
119 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
120 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
121 Blueprint Blueprint Definition |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
122 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
123 Name |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
124 Fields |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
125 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
126 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
127 New@Blueprint Definition[name,fields:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
128 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
129 out <- [[Build["Blueprint Definition"]]Name << [name]]Fields <<[fields] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
130 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
131 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
132 Blueprint Parse Worker |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
133 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
134 Name |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
135 Inputs |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
136 Outputs |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
137 Line Number |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
138 Trees |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
139 Uses Stores |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
140 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
141 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
142 New@Parse Worker[name,inputs,outputs,line:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
143 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
144 out <- [[[[[[Build["Parse Worker"]]Name <<[name]]Inputs <<[inputs]]Outputs <<[outputs]]Line Number <<[line]]Trees <<[New@List[]]]Uses Stores <<[New@List[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
145 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
146 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
147 Blueprint Worker Node |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
148 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
149 Name |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
150 Params |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
151 Assignments |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
152 Blocks |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
153 Index |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
154 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
155 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
156 New@Worker Node[name,params:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
157 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
158 out <- [[[[Build["Worker Node"]]Name <<[name]]Params <<[params]]Assignments <<[New@List[]]]Blocks <<[New@List[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
159 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
160 |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
161 Add List Helper[inlist,worker,program,key,parse worker,refs:out,worker,refs] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
162 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
163 Print[Type Of[inlist]] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
164 Print["Add List Helper"] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
165 ,nextworker,nextrefs <- [[inlist]Index[key]]Add to Worker[worker, program, parse worker, refs] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
166 { nextlist <- [inlist]Set[key, ~] } |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
167 [inlist]Next[key] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
168 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
169 Print["Next!"] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
170 list,worker,refs <- Add List Helper[nextlist, nextworker, program, ~, parse worker, nextrefs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
171 }{ |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
172 Print["Done!"] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
173 list <- Val[nextlist] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
174 worker <- Val[nextworker] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
175 refs <- Val[nextrefs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
176 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
177 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
178 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
179 Add List to Worker[list,worker,program,parse worker,refs:list,worker,refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
180 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
181 Print["Add List to Worker"] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
182 Print[Type Of[list]] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
183 { |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
184 [list]First |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
185 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
186 list,worker,refs <- Add List Helper[list, worker, program, ~, parse worker, refs] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
187 { Print["Done!!"] } |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
188 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
189 list <- list |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
190 worker <- worker |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
191 refs <- refs |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
192 } |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
193 } |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
194 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
195 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
196 _Add Blocks to Worker[blocks,worker,program,parse worker,key,refs:blocks,worker,refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
197 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
198 block, next worker, nextrefs <- Add List to Worker[[blocks]Index[key], worker, program, parse worker, refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
199 next blocks <- [blocks]Set[key, block] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
200 [blocks]Next[key] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
201 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
202 blocks,worker,refs <- _Add Blocks to Worker[next blocks, next worker, program, parse worker, ~, nextrefs] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
203 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
204 blocks <- Val[next blocks] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
205 worker <- Val[next worker] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
206 refs <- Val[nextrefs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
207 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
208 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
209 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
210 Add Blocks to Worker[blocks,worker,program,parse worker,refs:blocks,worker,refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
211 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
212 [blocks]First |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
213 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
214 blocks, worker, refs <- _Add Blocks to Worker[blocks, worker, program, parse worker, ~, refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
215 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
216 blocks <- blocks |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
217 worker <- worker |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
218 refs <- refs |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
219 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
220 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
221 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
222 Add to Worker@Worker Node[node,worker,program,parse worker,refs:node,worker,refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
223 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
224 [program]Find Worker[[node]Name >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
225 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
226 after worker <- [worker]Add Worker Call[~] {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
227 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
228 assignment refs <- Fold[[["Assignment Save Reference"]Set Input[3, parse worker]]Set Input[4, ~], refs, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
229 [node]Index <<[~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
230 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
231 params list, params worker, params refs <- Add List to Worker[[~]Params >>, after worker, program, parse worker, assignment refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
232 block list, worker, refs <- Add Blocks to Worker[[~]Blocks >>, params worker, program, parse worker, params refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
233 node <- [[~]Params <<[params list]]Blocks <<[block list] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
234 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
235 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
236 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
237 Print[["Error: Could not find a worker named "]Append[[node]Name >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
238 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
239 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
240 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
241 Add Multi Wire[worker,ref,junk,end index,input num:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
242 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
243 out <- [worker]Add Wire[[ref]Index >>, [ref]Output Number >>, end index, input num] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
244 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
245 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
246 Add Param Wire[worker,param,input num,end index,blocks,parse worker,assignments:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
247 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
248 param worker, start index, output num <- [param]Add Wires[worker, blocks, parse worker, assignments] {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
249 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
250 out <- [param worker]Add Wire[start index, output num, end index, input num] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
251 }{}{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
252 out <- Fold[[["Add Multi Wire"]Set Input[3, end index]]Set Input[4, input num], param worker, ~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
253 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
254 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
255 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
256 _Add Block Wire[worker,node,junk,blocks,parse worker,assignments:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
257 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
258 out <- [node]Add Wires[worker, blocks, parse worker, assignments] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
259 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
260 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
261 Add Block Wire[worker,block nodes,output num,parent index,existing blocks,parse worker,assignments:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
262 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
263 blocks <- [existing blocks]Append[New@Output Reference[parent index, output num]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
264 out <- Fold[[[["_Add Block Wire"]Set Input[3, blocks]]Set Input[4, parse worker]]Set Input[5, assignments], worker, block nodes] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
265 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
266 |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
267 Assignments Add Wires[worker,assignment,output num,parse worker,start index:worker] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
268 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
269 [[parse worker]Outputs >>]Find[assignment] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
270 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
271 ,output index <- [worker]Add Output[assignment, ~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
272 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
273 worker <- [~]Add Wire[start index, output num, output index, 0] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
274 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
275 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
276 //Ugly hack alert! |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
277 If[[assignment]Contains["::"]] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
278 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
279 parts <- [assignment]Split["::"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
280 ,global index <- [worker]Add Global Set[[parts]Index[0], [parts]Index[1]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
281 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
282 worker <- [~]Add Wire[start index, output num, global index, 0] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
283 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
284 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
285 worker <- worker |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
286 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
287 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
288 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
289 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
290 Has Block@Worker Node[junk:out,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
291 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
292 out <- Yes |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
293 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
294 |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
295 _Has Block Params[param list,key:out] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
296 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
297 param <- [param list]Index[key] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
298 out <- [param]Has Block {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
299 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
300 [param list]Next[key] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
301 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
302 out <- _Has Block Params[param list, ~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
303 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
304 out <- No |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
305 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
306 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
307 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
308 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
309 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
310 Has Block Params[param list:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
311 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
312 [param list]First |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
313 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
314 out <- _Has Block Params[param list, ~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
315 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
316 out <- No |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
317 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
318 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
319 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
320 Add Wires@Worker Node[node,worker,blocks,parse worker,assignments:worker,index,num,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
321 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
322 worker,index,num <- Add Wires Worker or Field[node, worker, blocks, parse worker, assignments] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
323 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
324 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
325 Add Wires Worker or Field[node,worker,blocks,parse worker,assignments:worker,index,num,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
326 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
327 Fold[[["Assignments Add Wires"]Set Input[3, parse worker]]Set Input[4, [node]Index >>], worker, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
328 { Fold[[[[["Add Block Wire"]Set Input[3, [node]Index >>]]Set Input[4, blocks]]Set Input[5, parse worker]]Set Input[6, assignments], ~, [node]Blocks >>] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
329 { 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 >>] }} |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
330 If[Has Block Params[[node]Params >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
331 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
332 worker <- Val[params worker] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
333 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
334 [blocks]Peek |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
335 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
336 worker <- [params worker]Add Wire[[~]Index >>, [~]Output Number >>, [node]Index >>, [0]-[1]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
337 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
338 worker <- Val[params worker] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
339 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
340 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
341 index <- [node]Index >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
342 num <- 0 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
343 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
344 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
345 Blueprint Field Node |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
346 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
347 Name |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
348 Params |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
349 Assignments |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
350 Blocks |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
351 Index |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
352 Set? |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
353 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
354 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
355 Has Block@Field Node[junk:has block,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
356 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
357 has block <- Yes |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
358 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
359 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
360 New@Field Node[name,params,set:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
361 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
362 out <- [[[[[Build["Field Node"]]Name <<[name]]Assignments <<[New@List[]]]Blocks <<[New@List[]]]Set? <<[set]]Params <<[params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
363 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
364 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
365 Add to Worker@Field Node[node,worker,program,parse worker,refs:node,worker,refs,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
366 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
367 If[[node]Set? >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
368 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
369 after worker,index <- [worker]Add Object Set[[node]Name >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
370 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
371 after worker,index <- [worker]Add Object Get[[node]Name >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
372 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
373 index |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
374 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
375 assignment refs <- Fold[[["Assignment Save Reference"]Set Input[3, parse worker]]Set Input[4, ~], refs, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
376 [node]Index <<[~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
377 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
378 params list, params worker, params refs <- Add List to Worker[[~]Params >>, after worker, program, parse worker, assignment refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
379 block list, worker, refs <- Add Blocks to Worker[[~]Blocks >>, params worker, program, parse worker, params refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
380 node <- [[~]Params <<[params list]]Blocks <<[block list] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
381 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
382 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
383 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
384 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
385 Add Wires@Field Node[node,worker,blocks,parse worker,assignments:worker,index,num] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
386 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
387 worker,index,num <- Add Wires Worker or Field[node, worker, blocks, parse worker, assignments] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
388 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
389 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
390 Blueprint Named Pipe Node |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
391 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
392 Name |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
393 Assignments |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
394 Blocks |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
395 Index |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
396 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
397 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
398 Has Block@Named Pipe Node[node:has block,no block] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
399 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
400 If[[[node]Index >>] < [0]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
401 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
402 //~ should really be a parser parameter |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
403 If[[[node]Name >>] = ["~"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
404 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
405 has block <- Yes |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
406 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
407 no block <- No |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
408 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
409 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
410 has block <- Yes |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
411 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
412 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
413 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
414 New@Named Pipe Node[name:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
415 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
416 out <- [[[Build["Named Pipe Node"]]Name <<[name]]Assignments <<[New@List[]]]Blocks <<[New@List[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
417 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
418 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
419 Add to Worker@Named Pipe Node[node,worker,program,parse worker,refs:node,worker,refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
420 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
421 [[parse worker]Inputs >>]Find[[node]Name >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
422 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
423 after add <- [worker]Add Input[[node]Name >>, ~] {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
424 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
425 assign refs <- Fold[[["Assignment Save Reference"]Set Input[3, parse worker]]Set Input[4, ~], refs, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
426 index node <- [node]Index <<[~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
427 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
428 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
429 after add <- worker |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
430 index node <- [node]Index <<[[0]-[1]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
431 //TODO: Handle assignments from a named pipe that isn't an input |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
432 assign refs <- refs |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
433 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
434 block list, worker, refs <- Add Blocks to Worker[[node]Blocks >>, after add, program, parse worker, assign refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
435 node <- [index node]Blocks <<[block list] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
436 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
437 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
438 Add Wires@Named Pipe Node[node,worker,blocks,parse worker,assignments:worker,index,num,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
439 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
440 reflist <- [assignments]Index[[node]Name >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
441 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
442 //TODO: Fix support for a named pipe with a block |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
443 worker <- worker |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
444 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
445 If[[[node]Name >>] = ["~"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
446 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
447 wires worker <- worker |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
448 [blocks]Peek |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
449 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
450 my index <- [~]Index >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
451 num <- [~]Output Number >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
452 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
453 //TODO: Propagate an error rather than printing it out |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
454 Print["Error, block reference symbol located outside of a block"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
455 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
456 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
457 If[[[node]Index >>] < [0]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
458 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
459 Print[[[["Error, reference to named pipe "]Append[[node]Name >>]]Append[" that was never assigned to in worker "]]Append[[parse worker]Name >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
460 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
461 my index <- [node]Index >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
462 num <- 0 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
463 assignments worker <- Fold[[["Assignments Add Wires"]Set Input[3, parse worker]]Set Input[4, [node]Index >>], worker, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
464 [blocks]Peek |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
465 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
466 wires worker <- [assignments worker]Add Wire[[~]Index >>, [~]Output Number >>, [node]Index >>, [0]-[1]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
467 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
468 wires worker <- Val[assignments worker] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
469 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
470 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
471 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
472 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
473 index <- my index |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
474 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
475 worker <- Fold[[[[["Add Block Wire"]Set Input[3, my index]]Set Input[4, blocks]]Set Input[5, parse worker]]Set Input[6, assignments], wires worker, [node]Blocks >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
476 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
477 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
478 Blueprint Global Node |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
479 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
480 Store |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
481 Name |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
482 Assignments |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
483 Blocks |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
484 Index |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
485 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
486 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
487 New@Global Node[store,name:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
488 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
489 out <- [[[[Build["Global Node"]]Store <<[store]]Name <<[name]]Assignments <<[New@List[]]]Blocks <<[New@List[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
490 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
491 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
492 Add to Worker@Global Node[node,worker,unused,parse worker,refs:out node,out worker,refs] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
493 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
494 out worker <- [worker]Add Global Get[[node]Store >>, [node]Name >>] {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
495 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
496 refs <- Fold[[["Assignment Save Reference"]Set Input[3, parse worker]]Set Input[4, ~], refs, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
497 out node <- [node]Index <<[~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
498 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
499 refs <- refs |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
500 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
501 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
502 Add Wires@Global Node[node,worker,blocks,parse worker,assignments:worker,index,num,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
503 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
504 worker,index,num <- Add Wires Literal or Global[node, worker, blocks, parse worker, assignments] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
505 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
506 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
507 Has Block@Global Node[junk:out,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
508 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
509 out <- Yes |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
510 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
511 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
512 Blueprint Literal Node |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
513 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
514 Value |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
515 Assignments |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
516 Blocks |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
517 Index |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
518 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
519 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
520 Has Block@Literal Node[junk:out,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
521 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
522 out <- Yes |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
523 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
524 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
525 New@Literal Node[value:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
526 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
527 out <- [[[Build["Literal Node"]]Value <<[value]]Assignments <<[New@List[]]]Blocks <<[New@List[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
528 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
529 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
530 Add to Worker@Literal Node[node,worker,unused,parse worker,refs:out node,out worker,refs,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
531 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
532 out worker <- [worker]Add Constant[[node]Value >>] {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
533 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
534 refs <- Fold[[["Assignment Save Reference"]Set Input[3, parse worker]]Set Input[4, ~], refs, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
535 out node <- [node]Index <<[~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
536 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
537 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
538 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
539 Add Wires@Literal Node[node,worker,blocks,parse worker,assignments:worker,index,num,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
540 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
541 worker,index,num <- Add Wires Literal or Global[node, worker, blocks, parse worker, assignments] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
542 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
543 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
544 Add Wires Literal or Global[node,worker,blocks,parse worker,junk:worker,index,num,unused] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
545 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
546 assignments worker <- Fold[[["Assignments Add Wires"]Set Input[3, parse worker]]Set Input[4, [node]Index >>], worker, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
547 [blocks]Peek |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
548 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
549 worker <- [assignments worker]Add Wire[[~]Index >>, [~]Output Number>>, [node]Index >>, [0]-[1]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
550 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
551 worker <- Val[assignments worker] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
552 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
553 index <- [node]Index >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
554 num <- 0 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
555 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
556 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
557 Blueprint Block Node |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
558 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
559 Number |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
560 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
561 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
562 Blueprint Parse Error |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
563 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
564 Type |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
565 Text |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
566 Line Number |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
567 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
568 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
569 New@Parse Error[type,text,number:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
570 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
571 out <- [[[Build["Parse Error"]]Type <<[type]]Text <<[text]]Line Number <<[number] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
572 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
573 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
574 Filter Empty[string:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
575 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
576 If[[[string]Length] > [0]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
577 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
578 out <- Yes |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
579 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
580 out <- No |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
581 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
582 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
583 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
584 Blueprint Blueprint Field |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
585 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
586 Name |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
587 Type |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
588 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
589 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
590 New@Blueprint Field[name,type:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
591 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
592 out <- [[Build["Blueprint Field"]]Name <<[name]]Type <<[type] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
593 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
594 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
595 Process Blueprint Field[list,field,delim:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
596 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
597 parts <- [field]Split[delim] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
598 If[[[parts]Length] > [1]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
599 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
600 out <- [list]Append[New@Blueprint Field[[parts]Index[1], [parts]Index[0]]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
601 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
602 out <- [list]Append[New@Blueprint Field[[parts]Index[0], "Any Type"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
603 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
604 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
605 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
606 Block Comment[string,begin comment,end comment,block count:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
607 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
608 If[[block count] > [0]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
609 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
610 after, before <- [string]Get DString[[[New@List[]]Append[begin comment]]Append[end comment]] {} {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
611 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
612 If[[~] = [begin comment]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
613 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
614 out <- Block Comment[after, begin comment, end comment, [block count]+[1]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
615 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
616 out <- Block Comment[after, begin comment, end comment, [block count]-[1]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
617 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
618 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
619 //No match |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
620 out <- "" |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
621 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
622 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
623 out <- string |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
624 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
625 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
626 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
627 Line Comment[string:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
628 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
629 [string]Get DString["\n"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
630 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
631 out <- ["\n"]Append[~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
632 } {} {} { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
633 out <- "" |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
634 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
635 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
636 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
637 _Get Comment DString[string,delims,line comment,begin comment,end comment,prev before:rest,before,delim,nomatch] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
638 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
639 after,befored,used delim,nomatch <- [string]Get DString[delims] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
640 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
641 If[[used delim] = [line comment]] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
642 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
643 after comment <- Line Comment[after] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
644 }{ |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
645 If[[used delim] = [begin comment]] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
646 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
647 after comment <- Block Comment[after, begin comment, end comment, 1] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
648 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
649 rest <- Val[after] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
650 before <- [prev before]Append[befored] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
651 delim <- Val[used delim] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
652 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
653 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
654 } {} {} { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
655 before <- [prev before]Append[befored] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
656 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
657 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
658 after comment |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
659 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
660 rest,more before,delim,nomatch <- _Get Comment DString[~, delims, line comment, begin comment, end comment, prev before] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
661 before <- [before]Append[more before] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
662 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
663 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
664 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
665 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
666 Get Comment DString[string,delims,params:rest,before,delim,not found] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
667 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
668 line comment <- [params]Line Comment >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
669 begin comment <- [params]Comment Begin >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
670 end comment <- [params]Comment End >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
671 all delims <- [[[delims]As List]Append[begin comment]]Append[line comment] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
672 rest, before, delim, not found <- _Get Comment DString[string, delims, line comment, begin comment, end comment, ""] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
673 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
674 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
675 Comment Left Trim[string,trim chars,params:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
676 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
677 line comment <- [params]Line Comment >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
678 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
679 end comment <- [params]Comment End >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
680 trimmed <- Left Trim[string, trim chars] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
681 If[[trimmed]Starts With[line comment]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
682 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
683 ,after delim <- [trimmed]Slice[[line comment]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
684 out <- Comment Left Trim[Line Comment[after delim], trim chars, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
685 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
686 begin comment <- [params]Comment Begin >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
687 If[[trimmed]Starts With[begin comment]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
688 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
689 ,after delim <- [trimmed]Slice[[line comment]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
690 out <- Comment Left Trim[Block Comment[after delim, begin comment, end comment, 1], trim chars, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
691 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
692 out <- Val[trimmed] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
693 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
694 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
695 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
696 |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
697 PBlueprint[string,params,tree,lines:out] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
698 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
699 ,whitespace name <- [string]Get Comment DString[[params]Block Begin >>, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
700 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
701 ,no blueprint <- [whitespace name]Slice[ [[params]Blueprint >>]Length ] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
702 name <- Trim[no blueprint, "\r\n\t "] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
703 name lines <- 0 |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
704 ,body <- [~]Get Comment DString[ [params]Block End >>, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
705 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
706 body lines <- [body]Split["\n"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
707 more lines <- [[[body lines]Length] - [1]] + [name lines] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
708 fields <- Fold[["Process Blueprint Field"]Set Input[2, [params]Blueprint Type Delim >>], New@List[], Filter[Map[body lines, ["Trim"]Set Input[1,"\n\r\t "]], "Filter Empty"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
709 new tree <- [tree]Blueprints << [ [[tree]Blueprints >>]Set[name, New@Blueprint Definition[name, fields]] ] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
710 out <- Null[~, params, new tree, [lines] + [more lines]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
711 } {} { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
712 out <- [tree]Errors <<[ [[tree]Errors >>]Append[New@Parse Error["Error",[["Blueprint is missing an block close symbol \""]Append[[params]Block End >>]]Append["\""], lines]] ] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
713 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
714 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
715 } {} { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
716 out <- [tree]Errors <<[ [[tree]Errors >>]Append[New@Parse Error["Error",[["Blueprint is missing an block open symbol \""]Append[[params]Block Begin >>]]Append["\""], lines]] ] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
717 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
718 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
719 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
720 Parse Import[string,params,tree,lines:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
721 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
722 [line]Slice[ [[params]Import >>]Length ] {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
723 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
724 filename <- Trim[~, " \n\r\t"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
725 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
726 new tree <- [tree]Imports <<[ [[tree]Imports >>]Set[filename, Yes] ] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
727 ,line <- [string]Get Comment DString["\n", params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
728 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
729 out <- Null[~, params, new tree, [lines] + [1]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
730 } {} { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
731 out <- Val[new tree] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
732 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
733 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
734 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
735 Get Expression Blocks[string,params,blocks:blocks,after] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
736 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
737 check block <- Comment Left Trim[string, "\n\r\t ", params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
738 If[[check block]Starts With[[params]Block Begin >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
739 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
740 ,begin block <- [check block]Slice[[[params]Block Begin >>]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
741 trees, after block <- Worker Body[begin block, params, New@List[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
742 blocks, after <- Get Expression Blocks[after block, params, [blocks]Append[trees]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
743 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
744 If[[check block]Starts With[[params]Empty Block >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
745 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
746 blocks <- blocks |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
747 ,after <- [check block]Slice[[[params]Empty Block >>]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
748 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
749 blocks <- blocks |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
750 after <- Val[check block] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
751 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
752 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
753 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
754 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
755 Parse Escape[string,params:char,after] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
756 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
757 code,rest <- [string]Slice[1] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
758 If[[code] = [[params]Hex Escape >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
759 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
760 hex,after <- [rest]Slice[2] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
761 char <- [""]Put Byte[From Hex@Whole Number[hex]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
762 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
763 after <- Val[rest] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
764 char <- [[params]Escape Map >>]Index[code] {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
765 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
766 char <- Val[code] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
767 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
768 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
769 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
770 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
771 Parse String[string,params,current:value,after] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
772 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
773 delims <- [[New@List[]]Append[[params]String End >>]]Append[[params]String Escape >>] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
774 afters, before, delim <- [string]Get Comment DString[delims, params] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
775 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
776 If[[delim] = [[params]String End >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
777 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
778 value <- [current]Append[before] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
779 after <- Val[afters] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
780 }{ |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
781 char,after escape <- Parse Escape[afters, params] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
782 value,after <- Parse String[after escape, params, [[current]Append[before]]Append[char]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
783 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
784 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
785 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
786 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
787 Parse List[string,params,list:value,after] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
788 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
789 trimmed <- Comment Left Trim[string, "\r\n\t ", params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
790 If[[trimmed]Starts With[[params]List End >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
791 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
792 value <- list |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
793 ,after <- [trimmed]Slice[[[params]List End >>]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
794 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
795 If[[trimmed]Starts With[[params]List Delim >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
796 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
797 ,el string <- [trimmed]Slice[[[params]List Delim >>]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
798 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
799 el string <- Val[trimmed] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
800 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
801 element,after el <- Named Pipe or Literal[el string, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
802 value,after <- Parse List[after el, params, [list]Append[[element]Get Value]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
803 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
804 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
805 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
806 Get Value@Literal Node[node:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
807 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
808 out <- [node]Value >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
809 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
810 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
811 Get Value@Named Pipe Node[node:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
812 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
813 out <- node |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
814 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
815 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
816 Parse Number[string,params:value,after] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
817 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
818 delims <- [[[[(" ","\t","\n","\r")]Append[[params]List Delim >>]]Append[[params]Block Begin >>]]Append[[params]Arg End >>]]Append[[params]List End >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
819 after delim,valstring <- [string]Get Comment DString[delims, params] {} {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
820 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
821 after <- [~]Append[after delim] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
822 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
823 after <- "" |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
824 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
825 first two,rest <- [valstring]Slice[2] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
826 If[[first two] = ["0x"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
827 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
828 value <- From Hex@Whole Number[rest] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
829 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
830 If[[valstring]Contains["."]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
831 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
832 value <- <String@Real Number[valstring] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
833 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
834 value <- <String@Whole Number[valstring] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
835 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
836 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
837 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
838 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
839 Named Pipe or Literal[string,params:out,after] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
840 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
841 name <- Comment Left Trim[string, "\n\r\t ", params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
842 If[[name]Starts With[[params]String Begin >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
843 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
844 ,string begin <- [name]Slice[[[params]String Begin >>]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
845 value,after <- Parse String[string begin, params, ""] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
846 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
847 If[[name]Starts With[[params]List Begin >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
848 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
849 ,list start <- [name]Slice[[[params]List Begin >>]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
850 value,after <- Parse List[list start, params, New@List[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
851 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
852 If[[[name]Slice[1]]In["-0123456789"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
853 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
854 value,after <- Parse Number[name, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
855 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
856 delims <- [[[[[[("\n")]Append[[params]Block Begin >>]]Append[[params]Block End >>]]Append[[params]Empty Block >>]]Append[[params]Arg End >>]]Append[[params]List Delim >>]]Append[[params]List End >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
857 afterdelim,raw before,delim <- [name]Get Comment DString[delims, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
858 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
859 after <- [delim]Append[~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
860 } {} {} { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
861 after <- "" |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
862 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
863 before <- Trim[raw before, "\r\n\t "] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
864 If[[before] = ["Yes"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
865 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
866 yesno <- Yes |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
867 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
868 If[[before] = ["No"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
869 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
870 yesno <- No |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
871 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
872 If[[before] = [""]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
873 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
874 Print[[["Found "]Append[delim]]Append[" where a named pipe or literal was expected"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
875 { Print[["Near: "]Append[ [afterdelim]Slice[40]]] } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
876 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
877 If[[before]Contains[[params]Global Separator >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
878 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
879 parts <- [before]Split[[params]Global Separator >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
880 out <- New@Global Node[Right Trim[[parts]Index[0],"\r\n\t "], Trim[[parts]Index[1], "\r\n\t "]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
881 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
882 out <- New@Named Pipe Node[Right Trim[before,"\r\n\t "]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
883 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
884 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
885 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
886 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
887 out <- New@Literal Node[yesno] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
888 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
889 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
890 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
891 out <- New@Literal Node[value] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
892 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
893 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
894 Parse Arguments[string,params,arglist:args,after] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
895 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
896 targs <- Comment Left Trim[string, "\r\n\t ", params] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
897 If[[targs]Starts With[[params]List Delim >>]] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
898 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
899 [targs]Slice[[[params]List Delim >>]Length] {} |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
900 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
901 final args <- Comment Left Trim[~, "\r\n\t ", params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
902 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
903 }{ |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
904 If[[targs]Starts With[[params]Arg End >>]] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
905 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
906 args <- arglist |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
907 ,after <- [targs]Slice[[[params]Arg End >>]Length] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
908 }{ |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
909 final args <- Val[targs] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
910 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
911 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
912 arg, after arg <- Parse Expression[final args, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
913 args, after <- Parse Arguments[after arg, params, [arglist]Append[arg]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
914 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
915 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
916 Worker or Field[name,args,params:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
917 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
918 get field <- [params]Get Field >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
919 If[[name]Ends With[get field]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
920 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
921 field <- Right Trim[[name]Slice[[[name]Length] - [[get field]Length]], "\n\r\t "] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
922 out <- New@Field Node[field, args, No] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
923 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
924 set field <- [params]Set Field >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
925 If[[name]Ends With[set field]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
926 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
927 field <- Right Trim[[name]Slice[[[name]Length] - [[set field]Length]], "\n\r\t "] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
928 out <- New@Field Node[field, args, Yes] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
929 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
930 out <- New@Worker Node[name, args] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
931 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
932 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
933 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
934 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
935 Prefix[string,params,name,existing args:expression,after] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
936 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
937 //Parse argument list |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
938 more args,after <- Parse Arguments[string, params, existing args] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
939 expression <- Worker or Field[name, more args, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
940 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
941 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
942 Postfix or Infix[string,params:expression,after] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
943 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
944 args, after args <- Parse Arguments[string, params, New@List[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
945 delims <- [[[[[("\n")]Append[[params]Arg Begin >>]]Append[[params]Empty Block >>]]Append[[params]Block Begin >>]]Append[[params]Arg End >>]]Append[[params]List Delim >>] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
946 aftere,before,delim <- [after args]Get Comment DString[delims, params] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
947 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
948 If[[delim] = [[params]Arg Begin >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
949 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
950 expression, after <- Prefix[aftere, params, Trim[before,"\r\n\t "], args] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
951 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
952 If[[delim] = [[params]Empty Block >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
953 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
954 after expression <- Val[aftere] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
955 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
956 ,after expression <- [after args]Slice[[before]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
957 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
958 expression <- Worker or Field[Trim[before,"\r\n\t "], args, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
959 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
960 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
961 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
962 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
963 Parse Expression[trimmed,params:final expression,after blocks] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
964 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
965 delims <- [[[[[[[("\n")]Append[[params]Arg Begin >>]]Append[[params]Arg End >>]]Append[[params]Assign >>]]Append["\n"]]Append[[params]Empty Block >>]]Append[[params]Block End >>]]Append[[params]String Begin >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
966 after, before, delim <- [trimmed]Get Comment DString[delims, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
967 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
968 //If we find an arg begin token, we have a worker expression |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
969 If[[delim] = [[params]Arg Begin >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
970 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
971 maybe name <- Right Trim[before, "\r\t "] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
972 //Prefix expressions will have the worker name before the first arg begin token |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
973 If[[maybe name] = [""]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
974 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
975 expression, after expression <- Postfix or Infix[after, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
976 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
977 If[[maybe name]Contains[[params]List Delim >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
978 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
979 after expression <- [after literal]Append[[delim]Append[after]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
980 expression, after literal <- Named Pipe or Literal[Right Trim[before, "\r\n\t "], params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
981 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
982 expression, after expression <- Prefix[after, params, maybe name, New@List[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
983 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
984 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
985 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
986 If[[delim] = [[params]Assign >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
987 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
988 //Expressions starting with an assignment can be prefix, postfix or infix |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
989 //or they can be a simple literal or named pipe |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
990 assignments <- Map[[before]Split[[params]List Delim >>], ["Trim"]Set Input[1,"\n\r\t "]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
991 ,after blocks <- Parse Expression[Comment Left Trim[after, " \n\r\t", params], params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
992 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
993 final expression <- [~]Assignments <<[assignments] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
994 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
995 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
996 //If[[delim] = [[params]String Begin >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
997 //{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
998 // If[[Trim[before, "\r\n\t "]] = [""]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
999 // { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1000 // expression, after expression <- Named Pipe or Literal[[delim]Append[after], params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1001 // }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1002 // after expression <- [after literal]Append[[delim]Append[after]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1003 // expression, after literal <- Named Pipe or Literal[Right Trim[before, "\r\n\t "], params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1004 // } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1005 //}{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1006 // after expression <- [after literal]Append[[delim]Append[after]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1007 // expression, after literal <- Named Pipe or Literal[Right Trim[before, "\r\n\t "], params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1008 //} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1009 expression, after expression <- Named Pipe or Literal[trimmed, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1010 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1011 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1012 //Any expression can be followed by one or more blocks mapping the inputs of other expressions |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1013 //to the outputs of the current one |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1014 blocks,after blocks <- Get Expression Blocks[after expression, params, New@List[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1015 final expression <- [expression]Blocks <<[blocks] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1016 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1017 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1018 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1019 Worker Body[string,params,trees:trees,after end] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1020 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1021 trimmed <- Comment Left Trim[string, "\n\r\t ", params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1022 If[[trimmed]Starts With[[params]Block End >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1023 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1024 //We're done with this block, return |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1025 ,after end <- [trimmed]Slice[[[params]Block End >>]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1026 trees <- trees |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1027 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1028 expression, after expression <- Parse Expression[trimmed, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1029 trees,after end <- Worker Body[after expression, params, [trees]Append[expression]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1030 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1031 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1032 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1033 Process Modifiers[worker,params,modifiers:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1034 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1035 //Eventually this will need to be more sophisticated to handle more modifiers |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1036 trimmed <- Comment Left Trim[modifiers, "\n\r\t ", params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1037 If[[trimmed]Starts With[[params]Uses >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1038 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1039 ,after uses <- [trimmed]Slice[[[params]Uses >>]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1040 ,stores string <- [after uses]Get Comment DString["\n", params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1041 out <- [worker]Uses Stores <<[Map[[stores string]Split[[params]List Delim >>], ["Trim"]Set Input[1, "\r\n\t "]]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1042 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1043 out <- worker |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1044 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1045 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1046 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1047 Worker Name[string,params,tree,lines:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1048 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1049 ,whitespace name <- [string]Get Comment DString[[params]Arg Begin >>, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1050 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1051 worker name <- Trim[whitespace name, "\n\r\t "] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1052 in out <- [params]In Out Delim >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1053 arg end <- [params]Arg End >> |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1054 delims <- [[New@List[]]Append[in out]]Append[arg end] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1055 after <- [~]Get Comment DString[delims, params] {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1056 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1057 arglist <- Trim[~,"\r\n\t "] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1058 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1059 //check if there is an in/out separator |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1060 //if it isn't present, everything in the arglist is an input |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1061 If[[~] = [in out]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1062 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1063 after arglist <- [after]Get Comment DString[arg end, params] {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1064 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1065 output string <- Trim[~,"\n\r\t "] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1066 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1067 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1068 after arglist <- Val[after] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1069 output string <- "" |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1070 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1071 inputs <- Map[[arglist]Split[[params]List Delim >>], ["Trim"]Set Input[1,"\n\r\t "]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1072 outputs <- Map[[output string]Split[[params]List Delim >>], ["Trim"]Set Input[1,"\n\r\t "]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1073 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1074 New@Parse Worker[worker name, inputs, outputs, 0] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1075 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1076 body text, modifiers <- [after arglist]Get Comment DString[[params]Block Begin >>, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1077 modified <- Process Modifiers[~, params, modifiers] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1078 expression trees, after body <- Worker Body[body text, params, New@List[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1079 worker <- [modified]Trees <<[expression trees] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1080 new worker dict <- [[tree]Workers >>]Set[worker name, worker] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1081 out <- Null[after body, params, [tree]Workers <<[new worker dict], 0] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1082 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1083 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1084 }{}{}{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1085 out <- tree |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1086 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1087 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1088 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1089 Null[string,params,tree,lines:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1090 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1091 trimmed <- Comment Left Trim[string, " \n\r\t", params] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1092 current line <- 0 |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1093 If[[trimmed]Starts With[ [params]Blueprint >> ]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1094 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1095 out <- PBlueprint[trimmed, params, tree, current line] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1096 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1097 If[[trimmed]Starts With[ [params]Import >> ]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1098 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1099 out <- Parse Import[trimmed, params, tree, current line] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1100 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1101 out <- Worker Name[trimmed, params, tree, current line] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1102 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1103 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1104 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1105 |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1106 Add Workers[workers,name,program:out] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1107 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1108 prog,worker <- [program]New Worker[name] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1109 [worker]Set IO Counts[ [[[workers]Index[name]]Inputs >>]Length, [[[workers]Index[name]]Outputs >>]Length] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1110 [workers]Next[name] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1111 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1112 out <- Add Workers[workers, ~, prog] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1113 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1114 out <- Val[prog] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1115 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1116 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1117 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1118 Add Wires Helper[worker,node,unused,parse worker,assignments:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1119 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1120 out <- [node]Add Wires[worker, New@List[], parse worker, assignments] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1121 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1122 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1123 Add Contents[parse worker,name,program:out,key] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1124 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1125 worker <- [[program]Find Worker[name]]Uses[[parse worker]Uses Stores >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1126 trees, contents worker, refs <- Add List to Worker[[parse worker]Trees >>, worker, program, parse worker, New@Dictionary[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1127 Fold[[["Add Wires Helper"]Set Input[3, parse worker]]Set Input[4, refs], contents worker, trees] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1128 out <- [parse worker]Trees <<[trees] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1129 key <- name |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1130 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1131 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1132 Add Blueprint Field[blueprint,field,unused:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1133 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1134 out <- [blueprint]Add Field[[field]Name >>, [field]Type >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1135 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1136 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1137 Add Blueprint[prog,def:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1138 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1139 out <- [prog]New Blueprint[[def]Name >>] {} |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1140 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1141 Fold["Add Blueprint Field", ~, [def]Fields >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1142 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1143 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1144 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1145 _Tree to Program[parse tree,program:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1146 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1147 after blueprint <- Fold["Add Blueprint", program, [parse tree]Blueprints >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1148 [[parse tree]Workers >>]First |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1149 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1150 Print["Adding workers"] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1151 prog <- Add Workers[[parse tree]Workers >>, ~, after blueprint] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1152 { Print["Add Workers done"] } |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1153 }{ |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1154 Print["No workers!"] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1155 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1156 Key Value Map[[parse tree]Workers >>, ["Add Contents"]Set Input[2, prog]] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1157 { Print["Done Add Contents"] } |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1158 out <- Val[prog] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1159 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1160 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1161 Tree to Program[parse tree:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1162 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1163 Print["Tree to Program"] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1164 out <- _Tree to Program[parse tree, [New@Program[]]Add Builtins] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1165 { Print["done"] } |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1166 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1167 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1168 Needs Imports[needs import,not imported?,name:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1169 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1170 If[not imported?] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1171 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1172 out <- [needs import]Append[name] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1173 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1174 out <- needs import |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1175 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1176 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1177 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1178 Do Import[tree,file name,unused,params:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1179 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1180 file <- <String@File[file name] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1181 ,text <- [file]Get FString[[file]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1182 after import <- Null[text, params, tree, 0] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1183 out <- [after import]Imports <<[ [[after import]Imports >>]Set[file name, No] ] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1184 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1185 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1186 Process Imports[parse tree,params:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1187 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1188 needs import <- Fold["Needs Imports", New@List[], [parse tree]Imports >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1189 If[[[needs import]Length] > [0]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1190 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1191 import tree <- Fold[["Do Import"]Set Input[3, params], parse tree, needs import] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1192 out <- Process Imports[import tree, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1193 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1194 out <- parse tree |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1195 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1196 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1197 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1198 _Init Used Store[dict,store name:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1199 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1200 [dict]Index[store name] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1201 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1202 out <- dict |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1203 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1204 Init Store[store name] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1205 out <- [dict]Set[store name, Yes] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1206 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1207 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1208 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1209 _Init Used Stores[dict,worker:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1210 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1211 out <- Fold["_Init Used Store", dict, [worker]Uses Stores >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1212 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1213 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1214 Init Used Stores[parse tree,existing stores:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1215 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1216 out <- Fold["_Init Used Stores", existing stores, [parse tree]Workers >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1217 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1218 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1219 Until End[text:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1220 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1221 line <- Get Input[] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1222 If[[line] = ["End"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1223 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1224 out <- [text]Append["\n"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1225 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1226 out <- Until End[[[text]Append["\n"]]Append[line]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1227 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1228 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1229 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1230 _REPL[params,prog,stores] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1231 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1232 line <- Get Input[] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1233 If[[line] = ["Begin"]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1234 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1235 text <- Until End[""] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1236 Null[text, params, New@Parse Program[], 0] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1237 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1238 define tree <- Process Imports[~, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1239 Init Used Stores[define tree, stores] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1240 { _REPL[params, _Tree to Program[define tree, prog], ~] } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1241 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1242 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1243 If[[line]Starts With[[params]Import >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1244 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1245 Parse Import[[line]Append["\n"], params, New@Parse Program[], 0] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1246 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1247 import tree <- Process Imports[~, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1248 Init Used Stores[import tree, stores] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1249 { _REPL[params, _Tree to Program[import tree, prog], ~] } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1250 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1251 }{ |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1252 Print["Expression"] |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1253 trees <- Worker Body[[line]Append["}"], params, New@List[]] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1254 { Print["Parse done"] } |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1255 tree <- [New@Worker Node["Val", [New@List[]]Append[[trees]Index[0]]]]Assignments <<[("__out")] |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1256 { Print["Constructed new tree"] } |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1257 this stores <- [[tree]Gather Stores[params, New@Dictionary[]]]Keys |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1258 { Print["Got stores"] } |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1259 next stores <- Fold["_Init Used Store", stores, this stores] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1260 { |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1261 Print["Initialized stores"] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1262 pworker <- [[New@Parse Worker["__Eval", New@List[], ("__out"), 0]]Trees <<[[New@List[]]Append[tree]]]Uses Stores <<[this stores] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1263 { Print["Constructed parse worker"] } |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1264 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1265 [[prog]Find Worker["__Eval"]]Clear |
24
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1266 { |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1267 Print["Cleared worker"] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1268 Add Contents[pworker, "__Eval", prog] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1269 { |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1270 Print["Added Contents"] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1271 Pretty Print[[[[prog]Find Worker["__Eval"]]Do[New@List[]]]Index[0], ""] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1272 { |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1273 Print["Finished executeion"] |
8b2b3f4a2a58
Some fixes to parser_old.rhope
Mike Pavone <pavone@retrodev.com>
parents:
22
diff
changeset
|
1274 _REPL[params, prog, next stores] } } } |
22
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1275 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1276 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1277 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1278 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1279 REPL[params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1280 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1281 Print["Rhope Alpha 2\nCopyright 2008 by Michael Pavone\nEntering interactive mode\n"] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1282 prog <- Tree to Program[Null["Val[in:out]\n{\n out <- in\n}\n__Eval[:__out]\n{\n}\n", params, New@Parse Program[], 0]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1283 _REPL[params, prog, New@Dictionary[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1284 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1285 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1286 Add If Store[stores,name,params:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1287 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1288 If[[name]Contains[[params]Global Separator >>]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1289 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1290 parts <- [name]Split[[params]Global Separator >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1291 out <- [stores]Set[[parts]Index[0], Yes] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1292 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1293 out <- stores |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1294 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1295 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1296 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1297 Param Gather Stores[stores,node,params:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1298 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1299 out <- [node]Gather Stores[params, stores] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1300 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1301 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1302 Gather Stores@Named Pipe Node[node,params,stores:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1303 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1304 out <- Fold[["Add If Store"]Set Input[2, params], stores, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1305 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1306 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1307 Gather Stores@Global Node[node,params,stores:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1308 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1309 out <- [stores]Set[[node]Store >>, Yes] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1310 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1311 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1312 Gather Stores@Worker Node[node,params,stores:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1313 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1314 //TODO: Handle blocks |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1315 store list <- Fold[["Param Gather Stores"]Set Input[2, params], stores, [node]Params >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1316 out <- Fold[["Add If Store"]Set Input[2, params], store list, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1317 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1318 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1319 Gather Stores@Field Node[node,params,stores:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1320 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1321 //TODO: Handle blocks |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1322 store list <- Fold[["Param Gather Stores"]Set Input[2, params], stores, [node]Params >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1323 out <- Fold[["Add If Store"]Set Input[2, params], store list, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1324 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1325 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1326 Gather Stores@Literal Node[node,params,stores:out] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1327 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1328 out <- Fold[["Add If Store"]Set Input[2, params], stores, [node]Assignments >>] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1329 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1330 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1331 |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1332 Main[args] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1333 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1334 [args]Index[1] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1335 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1336 file <- <String@File[~] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1337 ,text <- [file]Get FString[[file]Length] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1338 params <- New@Parser[] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1339 Null[text, params, New@Parse Program[], 0] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1340 { |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1341 tree <- Process Imports[~, params] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1342 Init Used Stores[tree, New@Dictionary[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1343 { [Tree to Program[tree]]Run[[args]Tail[1]] } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1344 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1345 }{ |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1346 REPL[New@Parser[]] |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1347 } |
812673a8b1ea
Converted old parser to new syntax (needs work, currently crashes interpreter
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1348 } |