Changeset 3
- Timestamp:
- Feb 9, 2012, 1:25:43 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 lib 2 LazFuckIDE.exe
-
- Property svn:ignore
-
trunk/LazFuckIDE.lps
r2 r3 5 5 <Version Value="9"/> 6 6 <BuildModes Active="Default"/> 7 <Units Count=" 4">7 <Units Count="6"> 8 8 <Unit0> 9 9 <Filename Value="LazFuckIDE.lpr"/> 10 10 <IsPartOfProject Value="True"/> 11 11 <UnitName Value="LazFuckIDE"/> 12 <UsageCount Value="2 0"/>12 <UsageCount Value="23"/> 13 13 </Unit0> 14 14 <Unit1> … … 18 18 <ResourceBaseClass Value="Form"/> 19 19 <UnitName Value="UMainForm"/> 20 <IsVisibleTab Value="True"/>21 20 <EditorIndex Value="0"/> 22 21 <WindowIndex Value="0"/> 23 <TopLine Value=" 68"/>24 <CursorPos X=" 13" Y="77"/>25 <UsageCount Value="2 0"/>22 <TopLine Value="40"/> 23 <CursorPos X="35" Y="98"/> 24 <UsageCount Value="23"/> 26 25 <Loaded Value="True"/> 27 26 <LoadedDesigner Value="True"/> … … 31 30 <IsPartOfProject Value="True"/> 32 31 <UnitName Value="UBrainFuck"/> 32 <IsVisibleTab Value="True"/> 33 33 <EditorIndex Value="2"/> 34 34 <WindowIndex Value="0"/> 35 <TopLine Value=" 70"/>36 <CursorPos X=" 19" Y="78"/>37 <UsageCount Value="2 0"/>35 <TopLine Value="67"/> 36 <CursorPos X="42" Y="71"/> 37 <UsageCount Value="23"/> 38 38 <Loaded Value="True"/> 39 39 </Unit2> … … 48 48 <TopLine Value="11"/> 49 49 <CursorPos X="19" Y="6"/> 50 <UsageCount Value="2 0"/>50 <UsageCount Value="23"/> 51 51 <Loaded Value="True"/> 52 52 <LoadedDesigner Value="True"/> 53 53 </Unit3> 54 <Unit4> 55 <Filename Value="H:\Lazarus\0.9.31_2.7.1\fpc\2.7.1\source\rtl\objpas\classes\classesh.inc"/> 56 <EditorIndex Value="3"/> 57 <WindowIndex Value="0"/> 58 <TopLine Value="636"/> 59 <CursorPos X="14" Y="649"/> 60 <UsageCount Value="11"/> 61 <Loaded Value="True"/> 62 </Unit4> 63 <Unit5> 64 <Filename Value="H:\Lazarus\0.9.31_2.7.1\fpc\2.7.1\source\rtl\objpas\classes\stringl.inc"/> 65 <EditorIndex Value="4"/> 66 <WindowIndex Value="0"/> 67 <TopLine Value="434"/> 68 <CursorPos X="3" Y="441"/> 69 <UsageCount Value="11"/> 70 <Loaded Value="True"/> 71 </Unit5> 54 72 </Units> 55 73 <General> 56 74 <ActiveWindowIndexAtStart Value="0"/> 57 75 </General> 58 <JumpHistory Count=" 29" HistoryIndex="28">76 <JumpHistory Count="30" HistoryIndex="29"> 59 77 <Position1> 60 <Filename Value="U MainForm.pas"/>61 <Caret Line=" 43" Column="18" TopLine="20"/>78 <Filename Value="UBrainFuck.pas"/> 79 <Caret Line="121" Column="1" TopLine="104"/> 62 80 </Position1> 63 81 <Position2> 64 <Filename Value="U MainForm.pas"/>65 <Caret Line=" 44" Column="18" TopLine="21"/>82 <Filename Value="UBrainFuck.pas"/> 83 <Caret Line="125" Column="1" TopLine="104"/> 66 84 </Position2> 67 85 <Position3> 68 <Filename Value="U MainForm.pas"/>69 <Caret Line=" 45" Column="18" TopLine="21"/>86 <Filename Value="UBrainFuck.pas"/> 87 <Caret Line="121" Column="1" TopLine="104"/> 70 88 </Position3> 71 89 <Position4> 72 <Filename Value="U MainForm.pas"/>73 <Caret Line=" 59" Column="5" TopLine="44"/>90 <Filename Value="UBrainFuck.pas"/> 91 <Caret Line="125" Column="1" TopLine="104"/> 74 92 </Position4> 75 93 <Position5> 76 <Filename Value="U InterpreterForm.pas"/>77 <Caret Line="1 " Column="1" TopLine="1"/>94 <Filename Value="UBrainFuck.pas"/> 95 <Caret Line="121" Column="1" TopLine="104"/> 78 96 </Position5> 79 97 <Position6> 80 <Filename Value="U MainForm.pas"/>81 <Caret Line=" 81" Column="28" TopLine="58"/>98 <Filename Value="UBrainFuck.pas"/> 99 <Caret Line="125" Column="1" TopLine="104"/> 82 100 </Position6> 83 101 <Position7> 84 <Filename Value="U MainForm.pas"/>85 <Caret Line=" 86" Column="24" TopLine="65"/>102 <Filename Value="UBrainFuck.pas"/> 103 <Caret Line="121" Column="1" TopLine="104"/> 86 104 </Position7> 87 105 <Position8> 88 <Filename Value="U MainForm.pas"/>89 <Caret Line=" 85" Column="58" TopLine="64"/>106 <Filename Value="UBrainFuck.pas"/> 107 <Caret Line="125" Column="1" TopLine="104"/> 90 108 </Position8> 91 109 <Position9> 92 <Filename Value="U MainForm.pas"/>93 <Caret Line=" 71" Column="20" TopLine="56"/>110 <Filename Value="UBrainFuck.pas"/> 111 <Caret Line="121" Column="1" TopLine="104"/> 94 112 </Position9> 95 113 <Position10> 96 <Filename Value="U MainForm.pas"/>97 <Caret Line=" 88" Column="64" TopLine="68"/>114 <Filename Value="UBrainFuck.pas"/> 115 <Caret Line="125" Column="1" TopLine="104"/> 98 116 </Position10> 99 117 <Position11> 100 <Filename Value="U MainForm.pas"/>101 <Caret Line=" 89" Column="50" TopLine="69"/>118 <Filename Value="UBrainFuck.pas"/> 119 <Caret Line="121" Column="1" TopLine="104"/> 102 120 </Position11> 103 121 <Position12> 104 122 <Filename Value="UBrainFuck.pas"/> 105 <Caret Line=" 38" Column="16" TopLine="25"/>123 <Caret Line="125" Column="1" TopLine="104"/> 106 124 </Position12> 107 125 <Position13> 108 <Filename Value="U MainForm.pas"/>109 <Caret Line=" 91" Column="1" TopLine="70"/>126 <Filename Value="UBrainFuck.pas"/> 127 <Caret Line="121" Column="1" TopLine="104"/> 110 128 </Position13> 111 129 <Position14> 112 130 <Filename Value="UBrainFuck.pas"/> 113 <Caret Line="12 2" Column="1" TopLine="109"/>131 <Caret Line="125" Column="1" TopLine="104"/> 114 132 </Position14> 115 133 <Position15> 116 134 <Filename Value="UBrainFuck.pas"/> 117 <Caret Line="12 3" Column="1" TopLine="109"/>135 <Caret Line="121" Column="1" TopLine="104"/> 118 136 </Position15> 119 137 <Position16> 120 138 <Filename Value="UBrainFuck.pas"/> 121 <Caret Line=" 41" Column="34" TopLine="24"/>139 <Caret Line="125" Column="1" TopLine="104"/> 122 140 </Position16> 123 141 <Position17> 124 142 <Filename Value="UBrainFuck.pas"/> 125 <Caret Line="1 30" Column="3" TopLine="127"/>143 <Caret Line="121" Column="1" TopLine="104"/> 126 144 </Position17> 127 145 <Position18> 128 <Filename Value="U MainForm.pas"/>129 <Caret Line=" 91" Column="1" TopLine="70"/>146 <Filename Value="UBrainFuck.pas"/> 147 <Caret Line="125" Column="1" TopLine="104"/> 130 148 </Position18> 131 149 <Position19> 132 150 <Filename Value="UBrainFuck.pas"/> 133 <Caret Line="12 8" Column="1" TopLine="123"/>151 <Caret Line="121" Column="1" TopLine="104"/> 134 152 </Position19> 135 153 <Position20> 136 154 <Filename Value="UBrainFuck.pas"/> 137 <Caret Line="12 9" Column="1" TopLine="123"/>155 <Caret Line="125" Column="1" TopLine="104"/> 138 156 </Position20> 139 157 <Position21> 140 158 <Filename Value="UBrainFuck.pas"/> 141 <Caret Line=" 74" Column="1" TopLine="61"/>159 <Caret Line="121" Column="1" TopLine="104"/> 142 160 </Position21> 143 161 <Position22> 144 162 <Filename Value="UBrainFuck.pas"/> 145 <Caret Line=" 75" Column="1" TopLine="61"/>163 <Caret Line="125" Column="1" TopLine="104"/> 146 164 </Position22> 147 165 <Position23> 148 <Filename Value="U MainForm.pas"/>149 <Caret Line=" 91" Column="3" TopLine="68"/>166 <Filename Value="UBrainFuck.pas"/> 167 <Caret Line="121" Column="1" TopLine="104"/> 150 168 </Position23> 151 169 <Position24> 152 170 <Filename Value="UBrainFuck.pas"/> 153 <Caret Line="12 9" Column="3" TopLine="127"/>171 <Caret Line="123" Column="1" TopLine="104"/> 154 172 </Position24> 155 173 <Position25> 156 174 <Filename Value="UBrainFuck.pas"/> 157 <Caret Line=" 74" Column="3" TopLine="70"/>175 <Caret Line="125" Column="1" TopLine="104"/> 158 176 </Position25> 159 177 <Position26> 160 178 <Filename Value="UBrainFuck.pas"/> 161 <Caret Line=" 76" Column="1" TopLine="70"/>179 <Caret Line="130" Column="1" TopLine="117"/> 162 180 </Position26> 163 181 <Position27> 164 182 <Filename Value="UBrainFuck.pas"/> 165 <Caret Line=" 77" Column="1" TopLine="70"/>183 <Caret Line="123" Column="14" TopLine="117"/> 166 184 </Position27> 167 185 <Position28> 168 186 <Filename Value="UBrainFuck.pas"/> 169 <Caret Line=" 78" Column="1" TopLine="70"/>187 <Caret Line="117" Column="1" TopLine="104"/> 170 188 </Position28> 171 189 <Position29> 172 190 <Filename Value="UBrainFuck.pas"/> 173 <Caret Line=" 80" Column="3" TopLine="70"/>191 <Caret Line="123" Column="1" TopLine="104"/> 174 192 </Position29> 193 <Position30> 194 <Filename Value="UBrainFuck.pas"/> 195 <Caret Line="125" Column="1" TopLine="104"/> 196 </Position30> 175 197 </JumpHistory> 176 198 </ProjectSession> 199 <Debugging> 200 <BreakPoints Count="2"> 201 <Item1> 202 <Kind Value="bpkSource"/> 203 <WatchScope Value="wpsLocal"/> 204 <WatchKind Value="wpkWrite"/> 205 <Source Value="UBrainFuck.pas"/> 206 <Line Value="117"/> 207 </Item1> 208 <Item2> 209 <Kind Value="bpkSource"/> 210 <WatchScope Value="wpsLocal"/> 211 <WatchKind Value="wpkWrite"/> 212 <Source Value="UBrainFuck.pas"/> 213 <Line Value="123"/> 214 </Item2> 215 </BreakPoints> 216 </Debugging> 177 217 </CONFIG> -
trunk/UBrainFuck.pas
r2 r3 26 26 function ReadCode: Char; 27 27 public 28 Source: TStrings;28 Source: string; 29 29 SourcePosition: Integer; 30 30 Memory: array of Byte; … … 32 32 Loop: array of Integer; 33 33 LoopCurrent: Integer; 34 Output: TStrings;35 Input: TStrings;34 Output: string; 35 Input: string; 36 36 InputPosition: Integer; 37 37 procedure Reset; … … 42 42 end; 43 43 44 44 45 implementation 46 47 resourcestring 48 SProgramLowerLimit = 'Program run over lower limit'; 49 SProgramUpperLimit = 'Program run over upper limit'; 45 50 46 51 { TBrainFuckInterpreter } … … 48 53 procedure TBrainFuckInterpreter.Write(Value: Byte); 49 54 begin 50 Output .Text := Output.Text + Char(Value);55 Output := Output + Char(Value); 51 56 end; 52 57 … … 55 60 Character: string; 56 61 begin 57 Character := Copy(Input .Text, InputPosition, 1);62 Character := Copy(Input, InputPosition, 1); 58 63 Result := Ord(Character[1]); 59 64 Inc(InputPosition); … … 64 69 Code: string; 65 70 begin 66 Code := Copy(Source .Text, SourcePosition, 1);71 Code := Copy(Source, SourcePosition + 1, 1); 67 72 Result := Code[1]; 68 73 end; … … 74 79 SourcePosition := 0; 75 80 InputPosition := 0; 76 Output .Text:= '';81 Output := ''; 77 82 MemoryPosition := 0; 78 83 for I := 0 to Length(Memory) - 1 do … … 89 94 case ReadCode of 90 95 '>': Inc(MemoryPosition); 91 '<': Dec(MemoryPosition); 96 '<': if MemoryPosition > 0 then Dec(MemoryPosition) 97 else raise Exception.Create(SProgramLowerLimit); 92 98 '+': Memory[MemoryPosition] := Memory[MemoryPosition] + 1; 93 99 '-': Memory[MemoryPosition] := Memory[MemoryPosition] - 1; … … 97 103 if Memory[MemoryPosition] = 0 then begin 98 104 C := 1; 99 Inc( MemoryPosition);105 Inc(SourcePosition); 100 106 while C > 0 do begin 101 107 case ReadCode of … … 103 109 ']': Dec(C); 104 110 end; 105 Inc( MemoryPosition);111 Inc(SourcePosition); 106 112 end; 107 Dec( MemoryPosition);113 Dec(SourcePosition); 108 114 end; 109 115 end; … … 111 117 if Memory[MemoryPosition] > 0 then begin 112 118 C := 1; 113 Dec( MemoryPosition);119 Dec(SourcePosition); 114 120 while C > 0 do begin 115 121 case ReadCode of … … 117 123 '[': Dec(C); 118 124 end; 119 Dec( MemoryPosition);125 Dec(SourcePosition); 120 126 end; 121 127 end; 122 128 end; 123 129 end; 124 Inc( MemoryPosition);130 Inc(SourcePosition); 125 131 end; 126 132 … … 128 134 begin 129 135 Reset; 130 while SourcePosition < Length(Source .Text) do136 while SourcePosition < Length(Source) do 131 137 SingleStep; 132 138 end; -
trunk/UMainForm.lfm
r2 r3 1 1 object MainForm: TMainForm 2 2 Left = 270 3 Height = 5343 Height = 465 4 4 Top = 120 5 Width = 6 295 Width = 643 6 6 Caption = 'LazFuck' 7 ClientHeight = 5158 ClientWidth = 6 297 ClientHeight = 446 8 ClientWidth = 643 9 9 Menu = MainMenu1 10 10 OnCreate = FormCreate 11 OnDestroy = FormDestroy 11 12 OnShow = FormShow 12 13 LCLVersion = '0.9.31' 13 14 object MemoSource: TMemo 14 15 Left = 0 15 Height = 43916 Height = 370 16 17 Top = 56 17 Width = 6 2918 Width = 643 18 19 Align = alClient 19 20 Lines.Strings = ( … … 27 28 Left = 0 28 29 Height = 20 29 Top = 4 9530 Width = 6 2930 Top = 426 31 Width = 643 31 32 Panels = <> 32 33 end … … 35 36 Height = 26 36 37 Top = 0 37 Width = 6 2938 Width = 643 38 39 Images = ImageList1 39 40 ParentShowHint = False … … 82 83 Height = 30 83 84 Top = 26 84 Width = 6 2985 Width = 643 85 86 Align = alTop 86 87 TabOrder = 3 … … 94 95 object MenuItem8: TMenuItem 95 96 Action = AProjectNew 97 Bitmap.Data = { 98 36040000424D3604000000000000360000002800000010000000100000000100 99 2000000000000004000064000000640000000000000000000000000000000000 100 0000000000000000000000000000000000000000000000000000000000000000 101 0000000000000000000000000000000000000000000000000000000000000000 102 0000000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 103 00FF000000FF000000FF000000FF000000FF0000000000000000000000000000 104 0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 105 FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 106 0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 107 FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 108 0000000000FFFFFFFFFFFFFFFFFFFF0000FFFF0000FFFF0000FFFF0000FFFF00 109 00FFFF0000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 110 0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 111 FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 112 0000000000FFFFFFFFFFFFFFFFFFFF0000FFFF0000FFFF0000FFFF0000FFFF00 113 00FFFF0000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 114 0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 115 FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 116 0000000000FFFFFFFFFFFFFFFFFFFF0000FFFF0000FFFF0000FFFF0000FFFF00 117 00FFFF0000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 118 0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 119 FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 120 0000000000FFFFFFFFFFFFFFFFFFFF0000FFFF0000FFFF0000FFFF0000FFFFFF 121 FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 122 0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 123 FFFF000000FF000000FF000000FF000000FF0000000000000000000000000000 124 0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 125 FFFF000000FFBDBDBDFF000000FF000000000000000000000000000000000000 126 0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 127 FFFF000000FF000000FF00000000000000000000000000000000000000000000 128 0000000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 129 00FF000000FF0000000000000000000000000000000000000000000000000000 130 0000000000000000000000000000000000000000000000000000000000000000 131 0000000000000000000000000000000000000000000000000000 132 } 96 133 end 97 134 object MenuItem2: TMenuItem 98 135 Action = AProjectOpen 136 Bitmap.Data = { 137 36040000424D3604000000000000360000002800000010000000100000000100 138 2000000000000004000064000000640000000000000000000000000000000000 139 0000000000000000000000000000000000000000000000000000000000000000 140 0000000000000000000000000000000000000000000000000000000000000000 141 0000000000000000000000000000000000000000000000000000000000000000 142 0000000000000000000000000000000000000000000000000000000000FF0000 143 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 144 00FF000000FF0000000000000000000000000000000000000000000000FF0000 145 00FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0084 146 84FF008484FF000000FF00000000000000000000000000000000000000FF00FF 147 FFFF000000FF008484FF008484FF008484FF008484FF008484FF008484FF0084 148 84FF008484FF008484FF000000FF000000000000000000000000000000FFFFFF 149 FFFF00FFFFFF000000FF008484FF008484FF008484FF008484FF008484FF0084 150 84FF008484FF008484FF008484FF000000FF0000000000000000000000FF00FF 151 FFFFFFFFFFFF00FFFFFF000000FF008484FF008484FF008484FF008484FF0084 152 84FF008484FF008484FF008484FF008484FF000000FF00000000000000FFFFFF 153 FFFF00FFFFFFFFFFFFFF00FFFFFF000000FF000000FF000000FF000000FF0000 154 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00FF 155 FFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FF 156 FFFF000000FF0000000000000000000000000000000000000000000000FFFFFF 157 FFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFF 158 FFFF000000FF0000000000000000000000000000000000000000000000FF00FF 159 FFFFFFFFFFFF00FFFFFF000000FF000000FF000000FF000000FF000000FF0000 160 00FF000000FF0000000000000000000000000000000000000000000000000000 161 00FF000000FF000000FF00000000000000000000000000000000000000000000 162 00000000000000000000000000FF000000FF000000FF00000000000000000000 163 0000000000000000000000000000000000000000000000000000000000000000 164 0000000000000000000000000000000000FF000000FF00000000000000000000 165 0000000000000000000000000000000000000000000000000000000000FF0000 166 00000000000000000000000000FF00000000000000FF00000000000000000000 167 0000000000000000000000000000000000000000000000000000000000000000 168 00FF000000FF000000FF00000000000000000000000000000000000000000000 169 0000000000000000000000000000000000000000000000000000000000000000 170 0000000000000000000000000000000000000000000000000000 171 } 99 172 end 100 173 object MenuItem3: TMenuItem 101 174 Action = AProjectSave 175 Bitmap.Data = { 176 36040000424D3604000000000000360000002800000010000000100000000100 177 2000000000000004000064000000640000000000000000000000000000000000 178 0000000000000000000000000000000000000000000000000000000000000000 179 0000000000000000000000000000000000000000000000000000000000000000 180 0000000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 181 00FF000000FF000000FF000000FF000000FF000000FF00000000000000000000 182 00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000 183 00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 184 00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000 185 00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 186 00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000 187 00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 188 00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000 189 00FF000000FF000000FF000000FF008484FF000000FF00000000000000000000 190 00FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0084 191 84FF008484FF008484FF008484FF008484FF000000FF00000000000000000000 192 00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000 193 00FF000000FF000000FF008484FF008484FF000000FF00000000000000000000 194 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 195 FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 196 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 197 FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 198 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 199 FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 200 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 201 FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 202 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 203 FFFFFFFFFFFFFFFFFFFF000000FF000000FF000000FF00000000000000000000 204 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 205 FFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFF000000FF00000000000000000000 206 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 207 00FF000000FF000000FF000000FF000000FF000000FF00000000000000000000 208 0000000000000000000000000000000000000000000000000000000000000000 209 0000000000000000000000000000000000000000000000000000 210 } 102 211 end 103 212 object MenuItem4: TMenuItem 104 213 Action = AProjectSaveAs 214 Bitmap.Data = { 215 36040000424D3604000000000000360000002800000010000000100000000100 216 2000000000000004000064000000640000000000000000000000000000000000 217 0000000000000000000000000000000000000000000000000000000000000000 218 0000000000000000000000000000000000000000000000000000000000000000 219 0000000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 220 00FF000000FF000000FF000000FF000000FF000000FF00000000000000000000 221 00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000 222 00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 223 00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000 224 00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 225 00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000 226 00FFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 227 00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000 228 00FF000000FF000000FF000000FF008484FF000000FF00000000000000000000 229 00FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0084 230 84FF008484FF008484FF008484FF008484FF000000FF00000000000000000000 231 00FF008484FF008484FF000000FF000000FF000000FF000000FF000000FF0000 232 00FF000000FF000000FF008484FF008484FF000000FF00000000000000000000 233 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 234 FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 235 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 236 FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 237 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 238 FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 239 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 240 FFFFFFFFFFFFFFFFFFFF000000FF008484FF000000FF00000000000000000000 241 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 242 FFFFFFFFFFFFFFFFFFFF000000FF000000FF000000FF00000000000000000000 243 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 244 FFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFF000000FF00000000000000000000 245 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 246 00FF000000FF000000FF000000FF000000FF000000FF00000000000000000000 247 0000000000000000000000000000000000000000000000000000000000000000 248 0000000000000000000000000000000000000000000000000000 249 } 105 250 end 106 251 object MenuItem7: TMenuItem 107 252 Action = AProjectClose 253 Bitmap.Data = { 254 36040000424D3604000000000000360000002800000010000000100000000100 255 2000000000000004000064000000640000000000000000000000000000000000 256 0000000000000000000000000000000000000000000000000000000000000000 257 0000000000000000000000000000000000000000000000000000000000000000 258 0000000000000000000000000000000000000000000000000000000000000000 259 0000000000000000000000000000000000000000000000000000000000000000 260 0000000000000000000000000000000000000000000000000000000000000000 261 00000000000000000000000000003A3AE2FFC0C0C0FF00000000000000000000 262 0000000000003A3AE2FFC0C0C0FF000000000000000000000000000000000000 263 0000000000000000000000000000000000000000000000000000000000000000 264 00003A3AE2FF3A3AE2FF3A3AE2FFC0C0C0FF0000000000000000000000000000 265 000000000000000000003A3AE2FFC0C0C0FF0000000000000000000000000000 266 00003A3AE2FF3A3AE2FF3A3AE2FFC0C0C0FF0000000000000000000000000000 267 0000000000003A3AE2FFC0C0C0FF000000000000000000000000000000000000 268 0000000000003838E0FF3838E0FF3838E0FFC0C0C0FF00000000000000000000 269 00003838E0FF3838E0FFC0C0C0FF000000000000000000000000000000000000 270 000000000000000000003535DDFF3535DDFF3535DDFFC0C0C0FF000000003535 271 DDFF3535DDFFC0C0C0FF00000000000000000000000000000000000000000000 272 00000000000000000000000000003232DAFF3232DAFF3232DAFF3232DAFF3232 273 DAFFC0C0C0FF0000000000000000000000000000000000000000000000000000 274 0000000000000000000000000000000000002F2FD7FF2F2FD7FF2F2FD7FFC0C0 275 C0FF000000000000000000000000000000000000000000000000000000000000 276 00000000000000000000000000002C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FF2C2C 277 D4FFC0C0C0FF0000000000000000000000000000000000000000000000000000 278 000000000000000000002929D1FF2929D1FF2929D1FFC0C0C0FF000000002929 279 D1FFC0C0C0FF0000000000000000000000000000000000000000000000000000 280 00002626CEFF2626CEFF2626CEFF2626CEFFC0C0C0FF00000000000000000000 281 00002626CEFF2626CEFFC0C0C0FF000000000000000000000000000000002020 282 C8FF2020C8FF2020C8FF2020C8FFC0C0C0FF0000000000000000000000000000 283 0000000000002020C8FF2020C8FFC0C0C0FF0000000000000000000000001818 284 C0FF1818C0FFC0C0C0FF00000000000000000000000000000000000000000000 285 000000000000000000001818C0FF1818C0FFC0C0C0FF00000000000000000000 286 0000000000000000000000000000000000000000000000000000000000000000 287 0000000000000000000000000000000000000000000000000000 288 } 108 289 end 109 290 object MenuItem5: TMenuItem … … 112 293 object MenuItem6: TMenuItem 113 294 Action = AExit 295 Bitmap.Data = { 296 36040000424D3604000000000000360000002800000010000000100000000100 297 2000000000000004000064000000640000000000000000000000000000000000 298 0000000000000000000000000000000000FF0000000000000000000000000000 299 0000000000000000000000000000000000000000000000000000000000000000 300 00000000000000000000000000FF000000FF0000000000000000000000000000 301 0000000000000000000000000000000000000000000000000000000000000000 302 000000000000000000FF008484FF000000FF0000000000000000000000000000 303 0000000000000000000000000000000000000000000000000000000000000000 304 0000000000FF008484FF008484FF000000FF0000000000000000000000000000 305 0000000000000000000000000000000000000000000000000000000000FF0000 306 00FF008484FF008484FF008484FF000000FF000000FF000000FF000000FF0000 307 00FF000000FF000000FF000000FF000000000000000000000000000000000000 308 00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000 309 0000000000000000000000000000000000000000000000000000000000000000 310 00FF008484FF008484FF000000FF000000FFFFFFFFFFFFFFFFFF000000FF0000 311 0000000000000000000000000000840000FF0000000000000000000000000000 312 00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000 313 00000000000000000000840000FF840000FF0000000000000000000000000000 314 00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000 315 000000000000840000FF840000FF840000FF840000FF840000FF000000000000 316 00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000 317 0000840000FF840000FF840000FF840000FF840000FF840000FF000000000000 318 00FF008484FF008484FF008484FF000000FFFFFFFFFFFFFFFFFF000000FF0000 319 000000000000840000FF840000FF840000FF840000FF840000FF000000000000 320 00FF008484FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000 321 00000000000000000000840000FF840000FF0000000000000000000000000000 322 00FF008484FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000 323 0000000000000000000000000000840000FF0000000000000000000000000000 324 00FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000 325 0000000000000000000000000000000000000000000000000000000000000000 326 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 327 0000000000000000000000000000000000000000000000000000000000000000 328 0000000000000000000000000000000000000000000000000000000000000000 329 0000000000000000000000000000000000000000000000000000 330 } 114 331 end 115 332 end … … 118 335 object MenuItem11: TMenuItem 119 336 Action = ACompile 337 Bitmap.Data = { 338 36040000424D3604000000000000360000002800000010000000100000000100 339 2000000000000004000064000000640000000000000000000000000000000000 340 0000000000000000000000000000000000000000000000000000000000000000 341 0000000000000000000000000000000000000000000000000000000000000000 342 0000000000000000000000000000000000000000000000000000000000000000 343 0000000000000000000000000000000000000000000000000000000000000000 344 0000000000000000000000000000339966FF009933FF009933FF009933FF66CC 345 99FF0000000000000000339966FF000000000000000000000000000000000000 346 00000000000000000000339966FF339966FF009933FF009933FF009933FF0099 347 33FF009933FF339966FF009933FF000000000000000000000000000000000000 348 00000000000066CC99FF009933FF66CC99FF000000000000000066CC99FF0099 349 33FF009933FF009933FF009933FF000000000000000000000000000000000000 350 000000000000009933FF66CC99FF000000000000000000000000000000003399 351 66FF009933FF009933FF009933FF000000000000000000000000000000000000 352 0000000000000000000000000000000000000000000000000000339966FF0099 353 33FF009933FF009933FF009933FF000000000000000000000000000000000000 354 0000000000000000000000000000000000000000000000000000000000000000 355 0000000000000000000000000000000000000000000000000000000000000000 356 000000000000009933FF009933FF009933FF009933FF339966FF000000000000 357 0000000000000000000000000000000000000000000000000000000000000000 358 000000000000009933FF009933FF009933FF339966FF00000000000000000000 359 00000000000066CC99FF009933FF000000000000000000000000000000000000 360 000000000000009933FF009933FF009933FF009933FF66CC99FF000000000000 361 000066CC99FF009933FF66CC99FF000000000000000000000000000000000000 362 000000000000009933FF339966FF009933FF009933FF009933FF009933FF0099 363 33FF339966FF339966FF00000000000000000000000000000000000000000000 364 000000000000339966FF000000000000000066CC99FF009933FF009933FF0099 365 33FF339966FF0000000000000000000000000000000000000000000000000000 366 0000000000000000000000000000000000000000000000000000000000000000 367 0000000000000000000000000000000000000000000000000000000000000000 368 0000000000000000000000000000000000000000000000000000000000000000 369 0000000000000000000000000000000000000000000000000000000000000000 370 0000000000000000000000000000000000000000000000000000000000000000 371 0000000000000000000000000000000000000000000000000000 372 } 120 373 end 121 374 object MenuItem12: TMenuItem 122 375 Action = ARun 376 Bitmap.Data = { 377 36040000424D3604000000000000360000002800000010000000100000000100 378 2000000000000004000064000000640000000000000000000000000000000000 379 0000000000000000000000000000000000000000000000000000000000000000 380 0000000000000000000000000000000000000000000000000000000000000000 381 0000000000000000000000000000000000000000000000000000000000000000 382 0000000000000000000000000000000000000000000000000000000000000000 383 000000000000000000000000000000FF00FF0000000000000000000000000000 384 0000000000000000000000000000000000000000000000000000000000000000 385 000000000000000000000000000000FF00FF00FF00FF00000000000000000000 386 0000000000000000000000000000000000000000000000000000000000000000 387 000000000000000000000000000000FF00FF00FF00FF00FF00FF000000000000 388 0000000000000000000000000000000000000000000000000000000000000000 389 000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF0000 390 0000000000000000000000000000000000000000000000000000000000000000 391 000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF 392 00FF000000000000000000000000000000000000000000000000000000000000 393 000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF 394 00FF00FF00FF0000000000000000000000000000000000000000000000000000 395 000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF 396 00FF00FF00FF00FF00FF00000000000000000000000000000000000000000000 397 000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF 398 00FF00FF00FF0000000000000000000000000000000000000000000000000000 399 000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF 400 00FF000000000000000000000000000000000000000000000000000000000000 401 000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF0000 402 0000000000000000000000000000000000000000000000000000000000000000 403 000000000000000000000000000000FF00FF00FF00FF00FF00FF000000000000 404 0000000000000000000000000000000000000000000000000000000000000000 405 000000000000000000000000000000FF00FF00FF00FF00000000000000000000 406 0000000000000000000000000000000000000000000000000000000000000000 407 000000000000000000000000000000FF00FF0000000000000000000000000000 408 0000000000000000000000000000000000000000000000000000000000000000 409 0000000000000000000000000000000000000000000000000000000000000000 410 0000000000000000000000000000000000000000000000000000 411 } 123 412 end 124 413 end … … 127 416 object MenuItem13: TMenuItem 128 417 Action = AHelp 418 Bitmap.Data = { 419 36040000424D3604000000000000360000002800000010000000100000000100 420 2000000000000004000064000000640000000000000000000000000000000000 421 0000000000000000000000000000000000000000000000000000000000000000 422 0000000000000000000000000000000000000000000000000000000000000000 423 00000000000000000000916429FF855A24FF885015FF824A1DFF7E4719FF7944 424 17FF583C0EFF49340DFF00000000000000000000000000000000000000000000 425 000000000000A1692CFFC08858FFE0C9B4FFF7F1ECFFFEFDFCFFFEFDFCFFF5F0 426 ECFFDCC9B8FF9E7857FF473108FF000000000000000000000000000000000000 427 0000B2702BFFDBAB80FFF8EFE7FFE2BBA6FFCC7E56FFC15823FFC05722FFC97F 428 56FFDEBAA7FFF2EBE7FFB39376FF483108FF000000000000000000000000B677 429 34FFD6996BFFF9F0E7FFDDA488FFC75013FFC04E11FFDCA688FFFFFEFEFFB549 430 11FFB64A10FFD59E82FFF3ECE7FF9A7352FF49340DFF0000000000000000B479 431 3AFFEFD6C1FFEDC5B2FFDD5A1AFFD55617FFD25313FFD87D4DFFE3A686FFBB4C 432 11FFB34A12FFB64A10FFDEB9A6FFDCC9B8FF563C0DFF0000000000000000CD7F 433 45FFFCF4EDFFEC9772FFE86021FFE05A1DFFDB5819FFEDAA89FFFFFEFEFFC84E 434 12FFB94C11FFB34C13FFC77B53FFF6F0ECFF7A4319FF0000000000000000CD81 435 47FFFFFEFEFFF87A46FFF96829FFF66525FFF16020FFF18653FFFFFEFEFFF0BF 436 A8FFC55A24FFB64C15FFB75724FFFEFEFDFF7F481AFF0000000000000000CD84 437 4EFFFFFEFEFFFC814CFFFF7031FFFF6B2CFFFD6928FFF86523FFF49265FFFDF5 438 F1FFF4D4C5FFC65018FFBA5927FFFEFEFDFF834A1CFF0000000000000000D183 439 4CFFFCF7F1FFFAA582FFFF733AFFFF844EFFFFAE8AFFFE6C2DFFF76727FFF192 440 68FFFFFEFEFFE98354FFD78560FFF8F1ECFF81551FFF0000000000000000C483 441 41FFF0DAC3FFFAD1C0FFFF7940FFFF986EFFFFFEFEFFFFC9B2FFFD9164FFFAC6 442 AFFFFEF5F1FFF5773DFFEDC5B2FFE4CBB3FF905D21FF0000000000000000C484 443 45FFDCA277FFFCF4EDFFFABFA6FFFF7A43FFFFBB9EFFFFF6F3FFFFFEFEFFFEED 444 E5FFFA9970FFF3B69CFFF8F0E6FFBB8B56FF986426FF00000000000000000000 445 0000C48443FFE5B999FFFCF4EDFFFBD2C1FFFAA887FFFD8757FFFD8454FFF8A5 446 82FFF7CEBDFFFAF1E7FFD2A77AFFA36A2AFF0000000000000000000000000000 447 000000000000C58442FFDCA277FFF3DAC7FFFCF7F1FFFFFEFEFFFFFEFEFFFCF4 448 EDFFF1D6C0FFC7935DFFA66F33FF000000000000000000000000000000000000 449 00000000000000000000C58444FFC28342FFD89C6DFFD69668FFD49463FFD696 450 68FFB2793CFFB1783BFF00000000000000000000000000000000000000000000 451 0000000000000000000000000000000000000000000000000000000000000000 452 0000000000000000000000000000000000000000000000000000 453 } 129 454 end 130 455 object MenuItem14: TMenuItem … … 165 490 Caption = 'Exit' 166 491 ImageIndex = 5 492 OnExecute = AExitExecute 167 493 ShortCut = 32883 168 494 end -
trunk/UMainForm.pas
r2 r3 52 52 ToolButton6: TToolButton; 53 53 ToolButton7: TToolButton; 54 procedure AExitExecute(Sender: TObject); 54 55 procedure ARunExecute(Sender: TObject); 55 56 procedure FormCreate(Sender: TObject); 57 procedure FormDestroy(Sender: TObject); 56 58 procedure FormShow(Sender: TObject); 57 59 private … … 81 83 begin 82 84 BrainFuckInterpreter := TBrainFuckInterpreter.Create; 83 BrainFuckInterpreter.Source := MemoSource.Lines; 85 end; 86 87 procedure TMainForm.FormDestroy(Sender: TObject); 88 begin 89 BrainFuckInterpreter.Free; 84 90 end; 85 91 … … 87 93 begin 88 94 InterpreterForm.Show; 89 BrainFuckInterpreter.Input := InterpreterForm.MemoInput.Lines ;90 BrainFuckInterpreter. Output := InterpreterForm.MemoOutput.Lines;95 BrainFuckInterpreter.Input := InterpreterForm.MemoInput.Lines.Text; 96 BrainFuckInterpreter.Source := MemoSource.Lines.Text; 91 97 BrainFuckInterpreter.Run; 98 InterpreterForm.MemoOutput.Lines.Text := BrainFuckInterpreter.Output; 99 end; 100 101 procedure TMainForm.AExitExecute(Sender: TObject); 102 begin 103 Close; 92 104 end; 93 105
Note:
See TracChangeset
for help on using the changeset viewer.