summaryrefslogtreecommitdiff
path: root/system/std.zusatz/1.8.7/src/std analysator
blob: 7e14722ed277c2854d4d331206b608c81291c664 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
PACKET std analysator                             (* Autor : Rudolf Ruland *)
                                                  (* Stand : 06.11.86      *)
       DEFINES std analysator :
 
 
LET text code                      =  1, 
    error code                     =  2, 
    token code                     =  3; 
 
INT VAR instruction begin;
TEXT VAR unknown instruction := "";
     
PROC std analysator (INT CONST op code, TEXT VAR string,
                     INT VAR par1, par2, par3, par4, par5, par6, par7) :
 
  SELECT op code OF 
   
    CASE text code   :  analyse text 
    CASE error code  :  report errors 
    CASE token code  :  report tokens 
 
  END SELECT ;
 
  . record     :  string
  . record pos :  par1
  . width      :  par4
  . height     :  par5
  . depth      :  par6
 
  . analyse text : 
      instruction begin := record pos + 1;
      record pos := pos (record, "#", instruction begin) + 1;
      width      := 0;
      height     := 0;
      depth      := 0;
      unknown instruction := subtext (record, instruction begin, instruction end);
 
      . instruction end : record pos - 2
 
 
. error msg  :  string 
. error nr   :  par1
.
  report errors :
    IF error nr = 0
       THEN error msg := "unbekannte Anweisung (ignoriert): ";
            error msg CAT unknown instruction;
            error nr  := 1;
       ELSE error msg := "";
            error nr  := 0;
    FI;
 
 
. token text           :  string
. token nr             :  par1
. token font nr        :  par2
. token modifications  :  par3
. token width          :  par4
. token x pos          :  par5
. token y pos          :  par6
. token type           :  par7
. 
  report tokens :
 
END PROC std analysator;
 
END PACKET std analysator;