|
Last change
on this file was 104, checked in by chronos, 9 years ago |
- Added: Interpreter4 which should later interpret code of interpreter3.
- Added: Parsing uses section and units in additional files.
- Added: Parsing user defined structured types.
|
|
File size:
401 bytes
|
| Line | |
|---|
| 1 | program interpreter;
|
|---|
| 2 |
|
|---|
| 3 | {$mode delphi}
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Execute, Source, Parser;
|
|---|
| 7 |
|
|---|
| 8 | var
|
|---|
| 9 | ProgramCode: TProgramCode;
|
|---|
| 10 | begin
|
|---|
| 11 | FillChar(ProgramCode, SizeOf(TProgramCode), 0);
|
|---|
| 12 |
|
|---|
| 13 | WriteLn('Parsing started');
|
|---|
| 14 | ProgramCode.BaseDir := '../interpreter3';
|
|---|
| 15 | ParseProgram(@ProgramCode);
|
|---|
| 16 | WriteLn('Parsing finished');
|
|---|
| 17 |
|
|---|
| 18 | WriteLn('Execution started');
|
|---|
| 19 | ExecuteProgram(@ProgramCode);
|
|---|
| 20 | WriteLn('Execution finished');
|
|---|
| 21 | end.
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.