Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/Cell.dpr

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Mon Feb 23 07:50:11 2015 UTC (9 years, 3 months ago) by yamat0jp
File size: 2033 byte(s)


1 program Cell;
2
3 {$APPTYPE CONSOLE}
4
5 uses
6 SysUtils,
7 CellG in 'CellG.pas',
8 CellK in 'CellK.pas',
9 CellV in 'CellV.pas';
10
11 var
12 pTable: Boolean;
13 pCode: Boolean;
14 pTrace: Boolean;
15 shokai: Boolean;
16 _cellG: TCellG;
17 _cellV: TCellV;
18 _cellK: TCellK;
19 s: string;
20 i, j: integer;
21 begin
22 { TODO -oUser -cConsole Main : この下にコードを記述してください }
23 Writeln('Version 1.6');
24 Readln(s);
25 shokai:=true;
26 _cellG:=nil;
27 _cellV:=nil;
28 _cellK:=nil;
29 while s <> '' do
30 begin
31 pTable:=false;
32 pCode:=false;
33 pTrace:=false;
34 if s[1] = '-' then
35 begin
36 j:=Length(s);
37 for i:=2 to Length(s) do
38 begin
39 case s[i] of
40 't':
41 pTable:=true;
42 'c':
43 pCode:=true;
44 'j':
45 pTrace:=true;
46 ' ':
47 begin
48 j:=i+1;
49 break;
50 end;
51 end;
52 end;
53 s:=Copy(s,j,Length(s));
54 end;
55 if (s[1] = '"')and(s[Length(s)] = '"') then
56 begin
57 s:=Copy(s,2,Length(s)-2);
58 end;
59 if shokai = true then
60 begin
61 _cellG:=TCellG.Create(pTable);
62 _cellV:=TCellV.Create(_cellG,pCode,pTrace);
63 _cellK:=TCellK.Create(_cellV,_cellG);
64 shokai:=false;
65 end;
66 _cellG.pTable:=pTable;
67 _cellV.pCode:=pCode;
68 _cellV.pTrace:=pTrace;
69 if _cellG.open(s,_cellV) = false then
70 begin
71 Exit;
72 end;
73 if (pTable = true)or(pCode = true)or(pTrace = true) then
74 begin
75 Writeln('--- start compilation ---');
76 end;
77 try
78 if _cellK.compile = true then
79 begin
80 _cellV.execute;
81 end else
82 begin
83 Writeln('エラー個数:'+IntToStr(_cellG.e));
84 end;
85 except
86 Writeln('エラー個数:'+IntToStr(_cellG.e));
87 end;
88 Readln(s);
89 end;
90 _cellG.Free;
91 _cellK.Free;
92 _cellV.Free;
93 end.

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26