"Fossies" - the Fresh Open Source Software Archive

Member "erltools/pub/cplusplu/test/ref.c.res.ref" (3 Jun 2004, 26024 Bytes) of package /linux/misc/old/erltools-4.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #include "token.h"
    2 
    3 /******************************************************************
    4            Comp : Display a tree on screen
    5    *******************************************************************/
    6 void _fastcall Comp ( tree )
    7 PTREE   tree ;
    8 {
    9   switch ( NumberTree(tree) ) {
   10     case LIST : 
   11         while ( tree ) {
   12             Comp(SonTree(tree, 1));
   13             tree = SonTree(tree, 2);
   14         }
   15         break ;
   16     case DEFINE_metalang : 
   17         if ( !VerifyFileLine() ) {
   18   WriteString(
   19     "\
   20 /*************************************************************************/");
   21             NewLine();
   22   WriteString(
   23     "\
   24 /*                                                                       */");
   25             NewLine();
   26   WriteString(
   27     "\
   28 /*        Produced by MetaGen version 1.1  -    1989                     */");
   29             NewLine();
   30   WriteString(
   31     "\
   32 /*       Syntaxic Analyzer Meta Generator developped by                  */");
   33             NewLine();
   34   WriteString(
   35     "\
   36 /*                  Eric Lavillonniere                                   */");
   37             NewLine();
   38   WriteString(
   39     "\
   40 /*                                                                       */");
   41             NewLine();
   42   WriteString(
   43     "\
   44 /*************************************************************************/");
   45             NewLine();
   46             NewLine();
   47             WriteString("#include \"token.h\"");
   48             NewLine();
   49             WriteString("#include \"");
   50             WriteString(llanguageName);
   51             WriteString("\"");
   52             NewLine();
   53             NewLine();
   54             NewLine();
   55             WriteString("#define _Lex ");
   56             WriteString(NameLang(lexName));
   57             NewLine();
   58             WriteString("#define SortKeyWord ");
   59             WriteString(NameLang("SortKeyWord"));
   60             NewLine();
   61             WriteString("#define UpSortKeyWord ");
   62             WriteString(NameLang("UpSortKeyWord"));
   63             NewLine();
   64             NewLine();
   65         }
   66         WriteString("PTREE ");
   67         WriteString(NameLang(Value(tree)));
   68         strcpy(nameDefine, Value(tree));
   69         FuncName(nameDefine);
   70         WriteString("(error_free)");
   71         NewLine();
   72         WriteString("int error_free;");
   73         NewLine();
   74         WriteString("{");
   75         NewLine();
   76         Tab();
   77         Mark();
   78         WriteString("PFILE_POSITION _filePosition = (PFILE_POSITION) 0;\n");
   79         NewLine();
   80         WriteString("int _value,_nbPre = 0 ;");
   81         NewLine();
   82         WriteString("PCOMM_ELEM _ptPreComm = (tokenAhead || _Lex");
   83         WriteString(
   84             "(),listComm?LookComm(&_nbPre):(_funcLevel++,(PCOMM_ELEM)0));");
   85         NewLine();
   86         WriteString("PTREE lastTree = _lastTree,_retValue ;");
   87         NewLine();
   88         Comp(SonTree(tree, 2));
   89         UnMark();
   90         WriteString("if (!tokenAhead) _Lex() ;");
   91         NewLine();
   92         WriteString(
   93             "if (_nbPre || listComm) AddComm(_ptPreComm,_nbPre,(PTREE) 0,lastTree); else {_lastTree=(PTREE)0;_funcLevel--;}");
   94         NewLine();
   95         WriteString("return((PTREE) 0);");
   96         NewLine();
   97         NewLine();
   98         WriteString(Label(nameDefine));
   99         WriteString(" :");
  100         NewLine();
  101         NewLine();
  102         Tab();
  103         Mark();
  104         FuncLibre(); /* free pointers before exiting */ 
  105         WriteString("_funcLevel--;");
  106         NewLine();
  107         WriteString("return((PTREE) -1) ;");
  108         UnMark();
  109         NewLine();
  110         NewLine();
  111         WriteString(RetLab(nameDefine));
  112         WriteString(" :");
  113         NewLine();
  114         Tab();
  115         Mark();
  116         NewLine();
  117         WriteString("if (!tokenAhead) _Lex() ;");
  118         NewLine();
  119         WriteString(
  120             "if (_nbPre || listComm) AddComm(_ptPreComm,_nbPre,_retValue,lastTree); else {_lastTree=_retValue;_funcLevel--;}");
  121         NewLine();
  122         WriteString("return _retValue ;");
  123         UnMark();
  124         NewLine();
  125         WriteString("}");
  126         NewLine();
  127         NewLine();
  128         FuncFree();
  129         break ;
  130     case CASE_metalang : 
  131         oldFirstMeta = firstMeta ;
  132         firstMeta = 1 ;
  133         i = ClassifyCase(SonTree(tree, 1));
  134         if ( i == 1 ) {
  135             WriteString("if (!tokenAhead) _Lex() ;");
  136             NewLine();
  137             WriteString("switch( lexEl.Value) {");
  138             NewLine();
  139             Tab();
  140             Mark();
  141             length = ListLength(SonTree(tree, 1));
  142             if ( length ) 
  143                 NegateCond();
  144             Comp(SonTree(tree, 1));
  145             while ( length-- ) 
  146                 FreeCond();
  147             if ( Nodefault(SonTree(tree, 1)) ) {
  148                 WriteString("default :");
  149                 NewLine();
  150                 Tab();
  151                 Mark();
  152                 WriteString("CASE_EXIT(");
  153                 WriteString(Label(nameDefine));
  154                 WriteString(",\"");
  155                 tree = SonTree(tree, 1);
  156                 if ( !SonTree(tree, 2) ) 
  157                     CompString(SonTree(SonTree(SonTree(tree, 1), 1), 1));
  158                 else {
  159                     WriteString("either ");
  160                     CompString(SonTree(SonTree(SonTree(tree, 1), 1), 1));
  161                     while ( SonTree(tree, 2) ) {
  162                         tree = SonTree(tree, 2);
  163                         WriteString(" or ");
  164                         CompString(
  165                             SonTree(SonTree(SonTree(tree, 1), 1), 1));
  166                     }
  167                 }
  168                 WriteString("\")");
  169                 NewLine();
  170                 WriteString("break;");
  171                 NewLine();
  172                 UnMark();
  173             }
  174             UnMark();
  175             GotoMark();
  176             WriteString("}");
  177             NewLine();
  178         } else if ( i == 2 && inLex ) {
  179             simpleCase = 1 ;
  180             WriteString("switch (c) {");
  181             NewLine();
  182             Tab();
  183             Mark();
  184             Comp(SonTree(tree, 1));
  185             UnMark();
  186             GotoMark();
  187             WriteString("}");
  188             NewLine();
  189         } else if ( i == 3 && inLex ) {
  190             Comp(SonTree(tree, 1));
  191             WriteString(" ;");
  192             NewLine();
  193         } else {
  194             ifCase = 1 ; /* case as if out lex */ 
  195             Comp(SonTree(tree, 1));
  196             WriteString(" ;");
  197             NewLine();
  198         }
  199         firstMeta = oldFirstMeta ;
  200         break ;
  201     case SWITCH_metalang : 
  202         i = NumberTree(SonTree(tree, 1));
  203         if ( !ifCase && (i == TAKE_metalang || i == SEE_metalang) ) {
  204             ptTree = SonTree(SonTree(tree, 1), 1);
  205             NegateCond();
  206             if ( NumberTree(ptTree) == EXCLA_metalang
  207                     && FindConst("META") != -1
  208                     && firstMeta
  209                     && strcmp(Value(ptTree), "NOTHING")
  210                     && (strcmp(Value(ptTree), "META") || (firstMeta = 0)) ) {
  211                 firstMeta = 0 ;
  212                 WriteString("case ");
  213                 WriteString(NameLang("META"));
  214                 WriteString(":");
  215                 NewLine();
  216             }
  217             if ( NumberTree(ptTree) != EXCLA_metalang
  218                     || strcmp(Value(SonTree(SonTree(ptTree, 1), 1))
  219                         , "NOTHING") ) {
  220                 AllocCond(SonTree(tree, 1));
  221                 WriteString("case ");
  222                 Comp(ptTree);
  223             } else 
  224                 WriteString("default");
  225             WriteString(" : ");
  226             NewLine();
  227             Tab();
  228             Mark();
  229             if ( NumberTree(SonTree(tree, 1)) == TAKE_metalang ) {
  230                 WriteString("tokenAhead = 0 ;");
  231                 NewLine();
  232                 WriteString("CommTerm();");
  233                 NewLine();
  234             }
  235             statement = 1 ;
  236             Comp(SonTree(tree, 2));
  237             WriteString("break;");
  238             NewLine();
  239             UnMark();
  240             GotoMark();
  241         } else {
  242             if ( !ifCase && simpleCase ) {
  243                 Comp(SonTree(tree, 1));
  244                 NewLine();
  245                 Tab();
  246                 Mark();
  247                 if ( !SonTree(SonTree(tree, 1), 1) ) {
  248                     length = 1 ;
  249                     WriteString(" if (c!= EOF) {");
  250                     NewLine();
  251                     Tab();
  252                     Mark();
  253                 }
  254                 if ( NumberTree(SonTree(tree, 1)) == TAKEL_metalang ) {
  255                     WriteString("NextChar();");
  256                     NewLine();
  257                 }
  258                 simpleCase = 0 ;
  259                 Comp(SonTree(tree, 2));
  260                 if ( length ) {
  261                     UnMark();
  262                     GotoMark();
  263                     WriteString("}");
  264                     NewLine();
  265                 }
  266                 WriteString("break ;");
  267                 UnMark();
  268                 NewLine();
  269             } else {
  270                 i = 0 ;
  271                 ptTree = SonTree(SonTree(tree, 1), 1);
  272                 if ( (NumberTree(SonTree(tree, 1)) == TAKE_metalang
  273                         || NumberTree(SonTree(tree, 1)) == SEE_metalang)
  274                         && NumberTree(ptTree) == IDENT_metalang ) {
  275                     i = 1 ;
  276                 }
  277                 statement = 0 ;
  278                 if ( !ptTree
  279                         || NumberTree(ptTree) != EXCLA_metalang
  280                         || strcmp(BrainyValue(ptTree), "NOTHING") ) {
  281                     WriteString("if(");
  282                     Comp(SonTree(tree, 1));
  283                     WriteString(")");
  284                 } else 
  285                     WriteString("if (1) ");
  286                 statement = 1 ;
  287                 WriteString("{");
  288                 NewLine();
  289                 Tab();
  290                 Mark();
  291                 Comp(SonTree(tree, 2));
  292                 UnMark();
  293                 GotoMark();
  294                 WriteString("} else ");
  295             }
  296         }
  297         break ;
  298     case STOREL_metalang : 
  299         if ( !inLex ) {
  300             WriteString("if (tokenAhead) ExtUnputBuf() ;");
  301             NewLine();
  302         }
  303         if ( NumberTree(SonTree(tree, 1)) == TAKEL_metalang ) {
  304             WriteString("{");
  305             NewLine();
  306             Tab();
  307             Mark();
  308             WriteString("if (_nbCharact++ < MAXLENGTH) *_ptString++ = c;");
  309             NewLine();
  310             WriteString("NextChar();");
  311             UnMark();
  312             NewLine();
  313             WriteString("}");
  314             NewLine();
  315         } else {
  316             WriteString("{");
  317             NewLine();
  318             Tab();
  319             Mark();
  320             WriteString("if (_nbCharact + strlen(");
  321             WriteString("\"");
  322             WriteString(Value(SonTree(SonTree(tree, 1), 1)));
  323             WriteString("\"");
  324             WriteString(") < MAXLENGTH) ");
  325             NewLine();
  326             Tab();
  327             Mark();
  328             WriteString("strcpy(_ptString,");
  329             WriteString("\"");
  330             WriteString(Value(SonTree(SonTree(tree, 1), 1)));
  331             WriteString("\"");
  332             WriteString(");");
  333             UnMark();
  334             NewLine();
  335             WriteString("_nbCharact += strlen(");
  336             WriteString("\"");
  337             WriteString(Value(SonTree(SonTree(tree, 1), 1)));
  338             WriteString("\"");
  339             WriteString(");");
  340             WriteString("_ptString = lexEl.string + _nbCharact;");
  341             NewLine();
  342             UnMark();
  343             NewLine();
  344             WriteString("}");
  345             NewLine();
  346         }
  347         break ;
  348     case TAKEL_metalang : length = 1 ;
  349     case SEEL_metalang : 
  350         if ( simpleCase ) {
  351             if ( !SonTree(tree, 1) ) 
  352                 WriteString("default : ");
  353             else if ( NumberTree(SonTree(tree, 1)) == CHARACTER_metalang ) 
  354                 CaseCharac(Value(SonTree(SonTree(tree, 1), 1)));
  355             else if ( NumberTree(SonTree(tree, 1)) == IN_metalang ) {
  356                 tree = SonTree(SonTree(SonTree(tree, 1), 1), 1);
  357                 while ( tree ) {
  358                     if ( NumberTree(SonTree(tree, 1))
  359                             == CHARACTER_metalang ) 
  360                         CaseCharac(Value(SonTree(SonTree(tree, 1), 1)));
  361                     else {
  362                         cardeb
  363                             = ConvertChar(
  364                                 Value(
  365                                     SonTree(SonTree(SonTree(tree, 1), 1), 1)));
  366                         carend
  367                             = ConvertChar(
  368                                 Value(
  369                                     SonTree(SonTree(SonTree(tree, 1), 2), 1)));
  370                         CaseCharac(cardeb);
  371                         while ( IncrChar(cardeb, carend) ) {
  372                             NewLine();
  373                             CaseCharac(cardeb);
  374                         }
  375                         NewLine();
  376                         CaseCharac(carend);
  377                     }
  378                     if ( tree = SonTree(tree, 2) ) 
  379                         NewLine();
  380                 }
  381             }
  382         } else {
  383             if ( statement ) 
  384                 WriteString("if (!");
  385             if ( !inLex ) 
  386                 WriteString("((!tokenAhead || ExtUnputBuf ()) && ");
  387             WriteString("(");
  388             if ( !SonTree(tree, 1) ) 
  389                 WriteString("c != EOF");
  390             else if ( NumberTree(SonTree(tree, 1)) == CHARACTER_metalang ) {
  391                 WriteString("c == ");
  392                 Comp(SonTree(tree, 1));
  393             } else if ( NumberTree(SonTree(tree, 1)) == IN_metalang ) {
  394                 tree = SonTree(SonTree(SonTree(tree, 1), 1), 1);
  395                 i = 0 ;
  396                 WriteString("(");
  397                 while ( tree ) {
  398                     if ( i ) 
  399                         WriteString("||");
  400                     else 
  401                         i = 1 ;
  402                     WriteString("(");
  403                     if ( NumberTree(SonTree(tree, 1))
  404                             == CHARACTER_metalang ) {
  405                         WriteString("c == ");
  406                         Comp(SonTree(tree, 1));
  407                     } else {
  408                         Comp(SonTree(SonTree(tree, 1), 1));
  409                         WriteString(" <= c && c <= ");
  410                         Comp(SonTree(SonTree(tree, 1), 2));
  411                     }
  412                     WriteString(")");
  413                     tree = SonTree(tree, 2);
  414                 }
  415                 WriteString(")");
  416             } else {
  417                 WriteString("GetString(");
  418                 WriteString("\"");
  419                 WriteString(Value(SonTree(SonTree(tree, 1), 1)));
  420                 WriteString("\"");
  421                 if ( length ) 
  422                     WriteString(",1)");
  423                 else 
  424                     WriteString(",0)");
  425             }
  426             if ( length ) 
  427                 WriteString("&& NextChar())");
  428             else 
  429                 WriteString(")");
  430             if ( !inLex ) 
  431                 WriteString(")");
  432             if ( statement ) {
  433                 if ( !inLex ) {
  434                     WriteString(") {");
  435                     NewLine();
  436                     Tab();
  437                     Mark();
  438   WriteString(
  439     "sprintf(errStr,\"Error unexpected \\\"%s\\\" at line %d \\n\",GetLexString(),line);");
  440                     NewLine();
  441                     WriteString("PrintError(errStr,error_free);");
  442                     NewLine();
  443                     WriteString("goto ");
  444                     WriteString(Label(nameDefine));
  445                     WriteString(";");
  446                     UnMark();
  447                     NewLine();
  448                     WriteString("}");
  449                     NewLine();
  450                 } else {
  451                     WriteString(") ;");
  452                     NewLine();
  453                 }
  454             }
  455         }
  456         break ;
  457     case TAKE_metalang : 
  458         if ( !statement ) 
  459             if ( NumberTree(tree) == IDENT_metalang ) {
  460                 WriteString("(PUSH_CALL_AFF(");
  461                 if ( equality ) {
  462                     WriteString(ptEquality);
  463                     WriteString(" = ");
  464                 } else 
  465                     WriteString("NOTHING");
  466                 WriteString(",");
  467                 WriteString(NameLang(Value(tree)));
  468                 WriteString("))");
  469             } else {
  470                 WriteString("((tokenAhead || _Lex()) && ");
  471                 i = 0 ; /* is a meta welcomed here */ 
  472                 if ( FindConst("META") != -1
  473                         && NumberTree(tree) == EXCLA_metalang ) {
  474                     i = 1 ;
  475                     WriteString("TERM_OR_META(");
  476                     Comp(tree);
  477                     WriteString(")");
  478                 } else {
  479                     WriteString("lexEl.Value == ");
  480                     Comp(tree);
  481                 }
  482                 if ( equality ) {
  483                     WriteString(" && !(tokenAhead = 0) && (");
  484                     if ( !i ) {
  485                         WriteString(ptEquality);
  486                         WriteString(" = CommString(lexEl.string)))");
  487                     } else {
  488                         WriteString(" BUILD_TERM_META(");
  489                         WriteString(ptEquality);
  490                         WriteString("))) ");
  491                     }
  492                 } else 
  493                     WriteString(" && (tokenAhead = 0,CommTerm(),1))");
  494             }
  495         else if ( NumberTree(tree) == IDENT_metalang ) {
  496             WriteString("if ( (");
  497             if ( equality ) {
  498                 WriteString(ptEquality);
  499                 WriteString("=");
  500             }
  501             WriteString(NameLang(Value(tree)));
  502             WriteString("(error_free)) == (PTREE) -1 ) ");
  503             NewLine();
  504             Tab();
  505             WriteString("PROG_EXIT(");
  506             WriteString(Label(nameDefine));
  507             WriteString(",\"");
  508             WriteString(nameDefine);
  509             WriteString("\")");
  510             NewLine();
  511         } else {
  512             WriteString("if (!tokenAhead) _Lex() ;");
  513             NewLine();
  514             i = 0 ; /* is a meta welcomed here */ 
  515             if ( FindConst("META") != -1
  516                     && NumberTree(tree) == EXCLA_metalang ) {
  517                 i = 1 ;
  518                 WriteString("if ( ! TERM_OR_META(");
  519                 Comp(tree);
  520                 WriteString(")");
  521             } else {
  522                 WriteString("if (  lexEl.Value != ");
  523                 Comp(tree);
  524             }
  525             if ( equality ) {
  526                 WriteString(" || !(");
  527                 if ( !i ) {
  528                     WriteString(ptEquality);
  529                     WriteString(" = CommString(lexEl.string))");
  530                 } else {
  531                     WriteString("BUILD_TERM_META(");
  532                     WriteString(ptEquality);
  533                     WriteString("))");
  534                 }
  535             } else 
  536                 WriteString(" || !(CommTerm(),1)");
  537             WriteString(") ");
  538             NewLine();
  539             Tab();
  540             WriteString("TOKEN_EXIT(");
  541             WriteString(Label(nameDefine));
  542             WriteString(",\"");
  543             CompString(tree);
  544             WriteString("\")");
  545             NewLine();
  546         }
  547         break ;
  548     case LANGUAGE_metalang : 
  549         WriteString(
  550             "\
  551 /*************************************************************************/");
  552         NewLine();
  553         WriteString(
  554             "\
  555 /*                                                                       */");
  556         NewLine();
  557         WriteString(
  558             "\
  559 /*        Produced by MetaGen version 1.1  -    1989                     */");
  560         NewLine();
  561         WriteString(
  562             "\
  563 /*       Syntaxic Analyzer Meta Generator developped by                  */");
  564         NewLine();
  565         WriteString(
  566             "\
  567 /*                  Eric Lavillonniere                                   */");
  568         NewLine();
  569         WriteString(
  570             "\
  571 /*                                                                       */");
  572         NewLine();
  573         WriteString(
  574             "\
  575 /*************************************************************************/");
  576         WriteString(
  577             "#define TERM_OR_META(x) (lexEl.Value == x || lexEl.Value ==");
  578         WriteString("#define BUILD_TERM_META(x) (lexEl.Value ==");
  579         WriteString(
  580             "?( x =MakeTree(META,1),ReplaceTree(x,1,CommString(lexEl.string))): (x= CommString(lexEl.string)))");
  581         while ( ptTree = SonTree(ptTree, 2) ) 
  582             if ( NumberTree(SonTree(ptTree, 1)) == DEFINE_metalang ) {
  583                 WriteString("PTREE ");
  584                 WriteString(NameLang(Value(ptTree)));
  585 #               ifndef SUN
  586                     WriteString(" ( int );");
  587 #               else 
  588                     WriteString("();");
  589 #               endif
  590                 NewLine();
  591             } else if ( NumberTree(SonTree(ptTree, 1)) == LEX_metalang ) {
  592                 lexName = AllocString(Value(ptTree));
  593                 foundLexName = 1 ;
  594             } else if ( NumberTree(SonTree(ptTree, 1)) == GLOBAL_metalang ) 
  595                 ptGlobal = SonTree(SonTree(ptTree, 1), 1);
  596             else if ( NumberTree(SonTree(ptTree, 1)) == LEXDEFINE_metalang ) {
  597                 nbLexDefine++ ;
  598                 if ( !foundLexName ) 
  599                     lexName = AllocString(Value(ptTree));
  600             }
  601         while ( ptTree = SonTree(ptTree, 2) ) 
  602             if ( ptTree
  603                     && NumberTree(SonTree(ptTree, 1))
  604                         == LEXDEFINE_metalang ) {
  605                 CompLexDefine(SonTree(ptTree, 1));
  606                 NewLine();
  607             }
  608         DumpNode();
  609 #       ifdef SUN
  610             writeLine = 0 ;
  611             output = loutput ;
  612             LispMake();
  613             output = coutput ;
  614 #       endif
  615         break ;
  616     case EQUAL_metalang : 
  617         switch ( NumberTree(SonTree(tree, 2)) ) {
  618             case NIL_metalang : 
  619             case FUNC_metalang : 
  620             case IDENT_metalang : 
  621             case NUMB_metalang : 
  622                 if ( !statement ) 
  623                     WriteString("(");
  624                 Comp(SonTree(tree, 1));
  625                 if ( statement ) 
  626                     WriteString("= ");
  627                 else 
  628                     WriteString("== ");
  629                 Comp(SonTree(tree, 2));
  630                 if ( !statement ) 
  631                     WriteString(")");
  632                 if ( statement ) 
  633                     if ( NumberTree(SonTree(tree, 2)) == IDENT_metalang ) {
  634                         WriteString(";");
  635                         NewLine();
  636                         interString
  637                             = AllocString(
  638                                 Value(SonTree(SonTree(tree, 1), 1)));
  639                         MakeEquiv(interString
  640                             , Value(SonTree(SonTree(tree, 2), 1)));
  641                         free(interString);
  642                     } else if ( NumberTree(SonTree(tree, 2))
  643                                 == NIL_metalang ) {
  644                         WriteString(";");
  645                         NewLine();
  646                     }
  647                 break ;
  648             case TAKE_metalang : 
  649                 equality = 1 ;
  650                 ptEquality
  651                     = AllocString(Value(SonTree(SonTree(tree, 1), 1)));
  652                 Comp(SonTree(tree, 2));
  653                 equality = 0 ;
  654                 SetUse(ptEquality);
  655                 free(ptEquality);
  656                 break ;
  657             case MAKETREE_metalang : 
  658                 interString
  659                     = AllocString(Value(SonTree(SonTree(tree, 1), 1)));
  660                 MakeTreeGen(interString, SonTree(tree, 2), 0);
  661                 free(interString);
  662                 break ;
  663             case ADDLIST_metalang : 
  664                 AddListGen(interString, SonTree(tree, 2), 0);
  665                 break ;
  666             case REPLACETREE_metalang : 
  667                 interString
  668                     = AllocString(Value(SonTree(SonTree(tree, 1), 1)));
  669                 ReplaceTreeGen(interString, SonTree(tree, 2), 0);
  670         }
  671         break ;
  672     case FUNC_metalang : 
  673         if ( !statement ) 
  674             WriteString("(");
  675         Comp(SonTree(tree, 1));
  676         WriteString("(");
  677         tree = SonTree(tree, 2);
  678         while ( tree ) {
  679             Comp(SonTree(tree, 1));
  680             tree = SonTree(tree, 2);
  681             if ( tree ) 
  682                 WriteString(",");
  683         }
  684         WriteString(")");
  685         if ( statement ) {
  686             WriteString(";");
  687             NewLine();
  688         } else 
  689             WriteString(")");
  690         break ;
  691     case STRING_metalang : 
  692         tree = SonTree(tree, 1);
  693         treeToken
  694             = AddToken(Value(tree), SymboName(Value(tree), 0), treeToken);
  695         WriteString(SymboName(Value(tree), 0));
  696         break ;
  697     case DECLARE_metalang : 
  698         WriteString("PTREE ");
  699         ptTree = tree = SonTree(tree, 1);
  700         while ( tree ) {
  701             Comp(SonTree(tree, 1));
  702             WriteString("= (PTREE) 0");
  703             InsertDecElem(AllocString(Value(tree)));
  704             tree = SonTree(tree, 2);
  705             if ( tree ) 
  706                 WriteString(",");
  707         }
  708         WriteString(";");
  709         NewLine();
  710         break ;
  711     case SKIP_metalang : 
  712         ptTree = tree = SonTree(tree, 1);
  713         i = 0 ;
  714         if ( inLex ) 
  715             WriteString("ptStockBuf = -1;");
  716         else 
  717             WriteString("ExtUnputBuf();");
  718         NewLine();
  719         WriteString("while (");
  720         while ( tree ) {
  721             if ( i ) 
  722                 WriteString("||");
  723             else 
  724                 i = 1 ;
  725             WriteString("(");
  726             if ( NumberTree(SonTree(tree, 1)) == CHARACTER_metalang ) {
  727                 WriteString("c == ");
  728                 Comp(SonTree(tree, 1));
  729             } else {
  730                 Comp(SonTree(SonTree(tree, 1), 1));
  731                 WriteString(" <= c && c <= ");
  732                 Comp(SonTree(SonTree(tree, 1), 2));
  733             }
  734             WriteString(")");
  735             tree = SonTree(tree, 2);
  736         }
  737         break ;
  738   }
  739 }