home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 20 / AACD20.BIN / AACD / Programming / Jikes / Source / src / ast.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-24  |  72.9 KB  |  2,355 lines

  1. // $Id: ast.cpp,v 1.27 2001/01/10 16:49:43 mdejong Exp $
  2. //
  3. // This software is subject to the terms of the IBM Jikes Compiler
  4. // License Agreement available at the following URL:
  5. // http://www.ibm.com/research/jikes.
  6. // Copyright (C) 1996, 1998, International Business Machines Corporation
  7. // and others.  All Rights Reserved.
  8. // You must accept the terms of that agreement to use this software.
  9. //
  10.  
  11. #include "ast.h"
  12.  
  13. #ifdef    HAVE_JIKES_NAMESPACE
  14. namespace Jikes {    // Open namespace Jikes block
  15. #endif
  16.  
  17. #ifdef JIKES_DEBUG
  18.     unsigned Ast::count = 0;
  19. #endif
  20.  
  21. //
  22. // Allocate another block of storage for the VariableSymbol array.
  23. //
  24. void VariableSymbolArray::AllocateMoreSpace()
  25. {
  26.     //
  27.     //
  28.     // The variable size always indicates the maximum number of
  29.     // elements that has been allocated for the array.
  30.     // Initially, it is set to 0 to indicate that the array is empty.
  31.     // The pool of available elements is divided into segments of size
  32.     // 2**log_blksize each. Each segment is pointed to by a slot in
  33.     // the array base.
  34.     //
  35.     // By dividing size by the size of the segment we obtain the
  36.     // index for the next segment in base. If base is full, it is
  37.     // reallocated.
  38.     //
  39.     //
  40.     size_t k = size >> log_blksize; /* which segment? */
  41.  
  42.     //
  43.     // If the base is overflowed, reallocate it and initialize the new elements to NULL.
  44.     //
  45.     if (k == base_size)
  46.     {
  47.         int old_base_size = base_size;
  48.         T **old_base = base;
  49.  
  50.         base_size += base_increment;
  51.  
  52.         assert(base_size <= pool -> Blksize()); // There must be enough room to allocate base
  53.  
  54.         base = (T **) pool -> Alloc(sizeof(T *) * base_size);
  55.  
  56.         if (old_base != NULL)
  57.         {
  58.             memmove(base, old_base, old_base_size * sizeof(T *));
  59. // STG:
  60. //                delete [] old_base;
  61.         }
  62.         memset(&base[old_base_size], 0, (base_size - old_base_size) * sizeof(T *));
  63.     }
  64.  
  65.     //
  66.     // We allocate a new segment and place its adjusted address in
  67.     // base[k]. The adjustment allows us to index the segment directly,
  68.     // instead of having to perform a subtraction for each reference.
  69.     // See operator[] below.
  70.     //
  71.     assert(Blksize() <= pool -> Blksize()); // There must be enough room to allocate block
  72.  
  73.     base[k] = (T *) pool -> Alloc(sizeof(T) * Blksize());
  74.     base[k] -= size;
  75.  
  76.     //
  77.     // Finally, we update size.
  78.     //
  79.     size += Blksize();
  80.  
  81.     return;
  82. }
  83.  
  84.  
  85. VariableSymbolArray::VariableSymbolArray(StoragePool *pool_, unsigned estimate = 0) : pool(pool_)
  86. {
  87.     assert(pool -> Blksize() >= 256); // There must be enough space in the storage pool to move !!!
  88.  
  89.     if (estimate == 0)
  90.         log_blksize = 6; // take a guess
  91.     else
  92.     {
  93.         for (log_blksize = 1; (((unsigned) 1 << log_blksize) < estimate) && (log_blksize < 31); log_blksize++)
  94.             ;
  95.     }
  96.  
  97.     //
  98.     // Increment a base_increment size that is big enough not to have to
  99.     // be reallocated. Find a block size that is smaller that the block
  100.     // size of the pool.
  101.     //
  102.     base_increment = (Blksize() > pool -> Blksize() ? Blksize() / pool -> Blksize() : 1) * 2;
  103.     while (Blksize() >= pool -> Blksize())
  104.         log_blksize--;
  105.  
  106.     base_size = 0;
  107.     size = 0;
  108.     top = 0;
  109.     base = NULL;
  110. }
  111.  
  112.  
  113. void AstCompilationUnit::FreeAst()
  114. {
  115.      delete ast_pool;
  116. }
  117.  
  118. //
  119. // This procedure uses a  quick sort algorithm to sort the cases
  120. // in a switch statement.
  121. //
  122. void AstSwitchStatement::SortCases()
  123. {
  124.     int lower,
  125.         upper,
  126.         lostack[32],
  127.         histack[32];
  128.  
  129.     int top,
  130.         i,
  131.         j;
  132.  
  133.     CaseElement pivot, temp;
  134.  
  135.     AstArray<CaseElement *> &map = *cases;
  136.  
  137.     top = 0;
  138.     lostack[top] = 0;
  139.     histack[top] = map.Length() - 1;
  140.  
  141.     while(top >= 0)
  142.     {
  143.         lower = lostack[top];
  144.         upper = histack[top];
  145.         top--;
  146.  
  147.         while(upper > lower)
  148.         {
  149.             //
  150.             // The array is most-likely almost sorted. Therefore,
  151.             // we use the middle element as the pivot element.
  152.             //
  153.             i = (lower + upper) / 2;
  154.             pivot = *map[i];
  155.             *map[i] = *map[lower];
  156.  
  157.             //
  158.             // Split the array section indicated by LOWER and UPPER
  159.             // using ARRAY(LOWER) as the pivot.
  160.             //
  161.             i = lower;
  162.             for (j = lower + 1; j <= upper; j++)
  163.                 if (map[j] -> Value() < pivot.Value() ||
  164.                     (map[j] -> Value() == pivot.Value() && map[j] -> index < pivot.index)) // keep the sort stable
  165.                 {
  166.                     temp = *map[++i];
  167.                     *map[i] = *map[j];
  168.                     *map[j] = temp;
  169.                 }
  170.             *map[lower] = *map[i];
  171.             *map[i] = pivot;
  172.  
  173.             top++;
  174.             if ((i - lower) < (upper - i))
  175.             {
  176.                 lostack[top] = i + 1;
  177.                 histack[top] = upper;
  178.                 upper = i - 1;
  179.             }
  180.             else
  181.             {
  182.                 histack[top] = i - 1;
  183.                 lostack[top] = lower;
  184.                 lower = i + 1;
  185.             }
  186.         }
  187.     }
  188.  
  189.     return;
  190. }
  191.  
  192.  
  193. Ast *Ast::Clone(StoragePool *ast_pool)
  194. {
  195.     return (Ast *) NULL;
  196. }
  197.  
  198. Ast *AstBlock::Clone(StoragePool *ast_pool)
  199. {
  200.     AstBlock *clone = ast_pool -> GenBlock();
  201.  
  202.     for (int i = 0; i < this -> NumLabels(); i++)
  203.         clone -> AddLabel(this -> Label(i));
  204.     clone -> nesting_level = this -> nesting_level;
  205.     clone -> left_brace_token = this -> left_brace_token;
  206.     if (this -> NumStatements() == 0)
  207.         clone -> block_statements = NULL;
  208.     else
  209.     {
  210.         for (int j = 0; j < this -> NumStatements(); j++)
  211.             clone -> AddStatement(this -> Statement(j) -> Clone(ast_pool));
  212.     }
  213.     clone -> right_brace_token = this -> right_brace_token;
  214.  
  215.     return clone;
  216. }
  217.  
  218. Ast *AstPrimitiveType::Clone(StoragePool *ast_pool)
  219. {
  220.     AstPrimitiveType *clone = ast_pool -> GenPrimitiveType(this -> kind, this -> primitive_kind_token);
  221.  
  222.     return clone;
  223. }
  224.  
  225. Ast *AstArrayType::Clone(StoragePool *ast_pool)
  226. {
  227.     AstArrayType *clone = ast_pool -> GenArrayType();
  228.  
  229.     clone -> type = this -> type -> Clone(ast_pool);
  230.     clone -> AllocateBrackets(this -> NumBrackets());
  231.     for (int i = 0; i < this -> NumBrackets(); i++)
  232.         clone -> AddBrackets((AstBrackets *) this -> Brackets(i) -> Clone(ast_pool));
  233.  
  234.     return clone;
  235. }
  236.  
  237. Ast *AstSimpleName::Clone(StoragePool *ast_pool)
  238. {
  239.     AstSimpleName *clone = ast_pool -> GenSimpleName(this -> identifier_token);
  240.     clone -> resolution_opt = (AstExpression *) (this -> resolution_opt ? this -> resolution_opt -> Clone(ast_pool) : NULL);
  241.  
  242.     return clone;
  243. }
  244.  
  245. Ast *AstPackageDeclaration::Clone(StoragePool *ast_pool)
  246. {
  247.     AstPackageDeclaration *clone = ast_pool -> GenPackageDeclaration();
  248.  
  249.     clone -> package_token = this -> package_token;
  250.     clone -> name = (AstExpression *) this -> name -> Clone(ast_pool);
  251.     clone -> semicolon_token = this -> semicolon_token;
  252.  
  253.     return clone;
  254. }
  255.  
  256. Ast *AstImportDeclaration::Clone(StoragePool *ast_pool)
  257. {
  258.     AstImportDeclaration *clone = ast_pool -> GenImportDeclaration();
  259.  
  260.     clone -> import_token = this -> import_token;
  261.     clone -> name = (AstExpression *) this -> name -> Clone(ast_pool);
  262.     clone -> star_token_opt = this -> star_token_opt;
  263.     clone -> semicolon_token = this -> semicolon_token;
  264.  
  265.     return clone;
  266. }
  267.  
  268. Ast *AstCompilationUnit::Clone(StoragePool *ast_pool)
  269. {
  270.     AstCompilationUnit *clone = ast_pool -> GenCompilationUnit();
  271.  
  272.     clone -> package_declaration_opt = (AstPackageDeclaration *)
  273.                                        (this -> package_declaration_opt
  274.                                               ? this -> package_declaration_opt -> Clone(ast_pool) : NULL);
  275.     for (int i = 0; i < this -> NumImportDeclarations(); i++)
  276.         clone -> AddImportDeclaration((AstImportDeclaration *) this -> ImportDeclaration(i) -> Clone(ast_pool));
  277.     for (int k = 0; k < this -> NumTypeDeclarations(); k++)
  278.         clone -> AddTypeDeclaration(this -> TypeDeclaration(k) -> Clone(ast_pool));
  279.  
  280.     return clone;
  281. }
  282.  
  283. Ast *AstModifier::Clone(StoragePool *ast_pool)
  284. {
  285.     AstModifier *clone = ast_pool -> GenModifier(this -> kind, this -> modifier_kind_token);
  286.  
  287.     return clone;
  288. }
  289.  
  290. Ast *AstEmptyDeclaration::Clone(StoragePool *ast_pool)
  291. {
  292.     AstEmptyDeclaration *clone = ast_pool -> GenEmptyDeclaration(this -> semicolon_token);
  293.  
  294.     return clone;
  295. }
  296.  
  297. Ast *AstClassBody::Clone(StoragePool *ast_pool)
  298. {
  299.     AstClassBody *clone = ast_pool -> GenClassBody();
  300.  
  301.     clone -> left_brace_token = this -> left_brace_token;
  302.     for (int i = 0; i < this -> NumClassBodyDeclarations(); i++)
  303.         clone -> AddClassBodyDeclaration(this -> ClassBodyDeclaration(i) -> Clone(ast_pool));
  304.     clone -> right_brace_token = this -> right_brace_token;
  305.  
  306.     return clone;
  307. }
  308.  
  309. Ast *AstClassDeclaration::Clone(StoragePool *ast_pool)
  310. {
  311.     AstClassDeclaration *clone = ast_pool -> GenClassDeclaration();
  312.  
  313.     for (int i = 0; i < this -> NumClassModifiers(); i++)
  314.         clone -> AddClassModifier((AstModifier *) this -> ClassModifier(i) -> Clone(ast_pool));
  315.     clone -> class_token = this -> class_token;
  316.     clone -> identifier_token = this -> identifier_token;
  317.     clone -> super_opt = (Ast *) (this -> super_opt ? this -> super_opt -> Clone(ast_pool) : NULL);
  318.     for (int k = 0; k < this -> NumInterfaces(); k++)
  319.         clone -> AddInterface((AstExpression *) this -> Interface(k) -> Clone(ast_pool));
  320.     clone -> class_body = (AstClassBody *) this -> class_body -> Clone(ast_pool);
  321.  
  322.     return clone;
  323. }
  324.  
  325. Ast *AstArrayInitializer::Clone(StoragePool *ast_pool)
  326. {
  327.     AstArrayInitializer *clone = ast_pool -> GenArrayInitializer();
  328.  
  329.     clone -> left_brace_token = this -> left_brace_token;
  330.     for (int k = 0; k < this -> NumVariableInitializers(); k++)
  331.         clone -> AddVariableInitializer(this -> VariableInitializer(k) -> Clone(ast_pool));
  332.     clone -> right_brace_token = this -> right_brace_token;
  333.  
  334.     return clone;
  335. }
  336.  
  337. Ast *AstBrackets::Clone(StoragePool *ast_pool)
  338. {
  339.     AstBrackets *clone = ast_pool -> GenBrackets(this -> left_bracket_token, this -> right_bracket_token);
  340.  
  341.     return clone;
  342. }
  343.  
  344. Ast *AstVariableDeclaratorId::Clone(StoragePool *ast_pool)
  345. {
  346.     AstVariableDeclaratorId *clone = ast_pool -> GenVariableDeclaratorId();
  347.  
  348.     clone -> identifier_token = this -> identifier_token;
  349.     clone -> AllocateBrackets(this -> NumBrackets());
  350.     for (int i = 0; i < this -> NumBrackets(); i++)
  351.         clone -> AddBrackets((AstBrackets *) this -> Brackets(i) -> Clone(ast_pool));
  352.  
  353.     return clone;
  354. }
  355.  
  356. Ast *AstVariableDeclarator::Clone(StoragePool *ast_pool)
  357. {
  358.     AstVariableDeclarator *clone = ast_pool -> GenVariableDeclarator();
  359.  
  360.     clone -> variable_declarator_name = (AstVariableDeclaratorId *) this -> variable_declarator_name -> Clone(ast_pool);
  361.     clone -> variable_initializer_opt = (Ast *) (this -> variable_initializer_opt
  362.                                                        ? this -> variable_initializer_opt -> Clone(ast_pool)
  363.                                                        : NULL);
  364.  
  365.     return clone;
  366. }
  367.  
  368. Ast *AstFieldDeclaration::Clone(StoragePool *ast_pool)
  369. {
  370.     AstFieldDeclaration *clone = ast_pool -> GenFieldDeclaration();
  371.  
  372.     for (int i = 0; i < this -> NumVariableModifiers(); i++)
  373.         clone -> AddVariableModifier((AstModifier *) this -> VariableModifier(i) -> Clone(ast_pool));
  374.     clone -> type = this -> type -> Clone(ast_pool);
  375.     for (int k = 0; k < this -> NumVariableDeclarators(); k++)
  376.         clone -> AddVariableDeclarator((AstVariableDeclarator *) this -> VariableDeclarator(k) -> Clone(ast_pool));
  377.     clone -> semicolon_token = this -> semicolon_token;
  378.  
  379.     return clone;
  380. }
  381.  
  382. Ast *AstFormalParameter::Clone(StoragePool *ast_pool)
  383. {
  384.     AstFormalParameter *clone = ast_pool -> GenFormalParameter();
  385.  
  386.     if (this -> NumParameterModifiers() == 0)
  387.         clone -> parameter_modifiers = NULL;
  388.     else
  389.     {
  390.         for (int i = 0; i < this -> NumParameterModifiers(); i++)
  391.             clone -> AddParameterModifier((AstModifier *) this -> ParameterModifier(i) -> Clone(ast_pool));
  392.     }
  393.     clone -> type = this -> type -> Clone(ast_pool);
  394.     clone -> formal_declarator = (AstVariableDeclarator *) this -> formal_declarator -> Clone(ast_pool);
  395.  
  396.     return clone;
  397. }
  398.  
  399. Ast *AstMethodDeclarator::Clone(StoragePool *ast_pool)
  400. {
  401.     AstMethodDeclarator *clone = ast_pool -> GenMethodDeclarator();
  402.  
  403.     clone -> identifier_token = this -> identifier_token;
  404.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  405.     clone -> AllocateFormalParameters(this -> NumFormalParameters());
  406.     for (int i = 0; i < this -> NumFormalParameters(); i++)
  407.         clone -> AddFormalParameter((AstFormalParameter *) this -> FormalParameter(i) -> Clone(ast_pool));
  408.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  409.     clone -> AllocateBrackets(this -> NumBrackets());
  410.     for (int k = 0; k < this -> NumBrackets(); k++)
  411.         clone -> AddBrackets((AstBrackets *) this -> Brackets(k) -> Clone(ast_pool));
  412.  
  413.     return clone;
  414. }
  415.  
  416. Ast *AstMethodDeclaration::Clone(StoragePool *ast_pool)
  417. {
  418.     AstMethodDeclaration *clone = ast_pool -> GenMethodDeclaration();
  419.  
  420.     for (int i = 0; i < this -> NumMethodModifiers(); i++)
  421.         clone -> AddMethodModifier((AstModifier *) this -> MethodModifier(i) -> Clone(ast_pool));
  422.     clone -> type = this -> type -> Clone(ast_pool);
  423.     clone -> method_declarator = (AstMethodDeclarator *) this -> method_declarator -> Clone(ast_pool);
  424.     for (int k = 0; k < this -> NumThrows(); k++)
  425.         clone -> AddThrow((AstExpression *) this -> Throw(k) -> Clone(ast_pool));
  426.     clone -> method_body = (AstStatement *) this -> method_body -> Clone(ast_pool);
  427.  
  428.     return clone;
  429. }
  430.  
  431. Ast *AstStaticInitializer::Clone(StoragePool *ast_pool)
  432. {
  433.     AstStaticInitializer *clone = ast_pool -> GenStaticInitializer();
  434.  
  435.     clone -> static_token = this -> static_token;
  436.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  437.  
  438.     return clone;
  439. }
  440.  
  441. Ast *AstThisCall::Clone(StoragePool *ast_pool)
  442. {
  443.     AstThisCall *clone = ast_pool -> GenThisCall();
  444.  
  445.     clone -> this_token = this -> this_token;
  446.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  447.     clone -> AllocateArguments(this -> NumArguments());
  448.     for (int i = 0; i < this -> NumArguments(); i++)
  449.         clone -> AddArgument((AstExpression *) this -> Argument(i) -> Clone(ast_pool));
  450.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  451.     clone -> semicolon_token = this -> semicolon_token;
  452.  
  453.     return clone;
  454. }
  455.  
  456. Ast *AstSuperCall::Clone(StoragePool *ast_pool)
  457. {
  458.     AstSuperCall *clone = ast_pool -> GenSuperCall();
  459.  
  460.     clone -> base_opt = (AstExpression *) (this -> base_opt ? this -> base_opt -> Clone(ast_pool) : NULL);
  461.     clone -> dot_token_opt = this -> dot_token_opt;
  462.     clone -> super_token = this -> super_token;
  463.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  464.     clone -> AllocateArguments(this -> NumArguments());
  465.     for (int i = 0; i < this -> NumArguments(); i++)
  466.         clone -> AddArgument((AstExpression *) this -> Argument(i) -> Clone(ast_pool));
  467.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  468.     clone -> semicolon_token = this -> semicolon_token;
  469.     clone -> AllocateLocalArguments(this -> NumLocalArguments());
  470.     for (int k = 0; k < this -> NumLocalArguments(); k++)
  471.         clone -> AddLocalArgument((AstExpression *) this -> LocalArgument(k) -> Clone(ast_pool));
  472.  
  473.     return clone;
  474. }
  475.  
  476. Ast *AstConstructorBlock::Clone(StoragePool *ast_pool)
  477. {
  478.     AstConstructorBlock *clone = ast_pool -> GenConstructorBlock();
  479.  
  480.     clone -> left_brace_token = this -> left_brace_token;
  481.     clone -> explicit_constructor_invocation_opt = (Ast *)
  482.                                                    (this -> explicit_constructor_invocation_opt
  483.                                                           ? this -> explicit_constructor_invocation_opt -> Clone(ast_pool)
  484.                                                           : NULL);
  485.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  486.     clone -> right_brace_token = this -> right_brace_token;
  487.  
  488.     return clone;
  489. }
  490.  
  491. Ast *AstConstructorDeclaration::Clone(StoragePool *ast_pool)
  492. {
  493.     AstConstructorDeclaration *clone = ast_pool -> GenConstructorDeclaration();
  494.  
  495.     for (int i = 0; i < this -> NumConstructorModifiers(); i++)
  496.         clone -> AddConstructorModifier((AstModifier *) this -> ConstructorModifier(i) -> Clone(ast_pool));
  497.     clone -> constructor_declarator = (AstMethodDeclarator *) this -> constructor_declarator -> Clone(ast_pool);
  498.     for (int k = 0; k < this -> NumThrows(); k++)
  499.         clone -> AddThrow((AstExpression *) this -> Throw(k) -> Clone(ast_pool));
  500.     clone -> constructor_body = (AstConstructorBlock *) this -> constructor_body -> Clone(ast_pool);
  501.  
  502.     return clone;
  503. }
  504.  
  505. Ast *AstInterfaceDeclaration::Clone(StoragePool *ast_pool)
  506. {
  507.     AstInterfaceDeclaration *clone = ast_pool -> GenInterfaceDeclaration();
  508.  
  509.     for (int i = 0; i < this -> NumInterfaceModifiers(); i++)
  510.         clone -> AddInterfaceModifier((AstModifier *) this -> InterfaceModifier(i) -> Clone(ast_pool));
  511.     clone -> interface_token = this -> interface_token;
  512.     clone -> identifier_token = this -> identifier_token;
  513.     for (int k = 0; k < this -> NumExtendsInterfaces(); k++)
  514.         clone -> AddExtendsInterface((AstExpression *) this -> ExtendsInterface(k) -> Clone(ast_pool));
  515.     clone -> left_brace_token = this -> left_brace_token;
  516.     for (int l = 0; l < this -> NumExtendsInterfaces(); l++)
  517.         clone -> AddInterfaceMemberDeclaration((AstExpression *) this -> InterfaceMemberDeclaration(l) -> Clone(ast_pool));
  518.     clone -> right_brace_token = this -> right_brace_token;
  519.  
  520.     return clone;
  521. }
  522.  
  523. Ast *AstLocalVariableDeclarationStatement::Clone(StoragePool *ast_pool)
  524. {
  525.     AstLocalVariableDeclarationStatement *clone = ast_pool -> GenLocalVariableDeclarationStatement();
  526.  
  527.     for (int i = 0; i < this -> NumLocalModifiers(); i++)
  528.         clone -> AddLocalModifier((AstModifier *) this -> LocalModifier(i) -> Clone(ast_pool));
  529.     clone -> type = this -> type -> Clone(ast_pool);
  530.     for (int k = 0; k < this -> NumVariableDeclarators(); k++)
  531.         clone -> AddVariableDeclarator((AstVariableDeclarator *) this -> VariableDeclarator(k) -> Clone(ast_pool));
  532.     clone -> semicolon_token_opt = this -> semicolon_token_opt;
  533.  
  534.     return clone;
  535. }
  536.  
  537. Ast *AstIfStatement::Clone(StoragePool *ast_pool)
  538. {
  539.     AstIfStatement *clone = ast_pool -> GenIfStatement();
  540.  
  541.     clone -> if_token = this -> if_token;
  542.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  543.     clone -> true_statement = (AstStatement *) this -> true_statement -> Clone(ast_pool);
  544.     clone -> false_statement_opt = (AstStatement *)
  545.                                    (this -> false_statement_opt
  546.                                           ? this -> false_statement_opt -> Clone(ast_pool)
  547.                                           : NULL);
  548.  
  549.     return clone;
  550. }
  551.  
  552. Ast *AstEmptyStatement::Clone(StoragePool *ast_pool)
  553. {
  554.     AstEmptyStatement *clone = ast_pool -> GenEmptyStatement(this -> semicolon_token);
  555.  
  556.     return clone;
  557. }
  558.  
  559. Ast *AstExpressionStatement::Clone(StoragePool *ast_pool)
  560. {
  561.     AstExpressionStatement *clone = ast_pool -> GenExpressionStatement();
  562.  
  563.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  564.     clone -> semicolon_token_opt = this -> semicolon_token_opt;
  565.  
  566.     return clone;
  567. }
  568.  
  569. Ast *AstCaseLabel::Clone(StoragePool *ast_pool)
  570. {
  571.     AstCaseLabel *clone = ast_pool -> GenCaseLabel();
  572.  
  573.     clone -> case_token = this -> case_token;
  574.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  575.     clone -> colon_token = this -> colon_token;
  576.     clone -> map_index = this -> map_index;
  577.  
  578.     return clone;
  579. }
  580.  
  581. Ast *AstDefaultLabel::Clone(StoragePool *ast_pool)
  582. {
  583.     AstDefaultLabel *clone = ast_pool -> GenDefaultLabel();
  584.  
  585.     clone -> default_token = this -> default_token;
  586.     clone -> colon_token = this -> colon_token;
  587.  
  588.     return clone;
  589. }
  590.  
  591. Ast *AstSwitchBlockStatement::Clone(StoragePool *ast_pool)
  592. {
  593.     AstSwitchBlockStatement *clone = ast_pool -> GenSwitchBlockStatement();
  594.  
  595.     clone -> AllocateSwitchLabels(this -> NumSwitchLabels());
  596.     for (int i = 0; i < this -> NumSwitchLabels(); i++)
  597.         clone -> AddSwitchLabel(this -> SwitchLabel(i) -> Clone(ast_pool));
  598.  
  599.     clone -> AllocateBlockStatements(this -> NumStatements());
  600.     for (int k = 0; k < this -> NumStatements(); k++)
  601.         clone -> AddStatement((AstStatement *) this -> Statement(k) -> Clone(ast_pool));
  602.  
  603.     return clone;
  604. }
  605.  
  606. Ast *AstSwitchStatement::Clone(StoragePool *ast_pool)
  607. {
  608.     AstSwitchStatement *clone = ast_pool -> GenSwitchStatement();
  609.  
  610.     clone -> switch_token = this -> switch_token;
  611.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  612.     clone -> switch_block = (AstBlock *) this -> switch_block -> Clone(ast_pool);
  613.  
  614.     return clone;
  615. }
  616.  
  617. Ast *AstWhileStatement::Clone(StoragePool *ast_pool)
  618. {
  619.     AstWhileStatement *clone = ast_pool -> GenWhileStatement();
  620.  
  621.     clone -> while_token = this -> while_token;
  622.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  623.     clone -> statement = (AstStatement *) this -> statement -> Clone(ast_pool);
  624.  
  625.     return clone;
  626. }
  627.  
  628. Ast *AstDoStatement::Clone(StoragePool *ast_pool)
  629. {
  630.     AstDoStatement *clone = ast_pool -> GenDoStatement();
  631.  
  632.     clone -> do_token = this -> do_token;
  633.     clone -> statement = (AstStatement *) this -> statement -> Clone(ast_pool);
  634.     clone -> while_token = this -> while_token;
  635.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  636.     clone -> semicolon_token = this -> semicolon_token;
  637.  
  638.     return clone;
  639. }
  640.  
  641. Ast *AstForStatement::Clone(StoragePool *ast_pool)
  642. {
  643.     AstForStatement *clone = ast_pool -> GenForStatement();
  644.  
  645.     clone -> for_token = this -> for_token;
  646.     for (int i = 0; i < this -> NumForInitStatements(); i++)
  647.         clone -> AddForInitStatement((AstStatement *) this -> ForInitStatement(i) -> Clone(ast_pool));
  648.     clone -> end_expression_opt = (AstExpression *)
  649.                                   (this -> end_expression_opt
  650.                                          ? this -> end_expression_opt -> Clone(ast_pool)
  651.                                          : NULL);
  652.     for (int k = 0; k < this -> NumForUpdateStatements(); k++)
  653.         clone -> AddForUpdateStatement((AstExpressionStatement *) this -> ForUpdateStatement(k) -> Clone(ast_pool));
  654.     clone -> statement = (AstStatement *) this -> statement -> Clone(ast_pool);
  655.  
  656.     return clone;
  657. }
  658.  
  659. Ast *AstBreakStatement::Clone(StoragePool *ast_pool)
  660. {
  661.     AstBreakStatement *clone = ast_pool -> GenBreakStatement();
  662.  
  663.     clone -> break_token = this -> break_token;
  664.     clone -> identifier_token_opt = this -> identifier_token_opt;
  665.     clone -> semicolon_token = this -> semicolon_token;
  666.     clone -> nesting_level = this -> nesting_level;
  667.  
  668.     return clone;
  669. }
  670.  
  671. Ast *AstContinueStatement::Clone(StoragePool *ast_pool)
  672. {
  673.     AstContinueStatement *clone = ast_pool -> GenContinueStatement();
  674.  
  675.     clone -> continue_token = this -> continue_token;
  676.     clone -> identifier_token_opt = this -> identifier_token_opt;
  677.     clone -> semicolon_token = this -> semicolon_token;
  678.     clone -> nesting_level = this -> nesting_level;
  679.  
  680.     return clone;
  681. }
  682.  
  683. Ast *AstReturnStatement::Clone(StoragePool *ast_pool)
  684. {
  685.     AstReturnStatement *clone = ast_pool -> GenReturnStatement();
  686.  
  687.     clone -> return_token = this -> return_token;
  688.     clone -> expression_opt = (AstExpression *) (this -> expression_opt ? this -> expression_opt -> Clone(ast_pool) : NULL);
  689.     clone -> semicolon_token = this -> semicolon_token;
  690.  
  691.     return clone;
  692. }
  693.  
  694. Ast *AstThrowStatement::Clone(StoragePool *ast_pool)
  695. {
  696.     AstThrowStatement *clone = ast_pool -> GenThrowStatement();
  697.  
  698.     clone -> throw_token = this -> throw_token;
  699.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  700.     clone -> semicolon_token = this -> semicolon_token;
  701.  
  702.     return clone;
  703. }
  704.  
  705. Ast *AstSynchronizedStatement::Clone(StoragePool *ast_pool)
  706. {
  707.     AstSynchronizedStatement *clone = ast_pool -> GenSynchronizedStatement();
  708.  
  709.     clone -> synchronized_token = this -> synchronized_token;
  710.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  711.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  712.  
  713.     return clone;
  714. }
  715.  
  716. Ast *AstCatchClause::Clone(StoragePool *ast_pool)
  717. {
  718.     AstCatchClause *clone = ast_pool -> GenCatchClause();
  719.  
  720.     clone -> catch_token = this -> catch_token;
  721.     clone -> formal_parameter = (AstFormalParameter *) this -> formal_parameter -> Clone(ast_pool);
  722.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  723.  
  724.     return clone;
  725. }
  726.  
  727. Ast *AstFinallyClause::Clone(StoragePool *ast_pool)
  728. {
  729.     AstFinallyClause *clone = ast_pool -> GenFinallyClause();
  730.  
  731.     clone -> finally_token = this -> finally_token;
  732.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  733.  
  734.     return clone;
  735. }
  736.  
  737. Ast *AstTryStatement::Clone(StoragePool *ast_pool)
  738. {
  739.     AstTryStatement *clone = ast_pool -> GenTryStatement();
  740.  
  741.     clone -> try_token = this -> try_token;
  742.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  743.     for (int k = 0; k < this -> NumCatchClauses(); k++)
  744.         clone -> AddCatchClause((AstCatchClause *) this -> CatchClause(k) -> Clone(ast_pool));
  745.     clone -> finally_clause_opt = (AstFinallyClause *)
  746.                                   (this -> finally_clause_opt
  747.                                          ? this -> finally_clause_opt -> Clone(ast_pool)
  748.                                          : NULL);
  749.  
  750.     return clone;
  751. }
  752.  
  753. Ast *AstIntegerLiteral::Clone(StoragePool *ast_pool)
  754. {
  755.     AstIntegerLiteral *clone = ast_pool -> GenIntegerLiteral(this -> integer_literal_token);
  756.  
  757.     return clone;
  758. }
  759.  
  760. Ast *AstLongLiteral::Clone(StoragePool *ast_pool)
  761. {
  762.     AstLongLiteral *clone = ast_pool -> GenLongLiteral(this -> long_literal_token);
  763.  
  764.     return clone;
  765. }
  766.  
  767. Ast *AstFloatingPointLiteral::Clone(StoragePool *ast_pool)
  768. {
  769.     AstFloatingPointLiteral *clone = ast_pool -> GenFloatingPointLiteral(this -> floating_point_literal_token);
  770.  
  771.     return clone;
  772. }
  773.  
  774. Ast *AstDoubleLiteral::Clone(StoragePool *ast_pool)
  775. {
  776.     AstDoubleLiteral *clone = ast_pool -> GenDoubleLiteral(this -> double_literal_token);
  777.  
  778.     return clone;
  779. }
  780.  
  781. Ast *AstTrueLiteral::Clone(StoragePool *ast_pool)
  782. {
  783.     AstTrueLiteral *clone = ast_pool -> GenTrueLiteral(this -> true_literal_token);
  784.  
  785.     return clone;
  786. }
  787.  
  788. Ast *AstFalseLiteral::Clone(StoragePool *ast_pool)
  789. {
  790.     AstFalseLiteral *clone = ast_pool -> GenFalseLiteral(this -> false_literal_token);
  791.  
  792.     return clone;
  793. }
  794.  
  795. Ast *AstStringLiteral::Clone(StoragePool *ast_pool)
  796. {
  797.     AstStringLiteral *clone = ast_pool -> GenStringLiteral(this -> string_literal_token);
  798.  
  799.     return clone;
  800. }
  801.  
  802. Ast *AstCharacterLiteral::Clone(StoragePool *ast_pool)
  803. {
  804.     AstCharacterLiteral *clone = ast_pool -> GenCharacterLiteral(this -> character_literal_token);
  805.  
  806.     return clone;
  807. }
  808.  
  809. Ast *AstNullLiteral::Clone(StoragePool *ast_pool)
  810. {
  811.     AstNullLiteral *clone = ast_pool -> GenNullLiteral(this -> null_token);
  812.  
  813.     return clone;
  814. }
  815.  
  816. Ast *AstThisExpression::Clone(StoragePool *ast_pool)
  817. {
  818.     AstThisExpression *clone = ast_pool -> GenThisExpression(this -> this_token);
  819.  
  820.     return clone;
  821. }
  822.  
  823. Ast *AstSuperExpression::Clone(StoragePool *ast_pool)
  824. {
  825.     AstSuperExpression *clone = ast_pool -> GenSuperExpression(this -> super_token);
  826.  
  827.     return clone;
  828. }
  829.  
  830. Ast *AstParenthesizedExpression::Clone(StoragePool *ast_pool)
  831. {
  832.     AstParenthesizedExpression *clone = ast_pool -> GenParenthesizedExpression();
  833.  
  834.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  835.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  836.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  837.  
  838.     return clone;
  839. }
  840.  
  841. Ast *AstTypeExpression::Clone(StoragePool *ast_pool)
  842. {
  843.     AstTypeExpression *clone = ast_pool -> GenTypeExpression(this -> type -> Clone(ast_pool));
  844.  
  845.     return clone;
  846. }
  847.  
  848. Ast *AstClassInstanceCreationExpression::Clone(StoragePool *ast_pool)
  849. {
  850.     AstClassInstanceCreationExpression *clone = ast_pool -> GenClassInstanceCreationExpression();
  851.  
  852.     clone -> base_opt = (AstExpression *) (this -> base_opt ? this -> base_opt -> Clone(ast_pool) : NULL);
  853.     clone -> dot_token_opt = this -> dot_token_opt;
  854.     clone -> new_token = this -> new_token;
  855.     clone -> class_type = (AstTypeExpression *) this -> class_type -> Clone(ast_pool);
  856.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  857.     clone -> AllocateArguments(this -> NumArguments());
  858.     for (int i = 0; i < this -> NumArguments(); i++)
  859.         clone -> AddArgument((AstExpression *) this -> Argument(i) -> Clone(ast_pool));
  860.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  861.     clone -> class_body_opt = (AstClassBody *) (this -> class_body_opt ? this -> class_body_opt -> Clone(ast_pool) : NULL);
  862.     clone -> AllocateLocalArguments(this -> NumLocalArguments());
  863.     for (int k = 0; k < this -> NumLocalArguments(); k++)
  864.         clone -> AddLocalArgument((AstExpression *) this -> LocalArgument(k) -> Clone(ast_pool));
  865.  
  866.     return clone;
  867. }
  868.  
  869. Ast *AstDimExpr::Clone(StoragePool *ast_pool)
  870. {
  871.     AstDimExpr *clone = ast_pool -> GenDimExpr();
  872.  
  873.     clone -> left_bracket_token = this -> left_bracket_token;
  874.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  875.     clone -> right_bracket_token = this -> right_bracket_token;
  876.  
  877.     return clone;
  878. }
  879.  
  880. Ast *AstArrayCreationExpression::Clone(StoragePool *ast_pool)
  881. {
  882.     AstArrayCreationExpression *clone = ast_pool -> GenArrayCreationExpression();
  883.  
  884.     clone -> new_token = this -> new_token;
  885.     clone -> array_type = this -> array_type -> Clone(ast_pool);
  886.     clone -> AllocateDimExprs(this -> NumDimExprs());
  887.     for (int i = 0; i < this -> NumDimExprs(); i++)
  888.         clone -> AddDimExpr((AstDimExpr *) this -> DimExpr(i) -> Clone(ast_pool));
  889.     clone -> AllocateBrackets(this -> NumBrackets());
  890.     for (int k = 0; k < this -> NumBrackets(); k++)
  891.         clone -> AddBrackets((AstBrackets *) this -> Brackets(k) -> Clone(ast_pool));
  892.     clone -> array_initializer_opt = (AstArrayInitializer *)
  893.                                      (this -> array_initializer_opt ? this -> array_initializer_opt -> Clone(ast_pool) : NULL);
  894.  
  895.     return clone;
  896. }
  897.  
  898. Ast *AstFieldAccess::Clone(StoragePool *ast_pool)
  899. {
  900.     AstFieldAccess *clone = ast_pool -> GenFieldAccess(this -> field_access_tag);
  901.  
  902.     clone -> base = (AstExpression *) this -> base -> Clone(ast_pool);
  903.     clone -> dot_token = this -> dot_token;
  904.     clone -> identifier_token = this -> identifier_token;
  905.     clone -> resolution_opt = (AstExpression *) (this -> resolution_opt ? this -> resolution_opt -> Clone(ast_pool) : NULL);
  906.  
  907.     return clone;
  908. }
  909.  
  910. Ast *AstMethodInvocation::Clone(StoragePool *ast_pool)
  911. {
  912.     AstMethodInvocation *clone = ast_pool -> GenMethodInvocation();
  913.  
  914.     clone -> method = (AstExpression *) this -> method -> Clone(ast_pool);
  915.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  916.     clone -> AllocateArguments(this -> NumArguments());
  917.     for (int i = 0; i < this -> NumArguments(); i++)
  918.         clone -> AddArgument((AstExpression *) this -> Argument(i) -> Clone(ast_pool));
  919.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  920.     clone -> resolution_opt = (AstExpression *) (this -> resolution_opt ? this -> resolution_opt -> Clone(ast_pool) : NULL);
  921.  
  922.     return clone;
  923. }
  924.  
  925. Ast *AstArrayAccess::Clone(StoragePool *ast_pool)
  926. {
  927.     AstArrayAccess *clone = ast_pool -> GenArrayAccess();
  928.  
  929.     clone -> base = (AstExpression *) this -> base -> Clone(ast_pool);
  930.     clone -> left_bracket_token = this -> left_bracket_token;
  931.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  932.     clone -> right_bracket_token = this -> right_bracket_token;
  933.  
  934.     return clone;
  935. }
  936.  
  937. Ast *AstPostUnaryExpression::Clone(StoragePool *ast_pool)
  938. {
  939.     AstPostUnaryExpression *clone = ast_pool -> GenPostUnaryExpression(this -> post_unary_tag);
  940.  
  941.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  942.     clone -> post_operator_token = this -> post_operator_token;
  943.  
  944.     return clone;
  945. }
  946.  
  947. Ast *AstPreUnaryExpression::Clone(StoragePool *ast_pool)
  948. {
  949.     AstPreUnaryExpression *clone = ast_pool -> GenPreUnaryExpression(this -> pre_unary_tag);
  950.  
  951.     clone -> pre_operator_token = this -> pre_operator_token;
  952.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  953.  
  954.     return clone;
  955. }
  956.  
  957. Ast *AstCastExpression::Clone(StoragePool *ast_pool)
  958. {
  959.     AstCastExpression *clone = ast_pool -> GenCastExpression();
  960.  
  961.     clone -> left_parenthesis_token_opt = this -> left_parenthesis_token_opt;
  962.     clone -> type_opt = (Ast *) (this -> type_opt ? this -> type_opt -> Clone(ast_pool) : NULL);
  963.     clone -> AllocateBrackets(this -> NumBrackets());
  964.     for (int i = 0; i < this -> NumBrackets(); i++)
  965.         clone -> AddBrackets((AstBrackets *) this -> Brackets(i) -> Clone(ast_pool));
  966.     clone -> right_parenthesis_token_opt = this -> right_parenthesis_token_opt;
  967.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  968.  
  969.     return clone;
  970. }
  971.  
  972. Ast *AstBinaryExpression::Clone(StoragePool *ast_pool)
  973. {
  974.     AstBinaryExpression *clone = ast_pool -> GenBinaryExpression(this -> binary_tag);
  975.  
  976.     clone -> left_expression = (AstExpression *) this -> left_expression -> Clone(ast_pool);
  977.     clone -> binary_operator_token = this -> binary_operator_token;
  978.     clone -> right_expression = (AstExpression *) this -> right_expression -> Clone(ast_pool);
  979.  
  980.     return clone;
  981. }
  982.  
  983. Ast *AstConditionalExpression::Clone(StoragePool *ast_pool)
  984. {
  985.     AstConditionalExpression *clone = ast_pool -> GenConditionalExpression();
  986.  
  987.     clone -> test_expression = (AstExpression *) this -> test_expression -> Clone(ast_pool);
  988.     clone -> question_token = this -> question_token;
  989.     clone -> true_expression = (AstExpression *) this -> true_expression -> Clone(ast_pool);
  990.     clone -> colon_token = this -> colon_token;
  991.     clone -> false_expression = (AstExpression *) this -> false_expression -> Clone(ast_pool);
  992.  
  993.     return clone;
  994. }
  995.  
  996. Ast *AstAssignmentExpression::Clone(StoragePool *ast_pool)
  997. {
  998.     AstAssignmentExpression *clone = ast_pool -> GenAssignmentExpression(this -> assignment_tag, this -> assignment_operator_token);
  999.  
  1000.     clone -> left_hand_side = (AstExpression *) this -> left_hand_side -> Clone(ast_pool);
  1001.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  1002.  
  1003.     return clone;
  1004. }
  1005.  
  1006. #ifdef JIKES_DEBUG
  1007.     void Ast::Print(LexStream& lex_stream)
  1008.     {
  1009.         Coutput << "#" << this -> id << " (Ast):  "
  1010.                 << "Node number " << (int) kind << " does not contain a print routine\n";
  1011.     }
  1012.  
  1013.     void AstBlock::Print(LexStream& lex_stream)
  1014.     {
  1015.         Coutput << "#" << this -> id << " (";
  1016.         for (int i = 0; i < this -> NumLabels(); i++)
  1017.         {
  1018.              Coutput << lex_stream.NameString(this -> Label(i))
  1019.                      << ": ";
  1020.         }
  1021.         Coutput << "Block at level " << nesting_level;
  1022.         if (block_symbol)
  1023.              Coutput << ", max_variable_index " << block_symbol -> max_variable_index
  1024.                      << ", try_or_synchronized_variable_index " << block_symbol -> try_or_synchronized_variable_index;
  1025.         else Coutput << ", BLOCK_SYMBOL NOT SET";
  1026.         Coutput << ")";
  1027.  
  1028.         if (NumStatements() > 0)
  1029.         {
  1030.             Coutput << "    {";
  1031.             for (int j = 0; j < this -> NumStatements(); j++)
  1032.             {
  1033.                 if (j % 10 == 0)
  1034.                     Coutput << "\n        ";
  1035.                 Coutput << " #" << this -> Statement(j) -> id;
  1036.             }
  1037.             Coutput << "    }\n";
  1038.             for (int k = 0; k < this -> NumStatements(); k++)
  1039.                 this -> Statement(k) -> Print(lex_stream);
  1040.         }
  1041.         else
  1042.          Coutput <<"\n";
  1043.     }
  1044.  
  1045.     void AstPrimitiveType::Print(LexStream& lex_stream)
  1046.     {
  1047.         Coutput << "#" << this -> id << " (PrimitiveType):  "
  1048.                 << lex_stream.NameString(primitive_kind_token)
  1049.                 << "\n";
  1050.     }
  1051.  
  1052.     void AstArrayType::Print(LexStream& lex_stream)
  1053.     {
  1054.         Coutput << "#" << this -> id << " (ArrayType):  "
  1055.                 << "#" << type -> id;
  1056.         for (int i = 0; i < this -> NumBrackets(); i++)
  1057.              Coutput << " []";
  1058.         Coutput << "\n";
  1059.         type -> Print(lex_stream);
  1060.     }
  1061.  
  1062.     void AstSimpleName::Print(LexStream& lex_stream)
  1063.     {
  1064.         Coutput << "#" << this -> id << " (SimpleName):  "
  1065.                 << lex_stream.NameString(identifier_token)
  1066.                 << "\n";
  1067.     }
  1068.  
  1069.     void AstPackageDeclaration::Print(LexStream& lex_stream)
  1070.     {
  1071.         Coutput << "#" << this -> id << " (PackageDeclaration):  "
  1072.                 << lex_stream.NameString(package_token)
  1073.                 << " #" << name -> id << "\n";
  1074.         name -> Print(lex_stream);
  1075.     }
  1076.  
  1077.     void AstImportDeclaration::Print(LexStream& lex_stream)
  1078.     {
  1079.         Coutput << "#" << this -> id << " (ImportDeclaration):  "
  1080.                 << lex_stream.NameString(import_token)
  1081.                 << " #" << name -> id << (star_token_opt ? "." : "")
  1082.                 << (star_token_opt ? lex_stream.NameString(star_token_opt) : L"")
  1083.                 << "\n";
  1084.         name -> Print(lex_stream);
  1085.     }
  1086.  
  1087.     void AstCompilationUnit::Print(LexStream& lex_stream)
  1088.     {
  1089.         Coutput << "\nAST structure for "
  1090.                 << lex_stream.FileName()
  1091.                 << ":\n\n"
  1092.                 << "#" << this -> id << " (CompilationUnit):  "
  1093.                 << "#" << (package_declaration_opt ? package_declaration_opt -> id : 0)
  1094.                 << " (";
  1095.         for (int i = 0; i < this -> NumImportDeclarations(); i++)
  1096.             Coutput << " #" << this -> ImportDeclaration(i) -> id;
  1097.         Coutput << " ) (";
  1098.         for (int k = 0; k < this -> NumTypeDeclarations(); k++)
  1099.             Coutput << " #" << this -> TypeDeclaration(k) -> id;
  1100.         Coutput << ")\n";
  1101.  
  1102.         if (package_declaration_opt)
  1103.             package_declaration_opt -> Print(lex_stream);
  1104.         for (int m = 0; m < this -> NumImportDeclarations(); m++)
  1105.             this -> ImportDeclaration(m) -> Print(lex_stream);
  1106.         for (int n = 0; n < this -> NumTypeDeclarations(); n++)
  1107.             this -> TypeDeclaration(n) -> Print(lex_stream);
  1108.     }
  1109.  
  1110.     void AstModifier::Print(LexStream& lex_stream)
  1111.     {
  1112.         Coutput << "#" << this -> id << " (Modifier):  "
  1113.                 << lex_stream.NameString(modifier_kind_token)
  1114.                 << "\n";
  1115.     }
  1116.  
  1117.     void AstEmptyDeclaration::Print(LexStream& lex_stream)
  1118.     {
  1119.         Coutput << "#" << this -> id << " (EmptyDeclaration):  "
  1120.                 << lex_stream.NameString(semicolon_token)
  1121.                 << "\n";
  1122.     }
  1123.  
  1124.     void AstClassBody::Print(LexStream& lex_stream)
  1125.     {
  1126.         Coutput << "#" << this -> id << " (ClassBody):  "
  1127.                 << "\n    {";
  1128.         for (int i = 0; i < this -> NumClassBodyDeclarations(); i++)
  1129.         {
  1130.             if (i % 10 == 0)
  1131.                  Coutput << "\n       ";
  1132.             Coutput << " #" << this -> ClassBodyDeclaration(i) -> id;
  1133.         }
  1134.         Coutput << "\n    }\n";
  1135.  
  1136.         for (int k = 0; k < this -> NumClassBodyDeclarations(); k++)
  1137.             this -> ClassBodyDeclaration(k) -> Print(lex_stream);
  1138.     }
  1139.  
  1140.     void AstClassDeclaration::Print(LexStream& lex_stream)
  1141.     {
  1142.         Coutput << "#" << this -> id << " (ClassDeclaration):  ";
  1143.         for (int i = 0; i < this -> NumClassModifiers(); i++)
  1144.         {
  1145.             Coutput << lex_stream.NameString(this -> ClassModifier(i) -> modifier_kind_token)
  1146.                     << " ";
  1147.         }
  1148.         Coutput << lex_stream.NameString(class_token)
  1149.                 << " "
  1150.                 << lex_stream.NameString(identifier_token)
  1151.                 << " #" << (super_opt ? super_opt -> id : 0)
  1152.                 << "(";
  1153.         for (int j = 0; j < NumInterfaces(); j++)
  1154.             Coutput << " #" << this -> Interface(j) -> id;
  1155.         Coutput << ") #" << class_body -> id << "\n";
  1156.  
  1157.         if (super_opt)
  1158.             super_opt -> Print(lex_stream);
  1159.         for (int k = 0; k < NumInterfaces(); k++)
  1160.             this -> Interface(k) -> Print(lex_stream);
  1161.         class_body -> Print(lex_stream);
  1162.     }
  1163.  
  1164.     void AstArrayInitializer::Print(LexStream& lex_stream)
  1165.     {
  1166.         Coutput << "#" << this -> id << " (ArrayInitializer):  "
  1167.                 << "\n    {";
  1168.         for (int i = 0; i < NumVariableInitializers(); i++)
  1169.         {
  1170.             if (i % 10 == 0)
  1171.                  Coutput << "\n       ";
  1172.             Coutput << " #" << this -> VariableInitializer(i) -> id;
  1173.         }
  1174.         Coutput << "\n    }\n";
  1175.  
  1176.         for (int k = 0; k < NumVariableInitializers(); k++)
  1177.             this -> VariableInitializer(k) -> Print(lex_stream);
  1178.     }
  1179.  
  1180.     void AstBrackets::Print(LexStream& lex_stream)
  1181.     {
  1182.         Coutput << "#" << this -> id << " (Brackets):  []" << "\n";
  1183.     }
  1184.  
  1185.     void AstVariableDeclaratorId::Print(LexStream& lex_stream)
  1186.     {
  1187.         Coutput << "#" << this -> id << " (VariableDeclaratorId):  "
  1188.                 << lex_stream.NameString(identifier_token);
  1189.         for (int i = 0; i < NumBrackets(); i++)
  1190.              Coutput << " []";
  1191.         Coutput << "\n";
  1192.     }
  1193.  
  1194.     void AstVariableDeclarator::Print(LexStream& lex_stream)
  1195.     {
  1196.         Coutput << "#" << this -> id << " (VariableDeclarator):  " << "#" << variable_declarator_name -> id << " #" <<
  1197.                    (variable_initializer_opt ? variable_initializer_opt -> id : 0) << "\n";
  1198.         variable_declarator_name -> Print(lex_stream);
  1199.         if (variable_initializer_opt)
  1200.             variable_initializer_opt -> Print(lex_stream);
  1201.  
  1202.     }
  1203.  
  1204.     void AstFieldDeclaration::Print(LexStream& lex_stream)
  1205.     {
  1206.         Coutput << "#" << this -> id << " (FieldDeclaration):  ";
  1207.         for (int i = 0; i < this -> NumVariableModifiers(); i++)
  1208.         {
  1209.             Coutput << lex_stream.NameString(this -> VariableModifier(i) -> modifier_kind_token)
  1210.                     << " ";
  1211.         }
  1212.         Coutput << " #" << type -> id
  1213.                 << "(";
  1214.         for (int j = 0; j < this -> NumVariableDeclarators(); j++)
  1215.             Coutput << " #" << this -> VariableDeclarator(j) -> id;
  1216.         Coutput << ") \n";
  1217.  
  1218.         type -> Print(lex_stream);
  1219.         for (int k = 0; k < this -> NumVariableDeclarators(); k++)
  1220.             this -> VariableDeclarator(k) -> Print(lex_stream);
  1221.     }
  1222.  
  1223.     void AstFormalParameter::Print(LexStream& lex_stream)
  1224.     {
  1225.         Coutput << "#" << this -> id << " (FormalParameter):  ";
  1226.         for (int i = 0; i < this -> NumParameterModifiers(); i++)
  1227.         {
  1228.             Coutput << lex_stream.NameString(this -> ParameterModifier(i) -> modifier_kind_token)
  1229.                     << " ";
  1230.         }
  1231.         Coutput << "#" << type -> id
  1232.                 << " #" << formal_declarator -> id << "\n";
  1233.         type -> Print(lex_stream);
  1234.         formal_declarator -> Print(lex_stream);
  1235.     }
  1236.  
  1237.     void AstMethodDeclarator::Print(LexStream& lex_stream)
  1238.     {
  1239.         Coutput << "#" << this -> id << " (MethodDeclarator):  "
  1240.                 << lex_stream.NameString(identifier_token)
  1241.                 << " (";
  1242.         for (int k = 0; k < this -> NumFormalParameters(); k++)
  1243.             Coutput << " #" << this -> FormalParameter(k) -> id;
  1244.         Coutput << " )";
  1245.         for (int i = 0; i < NumBrackets(); i++)
  1246.              Coutput << " []";
  1247.         Coutput <<  "\n";
  1248.  
  1249.         for (int j = 0; j < this -> NumFormalParameters(); j++)
  1250.             this -> FormalParameter(j) -> Print(lex_stream);
  1251.     }
  1252.  
  1253.     void AstMethodDeclaration::Print(LexStream& lex_stream)
  1254.     {
  1255.         Coutput << "#" << this -> id << " (MethodDeclaration):  ";
  1256.         for (int i = 0; i < this -> NumMethodModifiers(); i++)
  1257.         {
  1258.             Coutput << lex_stream.NameString(this -> MethodModifier(i) -> modifier_kind_token)
  1259.                     << " ";
  1260.         }
  1261.         Coutput << " #" << type -> id
  1262.                 << " #" << method_declarator -> id
  1263.                 << " throws: (";
  1264.         for (int j = 0; j < this -> NumThrows(); j++)
  1265.             Coutput << " #" << this -> Throw(j) -> id;
  1266.         Coutput << ") #" << method_body -> id << "\n";
  1267.  
  1268.         type -> Print(lex_stream);
  1269.         method_declarator -> Print(lex_stream);
  1270.         for (int k = 0; k < this -> NumThrows(); k++)
  1271.             this -> Throw(k) -> Print(lex_stream);
  1272.         method_body -> Print(lex_stream);
  1273.     }
  1274.  
  1275.     void AstStaticInitializer::Print(LexStream& lex_stream)
  1276.     {
  1277.         Coutput << "#" << this -> id << " (StaticInitializer):  "
  1278.                 << lex_stream.NameString(static_token)
  1279.                 << " #" << block -> id << "\n";
  1280.         block -> Print(lex_stream);
  1281.     }
  1282.  
  1283.     void AstThisCall::Print(LexStream& lex_stream)
  1284.     {
  1285.         Coutput << "#" << this -> id << " (ThisCall):  ";
  1286.         if (base_opt)
  1287.         {
  1288.             Coutput << "#" << base_opt -> id
  1289.                     << lex_stream.NameString(dot_token_opt);
  1290.         }
  1291.         Coutput << lex_stream.NameString(this_token)
  1292.                 << " (";
  1293.         for (int i = 0; i < this -> NumArguments(); i++)
  1294.             Coutput << " #" << this -> Argument(i) -> id;
  1295.         Coutput << " ) \n";
  1296.  
  1297.         if (base_opt)
  1298.             base_opt -> Print(lex_stream);
  1299.  
  1300.         for (int j = 0; j < NumArguments(); j++)
  1301.             this -> Argument(j) -> Print(lex_stream);
  1302.     }
  1303.  
  1304.     void AstSuperCall::Print(LexStream& lex_stream)
  1305.     {
  1306.         Coutput << "#" << this -> id << " (SuperCall):  ";
  1307.         if (base_opt)
  1308.         {
  1309.             Coutput << "#" << base_opt -> id
  1310.                     << lex_stream.NameString(dot_token_opt);
  1311.         }
  1312.         Coutput << lex_stream.NameString(super_token)
  1313.                 << " (";
  1314.         for (int i = 0; i < this -> NumArguments(); i++)
  1315.             Coutput << " #" << this -> Argument(i) -> id;
  1316.         Coutput << " ) \n";
  1317.  
  1318.         if (base_opt)
  1319.             base_opt -> Print(lex_stream);
  1320.  
  1321.         for (int j = 0; j < NumArguments(); j++)
  1322.             this -> Argument(j) -> Print(lex_stream);
  1323.     }
  1324.  
  1325.     void AstConstructorBlock::Print(LexStream& lex_stream)
  1326.     {
  1327.         Coutput << "#" << this -> id << " (ConstructorBlock):  ";
  1328.         if (explicit_constructor_invocation_opt)
  1329.              Coutput << " #" << explicit_constructor_invocation_opt -> id;
  1330.         else Coutput << " #0";
  1331.         Coutput << " #" << block -> id
  1332.                 << "\n";
  1333.  
  1334.         if (explicit_constructor_invocation_opt)
  1335.             explicit_constructor_invocation_opt -> Print(lex_stream);
  1336.         block -> Print(lex_stream);
  1337.     }
  1338.  
  1339.     void AstConstructorDeclaration::Print(LexStream& lex_stream)
  1340.     {
  1341.         Coutput << "#" << this -> id << " (ConstructorDeclaration):  ";
  1342.         for (int i = 0; i < this -> NumConstructorModifiers(); i++)
  1343.         {
  1344.             Coutput << lex_stream.NameString(this -> ConstructorModifier(i) -> modifier_kind_token)
  1345.                     << " ";
  1346.         }
  1347.         Coutput << " #" << constructor_declarator -> id
  1348.                 << " throws: (";
  1349.         for (int j = 0; j < this -> NumThrows(); j++)
  1350.             Coutput << " #" << this -> Throw(j) -> id;
  1351.         Coutput << ") #" << constructor_body -> id
  1352.                 << "\n";
  1353.  
  1354.         constructor_declarator -> Print(lex_stream);
  1355.         for (int k = 0; k < this -> NumThrows(); k++)
  1356.             this -> Throw(k) -> Print(lex_stream);
  1357.         constructor_body -> Print(lex_stream);
  1358.     }
  1359.  
  1360.     void AstInterfaceDeclaration::Print(LexStream& lex_stream)
  1361.     {
  1362.         Coutput << "#" << this -> id << " (InterfaceDeclaration):  ";
  1363.         for (int i = 0; i < this -> NumInterfaceModifiers(); i++)
  1364.         {
  1365.             Coutput << lex_stream.NameString(this -> InterfaceModifier(i) -> modifier_kind_token)
  1366.                     << " ";
  1367.         }
  1368.         Coutput << lex_stream.NameString(interface_token)
  1369.                 << " "
  1370.                 << lex_stream.NameString(identifier_token)
  1371.                 << "(";
  1372.         for (int j = 0; j < NumExtendsInterfaces(); j++)
  1373.             Coutput << " #" << this -> ExtendsInterface(j) -> id;
  1374.         Coutput << ") {";
  1375.         for (int m = 0; m < NumInterfaceMemberDeclarations(); m++)
  1376.             Coutput << " #" << this -> InterfaceMemberDeclaration(m) -> id;
  1377.         Coutput << "}\n";
  1378.  
  1379.         for (int k = 0; k < NumExtendsInterfaces(); k++)
  1380.             this -> ExtendsInterface(k) -> Print(lex_stream);
  1381.         for (int n = 0; n < NumInterfaceMemberDeclarations(); n++)
  1382.             this -> InterfaceMemberDeclaration(n) -> Print(lex_stream);
  1383.     }
  1384.  
  1385.     void AstLocalVariableDeclarationStatement::Print(LexStream& lex_stream)
  1386.     {
  1387.         Coutput << "#" << this -> id << " (LocalVariableDeclarationStatement):  ";
  1388.         for (int i = 0; i < this -> NumLocalModifiers(); i++)
  1389.         {
  1390.             Coutput << lex_stream.NameString(this -> LocalModifier(i) -> modifier_kind_token)
  1391.                     << " ";
  1392.         }
  1393.         Coutput << "#" << type -> id
  1394.                 << "(";
  1395.         for (int j = 0; j < this -> NumVariableDeclarators(); j++)
  1396.             Coutput << " #" << this -> VariableDeclarator(j) -> id;
  1397.         Coutput << ") \n";
  1398.  
  1399.         type -> Print(lex_stream);
  1400.         for (int k = 0; k < this -> NumVariableDeclarators(); k++)
  1401.             this -> VariableDeclarator(k) -> Print(lex_stream);
  1402.     }
  1403.  
  1404.     void AstIfStatement::Print(LexStream& lex_stream)
  1405.     {
  1406.         Coutput << "#" << this -> id << " (IfStatement):  "
  1407.                 << lex_stream.NameString(if_token)
  1408.                 << " ( #" << expression -> id << " ) #" << true_statement -> id;
  1409.         if (false_statement_opt)
  1410.              Coutput << " else #" << false_statement_opt -> id;
  1411.         else Coutput << " #0";
  1412.         Coutput << "\n";
  1413.  
  1414.         expression -> Print(lex_stream);
  1415.         true_statement -> Print(lex_stream);
  1416.         if (false_statement_opt)
  1417.             false_statement_opt -> Print(lex_stream);
  1418.     }
  1419.  
  1420.     void AstEmptyStatement::Print(LexStream& lex_stream)
  1421.     {
  1422.         Coutput << "#" << this -> id << " (EmptyStatement):  "
  1423.                 << lex_stream.NameString(semicolon_token)
  1424.                 << "\n";
  1425.     }
  1426.  
  1427.     void AstExpressionStatement::Print(LexStream& lex_stream)
  1428.     {
  1429.         Coutput << "#" << this -> id << " (ExpressionStatement):  " << "#" << expression -> id << "\n";
  1430.         expression -> Print(lex_stream);
  1431.     }
  1432.  
  1433.     void AstCaseLabel::Print(LexStream& lex_stream)
  1434.     {
  1435.         Coutput << "#" << this -> id << " (CaseLabel):  "
  1436.                 << lex_stream.NameString(case_token)
  1437.                 << " #" << expression -> id << ":\n";
  1438.         expression -> Print(lex_stream);
  1439.         Coutput << "    map_index: " << map_index << "\n";
  1440.     }
  1441.  
  1442.     void AstDefaultLabel::Print(LexStream& lex_stream)
  1443.     {
  1444.         Coutput << "#" << this -> id << " (DefaultLabel):  "
  1445.                 << lex_stream.NameString(default_token)
  1446.                 << ":\n";
  1447.     }
  1448.  
  1449.     void AstSwitchBlockStatement::Print(LexStream& lex_stream)
  1450.     {
  1451.         Coutput << "#" << this -> id << " (SwitchBlockStatement): ";
  1452.         for (int i = 0; i < NumSwitchLabels(); i++)
  1453.         {
  1454.             if (i % 10 == 0)
  1455.                  Coutput << "\n        ";
  1456.             Coutput << " #" << this -> SwitchLabel(i) -> id << ':';
  1457.         }
  1458.         Coutput << "\n";
  1459.         for (int k = 0; k < NumStatements(); k++)
  1460.         {
  1461.             if (k % 10 == 0)
  1462.                  Coutput << "\n            ";
  1463.             Coutput << " #" << this -> Statement(k) -> id;
  1464.         }
  1465.         Coutput << "\n";
  1466.  
  1467.         for (int j = 0; j < NumSwitchLabels(); j++)
  1468.             this -> SwitchLabel(j) -> Print(lex_stream);
  1469.         for (int l = 0; l < NumStatements(); l++)
  1470.             this -> Statement(l) -> Print(lex_stream);
  1471.     }
  1472.  
  1473.     void AstSwitchStatement::Print(LexStream& lex_stream)
  1474.     {
  1475.         Coutput << "#" << this -> id << " (SwitchStatement):  "
  1476.                 << lex_stream.NameString(switch_token)
  1477.                 << " ( #" << expression -> id << " ) #" << switch_block -> id << "\n";
  1478.  
  1479.         Coutput << "default case: index " << default_case.index << "\n";
  1480.         for (int i = 0; i < cases -> Length(); i++)
  1481.         {
  1482.             Coutput << "case: " << i << "  index: " << (*cases)[i] -> index << "  value: " << (*cases)[i] -> Value() << "\n";
  1483.         }
  1484.  
  1485.         expression -> Print(lex_stream);
  1486.         switch_block -> Print(lex_stream);
  1487.     }
  1488.  
  1489.     void AstWhileStatement::Print(LexStream& lex_stream)
  1490.     {
  1491.         Coutput << "#" << this -> id << " (WhileStatement):  "
  1492.                 << lex_stream.NameString(while_token)
  1493.                 << " ( #" << expression -> id << " ) #" << statement -> id << "\n";
  1494.         expression -> Print(lex_stream);
  1495.         statement -> Print(lex_stream);
  1496.     }
  1497.  
  1498.     void AstDoStatement::Print(LexStream& lex_stream)
  1499.     {
  1500.         Coutput << "#" << this -> id << " (DoStatement):  "
  1501.                 << lex_stream.NameString(do_token)
  1502.                 << " { #" << statement -> id << " } "
  1503.                 << lex_stream.NameString(while_token)
  1504.                 << " ( #" << expression -> id << " ) #\n";
  1505.  
  1506.         statement -> Print(lex_stream);
  1507.         expression -> Print(lex_stream);
  1508.     }
  1509.  
  1510.     void AstForStatement::Print(LexStream& lex_stream)
  1511.     {
  1512.         Coutput << "#" << this -> id << " (ForStatement):  ("
  1513.                 << lex_stream.NameString(for_token);
  1514.         for (int i = 0; i < this -> NumForInitStatements(); i++)
  1515.             Coutput << " #" << this -> ForInitStatement(i) -> id;
  1516.         Coutput << "; #" << (end_expression_opt ? end_expression_opt -> id : 0) << ";";
  1517.         for (int k = 0; k < this -> NumForUpdateStatements(); k++)
  1518.             Coutput << " #" << this -> ForUpdateStatement(k) -> id;
  1519.         Coutput << ") #" << statement -> id << "\n";
  1520.  
  1521.         for (int m = 0; m < this -> NumForInitStatements(); m++)
  1522.             this -> ForInitStatement(m) -> Print(lex_stream);
  1523.         if (end_expression_opt)
  1524.             end_expression_opt -> Print(lex_stream);
  1525.         for (int n = 0; n < this -> NumForUpdateStatements(); n++)
  1526.             this -> ForUpdateStatement(n) -> Print(lex_stream);
  1527.         statement -> Print(lex_stream);
  1528.     }
  1529.  
  1530.     void AstBreakStatement::Print(LexStream& lex_stream)
  1531.     {
  1532.         Coutput << "#" << this -> id << " (BreakStatement):  "
  1533.                 << lex_stream.NameString(break_token)
  1534.                 << " "
  1535.                 << (identifier_token_opt ? lex_stream.NameString(identifier_token_opt) : L"")
  1536.                 << " at nesting_level " << nesting_level << "\n";
  1537.     }
  1538.  
  1539.     void AstContinueStatement::Print(LexStream& lex_stream)
  1540.     {
  1541.         Coutput << "#" << this -> id << " (ContinueStatement):  "
  1542.                 << lex_stream.NameString(continue_token)
  1543.                 << " "
  1544.                 << (identifier_token_opt ? lex_stream.NameString(identifier_token_opt) : L"")
  1545.                 << " at nesting_level " << nesting_level << "\n";
  1546.     }
  1547.  
  1548.     void AstReturnStatement::Print(LexStream& lex_stream)
  1549.     {
  1550.         Coutput << "#" << this -> id << " (ReturnStatement):  "
  1551.                 << lex_stream.NameString(return_token)
  1552.                 << " "
  1553.                 << " #" << (expression_opt ? expression_opt -> id : 0) << "\n";
  1554.         if (expression_opt)
  1555.             expression_opt -> Print(lex_stream);
  1556.     }
  1557.  
  1558.     void AstThrowStatement::Print(LexStream& lex_stream)
  1559.     {
  1560.         Coutput << "#" << this -> id << " (ThrowStatement):  "
  1561.                 << lex_stream.NameString(throw_token)
  1562.                 << " "
  1563.                 << " #" << expression -> id << "\n";
  1564.         expression -> Print(lex_stream);
  1565.     }
  1566.  
  1567.     void AstSynchronizedStatement::Print(LexStream& lex_stream)
  1568.     {
  1569.         Coutput << "#" << this -> id << " (SynchronizedStatement):  "
  1570.                 << lex_stream.NameString(synchronized_token)
  1571.                 << " ( #" << expression -> id
  1572.                 << " ) #" << block -> id << "\n";
  1573.         expression -> Print(lex_stream);
  1574.         block -> Print(lex_stream);
  1575.     }
  1576.  
  1577.     void AstCatchClause::Print(LexStream& lex_stream)
  1578.     {
  1579.         Coutput << "#" << this -> id << " (CatchClause):  "
  1580.                 << lex_stream.NameString(catch_token)
  1581.                 << " #" << formal_parameter -> id
  1582.                 << " #" << block -> id << "\n";
  1583.         formal_parameter -> Print(lex_stream);
  1584.         block -> Print(lex_stream);
  1585.     }
  1586.  
  1587.     void AstFinallyClause::Print(LexStream& lex_stream)
  1588.     {
  1589.         Coutput << "#" << this -> id << " (FinallyClause):  "
  1590.                 << lex_stream.NameString(finally_token)
  1591.                 << " #" << block -> id << "\n";
  1592.         block -> Print(lex_stream);
  1593.     }
  1594.  
  1595.     void AstTryStatement::Print(LexStream& lex_stream)
  1596.     {
  1597.         Coutput << "#" << this -> id << " (TryStatement):  "
  1598.                 << lex_stream.NameString(try_token)
  1599.                 << " #" << block -> id
  1600.                 << " catch (";
  1601.         for (int i = 0; i < this -> NumCatchClauses(); i++)
  1602.             Coutput << " #" << this -> CatchClause(i) -> id;
  1603.         Coutput << ") finally " << "#" << (finally_clause_opt ? finally_clause_opt -> id : 0) << "\n";
  1604.  
  1605.         block -> Print(lex_stream);
  1606.         for (int k = 0; k < this -> NumCatchClauses(); k++)
  1607.             this -> CatchClause(k) -> Print(lex_stream);
  1608.         if (finally_clause_opt)
  1609.             finally_clause_opt -> Print(lex_stream);
  1610.     }
  1611.  
  1612.     void AstIntegerLiteral::Print(LexStream& lex_stream)
  1613.     {
  1614.         Coutput << "#" << this -> id << " (IntegerLiteral):  "
  1615.                 << lex_stream.NameString(integer_literal_token)
  1616.                 << "\n";
  1617.     }
  1618.  
  1619.     void AstLongLiteral::Print(LexStream& lex_stream)
  1620.     {
  1621.         Coutput << "#" << this -> id << " (LongLiteral):  "
  1622.                 << lex_stream.NameString(long_literal_token)
  1623.                 << "\n";
  1624.     }
  1625.  
  1626.     void AstFloatingPointLiteral::Print(LexStream& lex_stream)
  1627.     {
  1628.         Coutput << "#" << this -> id << " (FloatingPointLiteral):  "
  1629.                 << lex_stream.NameString(floating_point_literal_token)
  1630.                 << "\n";
  1631.     }
  1632.  
  1633.     void AstDoubleLiteral::Print(LexStream& lex_stream)
  1634.     {
  1635.         Coutput << "#" << this -> id << " (DoubleLiteral):  "
  1636.                 << lex_stream.NameString(double_literal_token)
  1637.                 << "\n";
  1638.     }
  1639.  
  1640.     void AstTrueLiteral::Print(LexStream& lex_stream)
  1641.     {
  1642.         Coutput << "#" << this -> id << " (TrueLiteral):  "
  1643.                 << lex_stream.NameString(true_literal_token)
  1644.                 << "\n";
  1645.     }
  1646.  
  1647.     void AstFalseLiteral::Print(LexStream& lex_stream)
  1648.     {
  1649.         Coutput << "#" << this -> id << " (FalseLiteral):  "
  1650.                 << lex_stream.NameString(false_literal_token)
  1651.                 << "\n";
  1652.     }
  1653.  
  1654.     void AstStringLiteral::Print(LexStream& lex_stream)
  1655.     {
  1656.         Coutput << "#" << this -> id << " (StringLiteral):  "
  1657.                 << lex_stream.NameString(string_literal_token)
  1658.                 << "\n";
  1659.     }
  1660.  
  1661.     void AstCharacterLiteral::Print(LexStream& lex_stream)
  1662.     {
  1663.         Coutput << "#" << this -> id << " (CharacterLiteral):  "
  1664.                 << lex_stream.NameString(character_literal_token)
  1665.                 << "\n";
  1666.     }
  1667.  
  1668.     void AstNullLiteral::Print(LexStream& lex_stream)
  1669.     {
  1670.         Coutput << "#" << this -> id << " (NullLiteral):  "
  1671.                 << lex_stream.NameString(null_token)
  1672.                 << "\n";
  1673.     }
  1674.  
  1675.     void AstThisExpression::Print(LexStream& lex_stream)
  1676.     {
  1677.         Coutput << "#" << this -> id << " (ThisExpression):  "
  1678.                 << lex_stream.NameString(this_token)
  1679.                 << "\n";
  1680.     }
  1681.  
  1682.     void AstSuperExpression::Print(LexStream& lex_stream)
  1683.     {
  1684.         Coutput << "#" << this -> id << " (SuperExpression):  "
  1685.                 << lex_stream.NameString(super_token)
  1686.                 << "\n";
  1687.     }
  1688.  
  1689.     void AstParenthesizedExpression::Print(LexStream& lex_stream)
  1690.     {
  1691.         Coutput << "#" << this -> id << " (ParenthesizedExpression):  "
  1692.                 << lex_stream.NameString(left_parenthesis_token)
  1693.                 << "#" << expression -> id
  1694.                 << lex_stream.NameString(right_parenthesis_token)
  1695.                 << "\n";
  1696.         expression -> Print(lex_stream);
  1697.     }
  1698.  
  1699.     void AstTypeExpression::Print(LexStream& lex_stream)
  1700.     {
  1701.         Coutput << "#" << this -> id << " (TypeExpression):  "
  1702.                 << " #" << type -> id << "\n";
  1703.         type -> Print(lex_stream);
  1704.     }
  1705.  
  1706.     void AstClassInstanceCreationExpression::Print(LexStream& lex_stream)
  1707.     {
  1708.         Coutput << "#" << this -> id << " (ClassInstanceCreationExpression):  ";
  1709.         if (base_opt)
  1710.         {
  1711.             Coutput << "#" << base_opt -> id
  1712.                     << lex_stream.NameString(dot_token_opt) << " ";
  1713.         }
  1714.         Coutput << " ";
  1715.         Coutput << lex_stream.NameString(new_token)
  1716.                 << " #" << class_type -> id
  1717.                 << " (";
  1718.         for (int i = 0; i < this -> NumArguments(); i++)
  1719.             Coutput << " #" << this -> Argument(i) -> id;
  1720.         Coutput << " ) "
  1721.                 << "#" << (class_body_opt ? class_body_opt -> id : 0) << "\n";
  1722.  
  1723.         if (base_opt)
  1724.             base_opt -> Print(lex_stream);
  1725.  
  1726.         class_type -> Print(lex_stream);
  1727.         for (int j = 0; j < NumArguments(); j++)
  1728.             this -> Argument(j) -> Print(lex_stream);
  1729.  
  1730.         if (class_body_opt)
  1731.             class_body_opt -> Print(lex_stream);
  1732.     }
  1733.  
  1734.     void AstDimExpr::Print(LexStream& lex_stream)
  1735.     {
  1736.         Coutput << "#" << this -> id << " (DimExpr):  [ #" << expression -> id << " ]\n";
  1737.         expression -> Print(lex_stream);
  1738.     }
  1739.  
  1740.     void AstArrayCreationExpression::Print(LexStream& lex_stream)
  1741.     {
  1742.         Coutput << "#" << this -> id << " (ArrayCreationExpression):  "
  1743.                 << lex_stream.NameString(new_token)
  1744.                 << " #" << array_type -> id;
  1745.         for (int i = 0; i < NumDimExprs(); i++)
  1746.             Coutput << " [#" << DimExpr(i) -> id << "]";
  1747.         for (int k = 0; k < NumBrackets(); k++)
  1748.              Coutput << " []";
  1749.         Coutput << " "
  1750.                 << "#" << (array_initializer_opt ? array_initializer_opt -> id : 0) << "\n";
  1751.  
  1752.         array_type -> Print(lex_stream);
  1753.         for (int j = 0; j < this -> NumDimExprs(); j++)
  1754.             DimExpr(j) -> Print(lex_stream);
  1755.     }
  1756.  
  1757.     void AstFieldAccess::Print(LexStream& lex_stream)
  1758.     {
  1759.         Coutput << "#" << this -> id << " (FieldAccess):  "
  1760.                 << " #" << base -> id << " "
  1761.                 << lex_stream.NameString(identifier_token)
  1762.                 << "\n";
  1763.  
  1764.         base -> Print(lex_stream);
  1765.     }
  1766.  
  1767.     void AstMethodInvocation::Print(LexStream& lex_stream)
  1768.     {
  1769.         Coutput << "#" << this -> id << " (MethodInvocation):  "
  1770.                 << "#" << method -> id
  1771.                 << " (";
  1772.         for (int i = 0; i < this -> NumArguments(); i++)
  1773.             Coutput << " #" << this -> Argument(i) -> id;
  1774.         Coutput << " ) \n";
  1775.  
  1776.         method -> Print(lex_stream);
  1777.         for (int j = 0; j < NumArguments(); j++)
  1778.             this -> Argument(j) -> Print(lex_stream);
  1779.     }
  1780.  
  1781.     void AstArrayAccess::Print(LexStream& lex_stream)
  1782.     {
  1783.         Coutput << "#" << this -> id << " (ArrayAccess):  "
  1784.                 << "#" << base -> id
  1785.                 << " [ #" << expression -> id << " ]\n";
  1786.  
  1787.         base -> Print(lex_stream);
  1788.         expression -> Print(lex_stream);
  1789.     }
  1790.  
  1791.     void AstPostUnaryExpression::Print(LexStream& lex_stream)
  1792.     {
  1793.         Coutput << "#" << this -> id << " (PostUnaryExpression):  "
  1794.                 << "#" << expression -> id
  1795.                 << lex_stream.NameString(post_operator_token)
  1796.                 << "\n";
  1797.  
  1798.         expression -> Print(lex_stream);
  1799.     }
  1800.  
  1801.     void AstPreUnaryExpression::Print(LexStream& lex_stream)
  1802.     {
  1803.         Coutput << "#" << this -> id << " (PreUnaryExpression):  "
  1804.                 << lex_stream.NameString(pre_operator_token)
  1805.                 << " #" << expression -> id << "\n";
  1806.  
  1807.         expression -> Print(lex_stream);
  1808.     }
  1809.  
  1810.     void AstCastExpression::Print(LexStream& lex_stream)
  1811.     {
  1812.         if (left_parenthesis_token_opt)
  1813.         {
  1814.           Coutput << "#" << this -> id << (kind == CAST ? " (CastExpression: just cast):  " : " (CastExpression: check and cast):  ")
  1815.                   << "( #" << (type_opt ? type_opt -> id : 0);
  1816.             for (int i = 0; i < NumBrackets(); i++)
  1817.                  Coutput << " []";
  1818.             Coutput << " ) #" << expression -> id << "\n";
  1819.             if (type_opt)
  1820.                 type_opt -> Print(lex_stream);
  1821.         }
  1822.         else
  1823.         {
  1824.             Coutput << "#" << this -> id << " (Java Semantic Cast to " << Type() -> Name()
  1825.                     << "):  #" << expression -> id << "\n";
  1826.         }
  1827.  
  1828.         expression -> Print(lex_stream);
  1829.     }
  1830.  
  1831.     void AstBinaryExpression::Print(LexStream& lex_stream)
  1832.     {
  1833.         Coutput << "#" << this -> id << " (BinaryExpression):  "
  1834.                 << "#" << left_expression -> id << " "
  1835.                 << lex_stream.NameString(binary_operator_token)
  1836.                 << " #" << right_expression -> id << "\n";
  1837.  
  1838.         left_expression -> Print(lex_stream);
  1839.         right_expression -> Print(lex_stream);
  1840.     }
  1841.  
  1842.     void AstConditionalExpression::Print(LexStream& lex_stream)
  1843.     {
  1844.         Coutput << "#" << this -> id << " (ConditionalExpression):  "
  1845.                 << "#" << test_expression -> id
  1846.                 << " ? #" << true_expression -> id
  1847.                 << " : #" << false_expression -> id << "\n";
  1848.  
  1849.         test_expression -> Print(lex_stream);
  1850.         true_expression -> Print(lex_stream);
  1851.         false_expression -> Print(lex_stream);
  1852.     }
  1853.  
  1854.     void AstAssignmentExpression::Print(LexStream& lex_stream)
  1855.     {
  1856.         Coutput << "#" << this -> id << " (AssignmentExpression):  "
  1857.                 << "#" << left_hand_side -> id << " "
  1858.                 << lex_stream.NameString(assignment_operator_token)
  1859.                 << " #" << expression -> id << "\n";
  1860.  
  1861.         left_hand_side -> Print(lex_stream);
  1862.         expression -> Print(lex_stream);
  1863.     }
  1864.  
  1865. #endif
  1866.  
  1867. Ast::~Ast()
  1868. {
  1869.     assert(false);
  1870. }
  1871.  
  1872. AstStatement::~AstStatement()
  1873. {
  1874.     assert(false);
  1875. }
  1876.  
  1877. AstExpression::~AstExpression()
  1878. {
  1879.     assert(false);
  1880. }
  1881.  
  1882. AstBlock::~AstBlock()
  1883. {
  1884.     assert(false);
  1885.     //    delete block_statements;
  1886. }
  1887.  
  1888. AstPrimitiveType::~AstPrimitiveType()
  1889. {
  1890.     assert(false);
  1891. }
  1892.  
  1893. AstArrayType::~AstArrayType()
  1894. {
  1895.     assert(false);
  1896.     //    delete type;
  1897.     //    delete brackets;
  1898. }
  1899.  
  1900. AstSimpleName::~AstSimpleName()
  1901. {
  1902.     assert(false);
  1903.     //    delete resolution_opt;
  1904. }
  1905.  
  1906. AstPackageDeclaration::~AstPackageDeclaration()
  1907. {
  1908.     assert(false);
  1909.     //    delete name;
  1910. }
  1911.  
  1912. AstImportDeclaration::~AstImportDeclaration()
  1913. {
  1914.     assert(false);
  1915.     //    delete name;
  1916. }
  1917.  
  1918. AstCompilationUnit::~AstCompilationUnit()
  1919. {
  1920.     assert(false);
  1921.     //    delete package_declaration_opt;
  1922.     //    delete import_declarations;
  1923.     //    delete type_declarations;
  1924. }
  1925.  
  1926. AstModifier::~AstModifier()
  1927. {
  1928.     assert(false);
  1929. }
  1930.  
  1931. AstEmptyDeclaration::~AstEmptyDeclaration()
  1932. {
  1933.     assert(false);
  1934. }
  1935.  
  1936. AstClassBody::~AstClassBody()
  1937. {
  1938.     assert(false);
  1939.     //    delete default_constructor;
  1940.     //    delete instance_variables;
  1941.     //    delete class_variables;
  1942.     //    delete methods;
  1943.     //    delete constructors;
  1944.     //    delete static_initializers;
  1945.     //    delete inner_classes;
  1946.     //    delete inner_interfaces;
  1947.     //    delete blocks;
  1948.     //    delete class_body_declarations;
  1949.     //    delete this_block;
  1950. }
  1951.  
  1952. AstClassDeclaration::~AstClassDeclaration()
  1953. {
  1954.     assert(false);
  1955.     //    delete class_modifiers;
  1956.     //    delete super_opt;
  1957.     //    delete interfaces;
  1958.     //    delete class_body;
  1959. }
  1960.  
  1961. AstArrayInitializer::~AstArrayInitializer()
  1962. {
  1963.     assert(false);
  1964.     //    delete variable_initializers;
  1965. }
  1966.  
  1967. AstBrackets::~AstBrackets()
  1968. {
  1969.     assert(false);
  1970. }
  1971.  
  1972. AstVariableDeclaratorId::~AstVariableDeclaratorId()
  1973. {
  1974.     assert(false);
  1975.     //    delete brackets;
  1976. }
  1977.  
  1978. AstVariableDeclarator::~AstVariableDeclarator()
  1979. {
  1980.     assert(false);
  1981.     //    delete variable_declarator_name;
  1982.     //    delete variable_initializer_opt;
  1983. }
  1984.  
  1985. AstFieldDeclaration::~AstFieldDeclaration()
  1986. {
  1987.     assert(false);
  1988.     //    delete variable_modifiers;
  1989.     //    delete type;
  1990.     //    delete variable_declarators;
  1991. }
  1992.  
  1993. AstFormalParameter::~AstFormalParameter()
  1994. {
  1995.     assert(false);
  1996.     //    delete parameter_modifiers;
  1997.     //    delete type;
  1998.     //    delete variable_declarator_name;
  1999. }
  2000.  
  2001. AstMethodDeclarator::~AstMethodDeclarator()
  2002. {
  2003.     assert(false);
  2004.     //    delete formal_parameters;
  2005.     //    delete brackets;
  2006. }
  2007.  
  2008. AstMethodDeclaration::~AstMethodDeclaration()
  2009. {
  2010.     assert(false);
  2011.     //    delete method_modifiers;
  2012.     //    delete type;
  2013.     //    delete method_declarator;
  2014.     //    delete throws;
  2015.     //    delete method_body;
  2016. }
  2017.  
  2018. AstStaticInitializer::~AstStaticInitializer()
  2019. {
  2020.     assert(false);
  2021.     //    delete block;
  2022. }
  2023.  
  2024. AstThisCall::~AstThisCall()
  2025. {
  2026.     assert(false);
  2027.     //    delete arguments;
  2028.     //    delete base_opt;
  2029.     //    delete local_arguments_opt;
  2030. }
  2031.  
  2032. AstSuperCall::~AstSuperCall()
  2033. {
  2034.     assert(false);
  2035.     //    delete base_opt;
  2036.     //    delete arguments;
  2037.     //    delete local_arguments_opt;
  2038. }
  2039.  
  2040. AstConstructorBlock::~AstConstructorBlock()
  2041. {
  2042.     assert(false);
  2043.     //    delete explicit_constructor_invocation_opt;
  2044.     //    delete block;
  2045.     //    delete local_init_block;
  2046.     //    delete original_constructor_invocation;
  2047. }
  2048.  
  2049. AstConstructorDeclaration::~AstConstructorDeclaration()
  2050. {
  2051.     assert(false);
  2052.     //    delete constructor_modifiers;
  2053.     //    delete constructor_declarator;
  2054.     //    delete throws;
  2055.     //    delete constructor_body;
  2056. }
  2057.  
  2058. AstInterfaceDeclaration::~AstInterfaceDeclaration()
  2059. {
  2060.     assert(false);
  2061.     //    delete class_variables;
  2062.     //    delete abstract_methods;
  2063.     //    delete inner_classes;
  2064.     //    delete inner_interfaces;
  2065.     //    delete interface_modifiers;
  2066.     //    delete extends_interfaces;
  2067.     //    delete interface_member_declarations;
  2068. }
  2069.  
  2070. AstLocalVariableDeclarationStatement::~AstLocalVariableDeclarationStatement()
  2071. {
  2072.     assert(false);
  2073.     //    delete local_modifiers;
  2074.     //    delete type;
  2075.     //    delete variable_declarators;
  2076. }
  2077.  
  2078. AstIfStatement::~AstIfStatement()
  2079. {
  2080.     assert(false);
  2081.     //    delete expression;
  2082.     //    delete true_statement;
  2083.     //    delete false_statement_opt;
  2084. }
  2085.  
  2086. AstEmptyStatement::~AstEmptyStatement()
  2087. {
  2088.     assert(false);
  2089. }
  2090.  
  2091. AstExpressionStatement::~AstExpressionStatement()
  2092. {
  2093.     assert(false);
  2094.     //    delete expression;
  2095. }
  2096.  
  2097. AstCaseLabel::~AstCaseLabel()
  2098. {
  2099.     assert(false);
  2100.     //    delete expression;
  2101. }
  2102.  
  2103. AstDefaultLabel::~AstDefaultLabel()
  2104. {
  2105.     assert(false);
  2106. }
  2107.  
  2108. AstSwitchBlockStatement::~AstSwitchBlockStatement()
  2109. {
  2110.     assert(false);
  2111.     //    delete switch_labels;
  2112.     //    delete block_statements;
  2113. }
  2114.  
  2115. AstSwitchStatement::~AstSwitchStatement()
  2116. {
  2117.     assert(false);
  2118.     //    delete expression;
  2119.     //    delete switch_block;
  2120. }
  2121.  
  2122. AstWhileStatement::~AstWhileStatement()
  2123. {
  2124.     assert(false);
  2125.     //    delete expression;
  2126.     //    delete statement;
  2127. }
  2128.  
  2129. AstDoStatement::~AstDoStatement()
  2130. {
  2131.     assert(false);
  2132.     //    delete statement;
  2133.     //    delete expression;
  2134. }
  2135.  
  2136. AstForStatement::~AstForStatement()
  2137. {
  2138.     assert(false);
  2139.     //    delete for_init_statements;
  2140.     //    delete end_expression_opt;
  2141.     //    delete for_update_statements;
  2142.     //    delete statement;
  2143. }
  2144.  
  2145. AstBreakStatement::~AstBreakStatement()
  2146. {
  2147.     assert(false);
  2148. }
  2149.  
  2150. AstContinueStatement::~AstContinueStatement()
  2151. {
  2152.     assert(false);
  2153. }
  2154.  
  2155. AstReturnStatement::~AstReturnStatement()
  2156. {
  2157.     assert(false);
  2158.     //    delete expression_opt;
  2159. }
  2160.  
  2161. AstThrowStatement::~AstThrowStatement()
  2162. {
  2163.     assert(false);
  2164.     //    delete expression;
  2165. }
  2166.  
  2167. AstSynchronizedStatement::~AstSynchronizedStatement()
  2168. {
  2169.     assert(false);
  2170.     //    delete expression;
  2171.     //    delete block;
  2172. }
  2173.  
  2174. AstCatchClause::~AstCatchClause()
  2175. {
  2176.     assert(false);
  2177.     //    delete formal_parameter;
  2178.     //    delete block;
  2179. }
  2180.  
  2181. AstFinallyClause::~AstFinallyClause()
  2182. {
  2183.     assert(false);
  2184.     //    delete block;
  2185. }
  2186.  
  2187. AstTryStatement::~AstTryStatement()
  2188. {
  2189.     assert(false);
  2190.     //    delete block;
  2191.     //    delete catch_clauses;
  2192.     //    delete finally_clause_opt;
  2193. }
  2194.  
  2195. AstIntegerLiteral::~AstIntegerLiteral()
  2196. {
  2197.     assert(false);
  2198. }
  2199.  
  2200. AstLongLiteral::~AstLongLiteral()
  2201. {
  2202.     assert(false);
  2203. }
  2204.  
  2205. AstFloatingPointLiteral::~AstFloatingPointLiteral()
  2206. {
  2207.     assert(false);
  2208. }
  2209.  
  2210. AstDoubleLiteral::~AstDoubleLiteral()
  2211. {
  2212.     assert(false);
  2213. }
  2214.  
  2215. AstTrueLiteral::~AstTrueLiteral()
  2216. {
  2217.     assert(false);
  2218. }
  2219.  
  2220. AstFalseLiteral::~AstFalseLiteral()
  2221. {
  2222.     assert(false);
  2223. }
  2224.  
  2225. AstStringLiteral::~AstStringLiteral()
  2226. {
  2227.     assert(false);
  2228. }
  2229.  
  2230. AstCharacterLiteral::~AstCharacterLiteral()
  2231. {
  2232.     assert(false);
  2233. }
  2234.  
  2235. AstNullLiteral::~AstNullLiteral()
  2236. {
  2237.     assert(false);
  2238. }
  2239.  
  2240. AstThisExpression::~AstThisExpression()
  2241. {
  2242.     assert(false);
  2243. }
  2244.  
  2245. AstSuperExpression::~AstSuperExpression()
  2246. {
  2247.     assert(false);
  2248. }
  2249.  
  2250. AstParenthesizedExpression::~AstParenthesizedExpression()
  2251. {
  2252.     assert(false);
  2253.     //    delete expression;
  2254. }
  2255.  
  2256. AstTypeExpression::~AstTypeExpression()
  2257. {
  2258.     assert(false);
  2259.     //    delete type;
  2260. }
  2261.  
  2262. AstClassInstanceCreationExpression::~AstClassInstanceCreationExpression()
  2263. {
  2264.     assert(false);
  2265.     //    delete base_opt;
  2266.     //    delete class_type;
  2267.     //    delete arguments;
  2268.     //    delete class_body_opt;
  2269.     //    delete local_arguments_opt;
  2270. }
  2271.  
  2272. AstDimExpr::~AstDimExpr()
  2273. {
  2274.     assert(false);
  2275.     //    delete expression;
  2276. }
  2277.  
  2278. AstArrayCreationExpression::~AstArrayCreationExpression()
  2279. {
  2280.     assert(false);
  2281.     //    delete array_type;
  2282.     //    delete dim_exprs;
  2283.     //    delete brackets;
  2284.     //    delete array_initializer_opt;
  2285. }
  2286.  
  2287. AstFieldAccess::~AstFieldAccess()
  2288. {
  2289.     assert(false);
  2290.     //    delete base;
  2291.     //    delete resolution_opt;
  2292. }
  2293.  
  2294. AstMethodInvocation::~AstMethodInvocation()
  2295. {
  2296.     assert(false);
  2297.     //    delete method;
  2298.     //    delete arguments;
  2299.     //    delete resolution_opt;
  2300. }
  2301.  
  2302. AstArrayAccess::~AstArrayAccess()
  2303. {
  2304.     assert(false);
  2305.     //    delete base;
  2306.     //    delete expression;
  2307. }
  2308.  
  2309. AstPostUnaryExpression::~AstPostUnaryExpression()
  2310. {
  2311.     assert(false);
  2312.     //    delete expression;
  2313. }
  2314.  
  2315. AstPreUnaryExpression::~AstPreUnaryExpression()
  2316. {
  2317.     assert(false);
  2318.     //    delete expression;
  2319. }
  2320.  
  2321. AstCastExpression::~AstCastExpression()
  2322. {
  2323.     assert(false);
  2324.     //    delete type_opt;
  2325.     //    delete brackets;
  2326.     //    delete expression;
  2327. }
  2328.  
  2329. AstBinaryExpression::~AstBinaryExpression()
  2330. {
  2331.    assert(false);
  2332.    //    delete left_expression;
  2333.    //    delete right_expression;
  2334. }
  2335.  
  2336. AstConditionalExpression::~AstConditionalExpression()
  2337. {
  2338.     assert(false);
  2339.     //    delete test_expression;
  2340.     //    delete true_expression;
  2341.     //    delete false_expression;
  2342. }
  2343.  
  2344. AstAssignmentExpression::~AstAssignmentExpression()
  2345. {
  2346.     assert(false);
  2347.     //    delete left_hand_side;
  2348.     //    delete expression;
  2349. }
  2350.  
  2351. #ifdef    HAVE_JIKES_NAMESPACE
  2352. }            // Close namespace Jikes block
  2353. #endif
  2354.  
  2355.