home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.pdx.edu / 2014.02.ftp.ee.pdx.edu.tar / ftp.ee.pdx.edu / pub / users / Harry / compilers / p5 / tst / p6.out.bak < prev    next >
Text File  |  2005-11-01  |  11KB  |  273 lines

  1. alreadyDefined called with 'foo1'
  2. enter          called with 'foo1'
  3. alreadyDefined called with 'foo2'
  4. enter          called with 'foo2'
  5. alreadyDefined called with 'x'
  6. enter          called with 'x'
  7. openScope      called: new level=1
  8. closeScope     called: new level=0
  9. openScope      called: new level=1
  10. alreadyDefined called with 'foo3'
  11. enter          called with 'foo3'
  12. openScope      called: new level=2
  13. alreadyDefined called with 'foo4'
  14. enter          called with 'foo4'
  15. openScope      called: new level=3
  16. closeScope     called: new level=2
  17. find           called with 'foo1'
  18. find           called with 'foo2'
  19. find           called with 'foo3'
  20. find           called with 'foo4'
  21. find           called with 'x'
  22. find           called with 'foo1'
  23. find           called with 'foo2'
  24. find           called with 'foo3'
  25. find           called with 'foo4'
  26. closeScope     called: new level=1
  27. closeScope     called: new level=0
  28. find           called with 'foo1'
  29. find           called with 'foo2'
  30. find           called with 'x'
  31. find           called with 'foo1'
  32. find           called with 'foo2'
  33. #1:   ---------- Body ----------
  34.         lineNumber=4
  35.         typeDecls=NULL
  36.         procDecls=
  37. #2:       ---------- ProcDecl ----------
  38.             lineNumber=5
  39.             id="foo1"
  40.             lexLevel=1
  41.             formals=NULL
  42.             retType=NULL
  43.             body=
  44. #3:           ---------- Body ----------
  45.                 lineNumber=6
  46.                 typeDecls=NULL
  47.                 procDecls=NULL
  48.                 varDecls=NULL
  49.                 stmts=NULL
  50.               ------------------------------
  51.           ------------------------------
  52. #4:       ---------- ProcDecl ----------
  53.             lineNumber=8
  54.             id="foo2"
  55.             lexLevel=1
  56.             formals=NULL
  57.             retType=NULL
  58.             body=
  59. #5:           ---------- Body ----------
  60.                 lineNumber=9
  61.                 typeDecls=NULL
  62.                 procDecls=
  63. #6:               ---------- ProcDecl ----------
  64.                     lineNumber=9
  65.                     id="foo3"
  66.                     lexLevel=2
  67.                     formals=NULL
  68.                     retType=NULL
  69.                     body=
  70. #7:                   ---------- Body ----------
  71.                         lineNumber=10
  72.                         typeDecls=NULL
  73.                         procDecls=
  74. #8:                       ---------- ProcDecl ----------
  75.                             lineNumber=10
  76.                             id="foo4"
  77.                             lexLevel=3
  78.                             formals=NULL
  79.                             retType=NULL
  80.                             body=
  81. #9:                           ---------- Body ----------
  82.                                 lineNumber=11
  83.                                 typeDecls=NULL
  84.                                 procDecls=NULL
  85.                                 varDecls=NULL
  86.                                 stmts=NULL
  87.                               ------------------------------
  88.                           ------------------------------
  89.                         varDecls=NULL
  90.                         stmts=
  91. #10:                      ---------- CallStmt ----------
  92.                             lineNumber=14
  93.                             id="foo1"
  94.                             args=NULL
  95.                             myDef=
  96.                               *****  This node was printed earlier (#2: ProcDecl) *****
  97.                           ------------------------------
  98. #11:                      ---------- CallStmt ----------
  99.                             lineNumber=15
  100.                             id="foo2"
  101.                             args=NULL
  102.                             myDef=
  103.                               *****  This node was printed earlier (#4: ProcDecl) *****
  104.                           ------------------------------
  105. #12:                      ---------- CallStmt ----------
  106.                             lineNumber=16
  107.                             id="foo3"
  108.                             args=NULL
  109.                             myDef=
  110.                               *****  This node was printed earlier (#6: ProcDecl) *****
  111.                           ------------------------------
  112. #13:                      ---------- CallStmt ----------
  113.                             lineNumber=17
  114.                             id="foo4"
  115.                             args=NULL
  116.                             myDef=
  117.                               *****  This node was printed earlier (#8: ProcDecl) *****
  118.                           ------------------------------
  119. #14:                      ---------- AssignStmt ----------
  120.                             lineNumber=18
  121.                             lValue=
  122. #15:                          ---------- Variable ----------
  123.                                 lineNumber=18
  124.                                 id="x"
  125.                                 myDef=
  126. #16:                              ---------- VarDecl ----------
  127.                                     lineNumber=4
  128.                                     id="x"
  129.                                     typeName=
  130. #17:                                  ---------- TypeName ----------
  131.                                         lineNumber=4
  132.                                         id="integer"
  133.                                         myDef=NULL
  134.                                       ------------------------------
  135.                                     expr=
  136. #18:                                  ---------- IntegerConst ----------
  137.                                         lineNumber=4
  138.                                         iValue=0
  139.                                       ------------------------------
  140.                                     lexLevel=0
  141.                                   ------------------------------
  142.                                 currentLevel=2
  143.                               ------------------------------
  144.                             expr=
  145. #19:                          ---------- BinaryOp ----------
  146.                                 lineNumber=18
  147.                                 op=PLUS
  148.                                 expr1=
  149. #20:                              ---------- BinaryOp ----------
  150.                                     lineNumber=18
  151.                                     op=PLUS
  152.                                     expr1=
  153. #21:                                  ---------- BinaryOp ----------
  154.                                         lineNumber=18
  155.                                         op=PLUS
  156.                                         expr1=
  157. #22:                                      ---------- FunctionCall ----------
  158.                                             lineNumber=18
  159.                                             id="foo1"
  160.                                             args=NULL
  161.                                             myDef=
  162.                                               *****  This node was printed earlier (#2: ProcDecl) *****
  163.                                           ------------------------------
  164.                                         expr2=
  165. #23:                                      ---------- FunctionCall ----------
  166.                                             lineNumber=18
  167.                                             id="foo2"
  168.                                             args=NULL
  169.                                             myDef=
  170.                                               *****  This node was printed earlier (#4: ProcDecl) *****
  171.                                           ------------------------------
  172.                                       ------------------------------
  173.                                     expr2=
  174. #24:                                  ---------- FunctionCall ----------
  175.                                         lineNumber=18
  176.                                         id="foo3"
  177.                                         args=NULL
  178.                                         myDef=
  179.                                           *****  This node was printed earlier (#6: ProcDecl) *****
  180.                                       ------------------------------
  181.                                   ------------------------------
  182.                                 expr2=
  183. #25:                              ---------- FunctionCall ----------
  184.                                     lineNumber=18
  185.                                     id="foo4"
  186.                                     args=NULL
  187.                                     myDef=
  188.                                       *****  This node was printed earlier (#8: ProcDecl) *****
  189.                                   ------------------------------
  190.                               ------------------------------
  191.                           ------------------------------
  192.                       ------------------------------
  193.                   ------------------------------
  194.                 varDecls=NULL
  195.                 stmts=NULL
  196.               ------------------------------
  197.           ------------------------------
  198.         varDecls=
  199.           *****  This node was printed earlier (#16: VarDecl) *****
  200.         stmts=
  201. #26:      ---------- CallStmt ----------
  202.             lineNumber=23
  203.             id="foo1"
  204.             args=NULL
  205.             myDef=
  206.               *****  This node was printed earlier (#2: ProcDecl) *****
  207.           ------------------------------
  208. #27:      ---------- CallStmt ----------
  209.             lineNumber=24
  210.             id="foo2"
  211.             args=NULL
  212.             myDef=
  213.               *****  This node was printed earlier (#4: ProcDecl) *****
  214.           ------------------------------
  215. #28:      ---------- AssignStmt ----------
  216.             lineNumber=25
  217.             lValue=
  218. #29:          ---------- Variable ----------
  219.                 lineNumber=25
  220.                 id="x"
  221.                 myDef=
  222.                   *****  This node was printed earlier (#16: VarDecl) *****
  223.                 currentLevel=0
  224.               ------------------------------
  225.             expr=
  226. #30:          ---------- BinaryOp ----------
  227.                 lineNumber=25
  228.                 op=PLUS
  229.                 expr1=
  230. #31:              ---------- FunctionCall ----------
  231.                     lineNumber=25
  232.                     id="foo1"
  233.                     args=NULL
  234.                     myDef=
  235.                       *****  This node was printed earlier (#2: ProcDecl) *****
  236.                   ------------------------------
  237.                 expr2=
  238. #32:              ---------- FunctionCall ----------
  239.                     lineNumber=25
  240.                     id="foo2"
  241.                     args=NULL
  242.                     myDef=
  243.                       *****  This node was printed earlier (#4: ProcDecl) *****
  244.                   ------------------------------
  245.               ------------------------------
  246.           ------------------------------
  247.       ------------------------------
  248. PROGRAM IS
  249.     VAR
  250.         x: integer := 0;
  251.     PROCEDURE foo1 () IS
  252.         BEGIN
  253.         END;
  254.     PROCEDURE foo2 () IS
  255.         PROCEDURE foo3 () IS
  256.             PROCEDURE foo4 () IS
  257.                 BEGIN
  258.                 END;
  259.             BEGIN
  260.                 foo1 ();
  261.                 foo2 ();
  262.                 foo3 ();
  263.                 foo4 ();
  264.                 x := (((foo1 () + foo2 ()) + foo3 ()) + foo4 ());
  265.             END;
  266.         BEGIN
  267.         END;
  268.     BEGIN
  269.         foo1 ();
  270.         foo2 ();
  271.         x := (foo1 () + foo2 ());
  272.     END;
  273.