
#line 31 "outil.ch"
/*************************************************************************/
#line 31 "outil.ch"
/*                                                                       */
#line 31 "outil.ch"
/*        Produced by Metachop version 2.0  -    1989-1995               */
#line 31 "outil.ch"
/*     Tree      Meta     Chopper      developped    by                  */
#line 31 "outil.ch"
/*                  Eric Lavillonniere                                   */
#line 31 "outil.ch"
/*                                                                       */
#line 31 "outil.ch"
/*************************************************************************/
#line 31 "outil.ch"
#line 31 "outil.ch"
#include "token.h"
#line 31 "outil.ch"
extern int _retVal[50];
#line 31 "outil.ch"
extern PPTREE _storeVal[50],_nextVal;
#line 31 "outil.ch"
extern PPTREE stackTree[1024];
#line 31 "outil.ch"
extern int ptStackTree;
#line 31 "outil.ch"
#define decomp decomp_metachop
#line 31 "outil.ch"
#line 31 "outil.ch"
#ifndef for_elem
#line 31 "outil.ch"
#line 31 "outil.ch"
#define for_elem _for_elem
#line 31 "outil.ch"
#endif
#ifdef INCONNU
#line 31 "outil.ch"
#line 31 "outil.ch"
PTREE   for_elem ;
#line 31 "outil.ch"
#line 31 "outil.ch"
#endif
#define DISABLE_EXTERN_INCLUDE 

#include "interf.h"
#include <stdio.h>
#include <fcntl.h>

#ifndef SUN
#line 31 "outil.ch"
#line 41 "outil.ch"
#include <io.h>
#line 41 "outil.ch"
#line 42 "outil.ch"
#include <sys\types.h>
#line 42 "outil.ch"
#line 43 "outil.ch"
#include <sys\stat.h>
#line 43 "outil.ch"
#line 44 "outil.ch"
#include <stdlib.h>
#line 44 "outil.ch"
#endif
#if I386 || LINUX
#line 44 "outil.ch"
#else 
#include <stdarg.h>
#endif
#ifdef SUN
#line 44 "outil.ch"
#line 53 "outil.ch"
#include "memges.h"
#line 53 "outil.ch"
#else 
#include "memges.h"
#endif

void    InsertVar (char *, PTREE, int, PTREE) ;
extern char *currentLanguage ;
extern int  firstError ;
PVAR    listVar = (PVAR)0, listFreeVar = (PVAR)0 ;
int cplusGen ;

#line 68 "outil.ch"
#line 68 "outil.ch"
int CompareTree ( PTREE tree1, PTREE tree2, PTREE father, int slot )
#line 68 "outil.ch"
{
#line 68 "outil.ch"
#line 71 "outil.ch"
    int arity, currParam ;
#line 71 "outil.ch"
#line 72 "outil.ch"
    int nbTree1 ;
#line 72 "outil.ch"
#line 74 "outil.ch"
debut : 
#line 74 "outil.ch"
#line 75 "outil.ch"
    nbTree1 = NumberTree(tree1);
#line 75 "outil.ch"
#line 76 "outil.ch"
    if ( nbTree1 == META ) {
#line 76 "outil.ch"
#line 77 "outil.ch"
                                InsertVar(AllocString(BrainyValue(tree1)), father, slot, tree2);
#line 77 "outil.ch"
#line 78 "outil.ch"
                                return (1);
#line 78 "outil.ch"
#line 78 "outil.ch"
                             }
#line 78 "outil.ch"
#line 80 "outil.ch"
    if ( (!tree1) || (!tree2) ) 
#line 80 "outil.ch"
#line 81 "outil.ch"
        return !((!tree1) ^ (!tree2));
#line 81 "outil.ch"
#line 82 "outil.ch"
    if ( NumberTree(tree1) == NumberTree(tree2) ) {
#line 82 "outil.ch"
#line 83 "outil.ch"
                                                        if ( NumberTree(tree1) == TERM_TREE ) {
#line 83 "outil.ch"
#line 86 "outil.ch"
return !strcmp(CacheAddrRead((long)sontree(tree1, 1)), CacheAddrRead((long)sontree(tree2, 1)));
#line 86 "outil.ch"
#line 86 "outil.ch"
                                                                                                 } else 
#line 88 "outil.ch"
                                                        {
#line 88 "outil.ch"
#line 89 "outil.ch"
                                                            if ( (arity = treearity(tree1)) >= 1 ) {
#line 89 "outil.ch"
#line 90 "outil.ch"
#line 90 "outil.ch"
for ( currParam = arity ; currParam > 1 ; currParam-- ) 
#line 90 "outil.ch"
#line 91 "outil.ch"
    if ( !CompareTree(sontree(tree1, currParam), sontree(tree2, currParam), tree2, currParam) ) 
#line 91 "outil.ch"
#line 93 "outil.ch"
        return (0);
#line 93 "outil.ch"
#line 93 "outil.ch"
#line 96 "outil.ch"
(tree1=sontree(tree1, 1));
#line 96 "outil.ch"
#line 96 "outil.ch"
#line 97 "outil.ch"
(tree2=sontree(tree2, 1));
#line 97 "outil.ch"
#line 97 "outil.ch"
#line 98 "outil.ch"
(father=tree2);
#line 98 "outil.ch"
#line 98 "outil.ch"
#line 99 "outil.ch"
slot = 1 ;
#line 99 "outil.ch"
#line 100 "outil.ch"
goto debut ;
#line 100 "outil.ch"
#line 100 "outil.ch"
                                                                                                        }
#line 100 "outil.ch"
#line 102 "outil.ch"
                                                            return (1);
#line 102 "outil.ch"
#line 102 "outil.ch"
                                                        }
#line 102 "outil.ch"
#line 102 "outil.ch"
                                                      } else 
#line 102 "outil.ch"
#line 105 "outil.ch"
        return (0);
#line 105 "outil.ch"
#line 105 "outil.ch"
#line 106 "outil.ch"
}
#line 106 "outil.ch"

#line 112 "outil.ch"
#line 112 "outil.ch"
int QCompareTree ( PPTREE tree1, PPTREE tree2, PPTREE father, int slot )
#line 112 "outil.ch"
{
#line 112 "outil.ch"
#line 115 "outil.ch"
    int arity, currParam ;
#line 115 "outil.ch"
#line 116 "outil.ch"
    int nbTree1 ;
#line 116 "outil.ch"
#line 118 "outil.ch"
debut : 
#line 118 "outil.ch"
#line 119 "outil.ch"
    nbTree1 = NumberTree(tree1);
#line 119 "outil.ch"
#line 120 "outil.ch"
    if ( nbTree1 == META ) 
#line 120 "outil.ch"
#line 121 "outil.ch"
        return (1);
#line 121 "outil.ch"
#line 122 "outil.ch"
    if ( !tree1 || !tree2 ) 
#line 122 "outil.ch"
#line 123 "outil.ch"
        return !(!tree1 ^ !tree2);
#line 123 "outil.ch"
#line 124 "outil.ch"
    if ( nbTree1 == NumberTree(tree2) ) {
#line 124 "outil.ch"
#line 125 "outil.ch"
                                            if ( nbTree1 == TERM_TREE ) {
#line 125 "outil.ch"
#line 128 "outil.ch"
return !strcmp(CacheAddrRead(SON_READ((PPTREE)tree1, 1)), CacheAddrRead(SON_READ((PPTREE)tree2, 1)));
#line 128 "outil.ch"
#line 128 "outil.ch"
                                                                          } else 
#line 130 "outil.ch"
                                            {
#line 130 "outil.ch"
#line 131 "outil.ch"
                                                if ( (arity = treearity(tree1)) >= 1 ) {
#line 131 "outil.ch"
#line 132 "outil.ch"
#line 132 "outil.ch"
for ( currParam = arity ; currParam > 1 ; currParam-- ) 
#line 132 "outil.ch"
#line 133 "outil.ch"
    if ( !QCompareTree(sontree(tree1, currParam), sontree(tree2, currParam), (PPTREE)0, - 1) ) 
#line 133 "outil.ch"
#line 135 "outil.ch"
        return (0);
#line 135 "outil.ch"
#line 135 "outil.ch"
#line 138 "outil.ch"
tree1 = sontree(tree1, 1);
#line 138 "outil.ch"
#line 139 "outil.ch"
tree2 = sontree(tree2, 1);
#line 139 "outil.ch"
#line 140 "outil.ch"
goto debut ;
#line 140 "outil.ch"
#line 140 "outil.ch"
                                                                                            }
#line 140 "outil.ch"
#line 142 "outil.ch"
                                                return (1);
#line 142 "outil.ch"
#line 142 "outil.ch"
                                            }
#line 142 "outil.ch"
#line 142 "outil.ch"
                                           } else 
#line 142 "outil.ch"
#line 145 "outil.ch"
        return (0);
#line 145 "outil.ch"
#line 145 "outil.ch"
#line 146 "outil.ch"
}
#line 146 "outil.ch"

#line 152 "outil.ch"
#line 152 "outil.ch"
PVAR AllocVar ()
#line 152 "outil.ch"
{
#line 152 "outil.ch"
#line 155 "outil.ch"
    PVAR    myPoint ;
#line 155 "outil.ch"
#line 157 "outil.ch"
    if ( listFreeVar ) {
#line 157 "outil.ch"
#line 158 "outil.ch"
                            myPoint = listFreeVar ;
#line 158 "outil.ch"
#line 159 "outil.ch"
                            listFreeVar = listFreeVar -> next ;
#line 159 "outil.ch"
#line 159 "outil.ch"
                        } else 
#line 159 "outil.ch"
#line 161 "outil.ch"
        myPoint = (PVAR)malloc(sizeof(VAR));
#line 161 "outil.ch"
#line 161 "outil.ch"
#line 162 "outil.ch"
    myPoint -> name = (char *)0 ;
#line 162 "outil.ch"
#line 163 "outil.ch"
    myPoint -> father = (PPTREE)0 ;
#line 163 "outil.ch"
#line 164 "outil.ch"
    myPoint -> slot = - 1 ;
#line 164 "outil.ch"
#line 165 "outil.ch"
    myPoint -> elem = (PPTREE)0 ;
#line 165 "outil.ch"
#line 166 "outil.ch"
    return (myPoint);
#line 166 "outil.ch"
#line 167 "outil.ch"
}
#line 167 "outil.ch"

#line 173 "outil.ch"
#line 173 "outil.ch"
void FreeVar ()
#line 173 "outil.ch"
{
#line 173 "outil.ch"
#line 176 "outil.ch"
    PVAR    interVar, frontVar ;
#line 176 "outil.ch"
#line 178 "outil.ch"
    interVar = frontVar = listVar ;
#line 178 "outil.ch"
#line 179 "outil.ch"
    while ( frontVar ) {
#line 179 "outil.ch"
#line 180 "outil.ch"
                            interVar = frontVar ;
#line 180 "outil.ch"
#line 181 "outil.ch"
                            free(frontVar -> name);
#line 181 "outil.ch"
#line 182 "outil.ch"
                            frontVar = frontVar -> next ;
#line 182 "outil.ch"
#line 182 "outil.ch"
                        }
#line 182 "outil.ch"
#line 184 "outil.ch"
    if ( frontVar != interVar ) {
#line 184 "outil.ch"
#line 185 "outil.ch"
                                    interVar -> next = listFreeVar ;
#line 185 "outil.ch"
#line 186 "outil.ch"
                                    listFreeVar = listVar ;
#line 186 "outil.ch"
#line 187 "outil.ch"
                                    listVar = (PVAR)0 ;
#line 187 "outil.ch"
#line 187 "outil.ch"
                                  }
#line 187 "outil.ch"
#line 189 "outil.ch"
}
#line 189 "outil.ch"

#line 195 "outil.ch"
#line 195 "outil.ch"
void InsertVar ( char *name, PTREE father, int slot, PTREE elem )
#line 195 "outil.ch"
{
#line 195 "outil.ch"
#line 198 "outil.ch"
    PVAR    pVar ;
#line 198 "outil.ch"
#line 200 "outil.ch"
    pVar = AllocVar();
#line 200 "outil.ch"
#line 201 "outil.ch"
    pVar -> name = name ;
#line 201 "outil.ch"
#line 202 "outil.ch"
    pVar -> father = father ;
#line 202 "outil.ch"
#line 203 "outil.ch"
    pVar -> slot = slot ;
#line 203 "outil.ch"
#line 204 "outil.ch"
    pVar -> elem = elem ;
#line 204 "outil.ch"
#line 205 "outil.ch"
    pVar -> next = listVar ;
#line 205 "outil.ch"
#line 206 "outil.ch"
    listVar = pVar ;
#line 206 "outil.ch"
#line 207 "outil.ch"
}
#line 207 "outil.ch"

#line 213 "outil.ch"
#line 213 "outil.ch"
PVAR SearchVar ( char *name )
#line 213 "outil.ch"
{
#line 213 "outil.ch"
#line 216 "outil.ch"
    register PVAR   pVar = listVar ;
#line 216 "outil.ch"
#line 218 "outil.ch"
    while ( pVar ) {
#line 218 "outil.ch"
#line 219 "outil.ch"
                        if ( !strcmp(pVar -> name, name) ) 
#line 219 "outil.ch"
#line 220 "outil.ch"
                            return (pVar);
#line 220 "outil.ch"
#line 221 "outil.ch"
                        pVar = pVar -> next ;
#line 221 "outil.ch"
#line 221 "outil.ch"
                    }
#line 221 "outil.ch"
#line 223 "outil.ch"
    return (PVAR)0 ;
#line 223 "outil.ch"
#line 224 "outil.ch"
}
#line 224 "outil.ch"

#line 230 "outil.ch"
#line 230 "outil.ch"
PTREE ForeachTreeMeta ( char *name, PTREE treeApp, PTREE(*callFunct)(PTREE, PTREE, int), PTREE father, int position )
#line 230 "outil.ch"
{
#line 230 "outil.ch"
#line 234 "outil.ch"
    int arity, currParam ;
#line 234 "outil.ch"
#line 236 "outil.ch"
    if ( (!treeApp) ) 
#line 236 "outil.ch"
#line 237 "outil.ch"
        return (PPTREE)0 ;
#line 237 "outil.ch"
#line 238 "outil.ch"
    if ( NumberTree(treeApp) == META && !strcmp(BrainyValue(treeApp), name) ) 
#line 238 "outil.ch"
#line 239 "outil.ch"
        return (PTREE)(*callFunct)(treeApp, father, position);
#line 239 "outil.ch"
#line 240 "outil.ch"
    if ( NumberTree(treeApp) == IN_LANGUAGE ) 
#line 240 "outil.ch"
#line 241 "outil.ch"
        return (PPTREE)0 ;
#line 241 "outil.ch"
#line 242 "outil.ch"
    if ( NumberTree(treeApp) != TERM_TREE ) {
#line 242 "outil.ch"
#line 243 "outil.ch"
                                                arity = treearity(treeApp);
#line 243 "outil.ch"
#line 244 "outil.ch"
#line 244 "outil.ch"
                                                for ( currParam = 1 ; currParam <= arity ; currParam++ ) 
#line 244 "outil.ch"
#line 245 "outil.ch"
                                                    ForeachTreeMeta(name, sontree(treeApp, currParam), callFunct, treeApp, currParam);
#line 245 "outil.ch"
#line 245 "outil.ch"
#line 247 "outil.ch"
                                                return treeApp ;
#line 247 "outil.ch"
#line 247 "outil.ch"
                                               }
#line 247 "outil.ch"
#line 249 "outil.ch"
    return (PPTREE)0 ;
#line 249 "outil.ch"
#line 250 "outil.ch"
}
#line 250 "outil.ch"

static PTREE    treeSubstitution ;
#line 250 "outil.ch"
static int  nbSubstitution ;

#line 260 "outil.ch"
#line 260 "outil.ch"
PTREE ForReplace ( PTREE elem, PTREE father, int slot )
#line 260 "outil.ch"
{
#line 260 "outil.ch"
#line 262 "outil.ch"
    if ( (!father) ) 
#line 262 "outil.ch"
#line 263 "outil.ch"
        return treeSubstitution ;
#line 263 "outil.ch"
#line 264 "outil.ch"
    if ( !nbSubstitution ) 
#line 264 "outil.ch"
#line 265 "outil.ch"
        nbSubstitution = 1 ;
#line 265 "outil.ch"
    else 
#line 265 "outil.ch"
#line 267 "outil.ch"
        (treeSubstitution=CopyTree(treeSubstitution));
#line 267 "outil.ch"
#line 267 "outil.ch"
#line 267 "outil.ch"
#line 268 "outil.ch"
    return ReplaceTree(father, slot, treeSubstitution);
#line 268 "outil.ch"
#line 269 "outil.ch"
}
#line 269 "outil.ch"

#line 275 "outil.ch"
#line 275 "outil.ch"
PTREE MetaRep ( char *name, PTREE tree, PTREE treeSubst )
#line 275 "outil.ch"
{
#line 275 "outil.ch"
#line 278 "outil.ch"
    (treeSubstitution=treeSubst);
#line 278 "outil.ch"
#line 278 "outil.ch"
#line 279 "outil.ch"
    nbSubstitution = 0 ;
#line 279 "outil.ch"
#line 280 "outil.ch"
    return ForeachTreeMeta(name, tree, ForReplace, (PTREE)0, - 1);
#line 280 "outil.ch"
#line 281 "outil.ch"
}
#line 281 "outil.ch"

#include "squeeze.c"

int _retVal [50];
PPTREE  _storeVal [50], _nextVal ;
PPTREE  stackTree [1024];
int ptStackTree = 0 ;
extern char *includeEnv ;
extern int  input, output, coutput, houtput ;
extern char *tabLabel ;
extern STRINGELEM   *listConst ;

#line 303 "outil.ch"
#line 303 "outil.ch"
PTREE find ( PTREE paramTree, PTREE tree )
#line 303 "outil.ch"
{
#line 303 "outil.ch"
#line 306 "outil.ch"
    {
#line 306 "outil.ch"
#line 306 "outil.ch"
        ItPtree _iterator1 (tree, paramTree) ;
#line 306 "outil.ch"
#line 306 "outil.ch"
        PPTREE  _for_elem ;
#line 306 "outil.ch"
#line 306 "outil.ch"
        _iterator1.AllSearch(1);
#line 306 "outil.ch"
#line 307 "outil.ch"
        while ( _for_elem = _iterator1++ ) {
#line 307 "outil.ch"
#line 306 "outil.ch"
            {
#line 306 "outil.ch"
#line 307 "outil.ch"
                return for_elem ;
#line 307 "outil.ch"
#line 307 "outil.ch"
            }
#line 307 "outil.ch"
#line 307 "outil.ch"
            _iterator1.Current(_for_elem);
#line 307 "outil.ch"
#line 307 "outil.ch"
            continue ;
#line 307 "outil.ch"
#line 307 "outil.ch"
        for_continue1 : 
#line 307 "outil.ch"
#line 307 "outil.ch"
            _iterator1.Current(_for_elem);
#line 307 "outil.ch"
#line 307 "outil.ch"
            _iterator1.SkipSon(1);
#line 307 "outil.ch"
#line 307 "outil.ch"
            continue ;
#line 307 "outil.ch"
#line 307 "outil.ch"
        for_break1 : 
#line 307 "outil.ch"
#line 307 "outil.ch"
            break ;
#line 307 "outil.ch"
#line 307 "outil.ch"
        }
#line 307 "outil.ch"
#line 307 "outil.ch"
    }
#line 307 "outil.ch"
#line 309 "outil.ch"
    return (PTREE)0 ;
#line 309 "outil.ch"
#line 310 "outil.ch"
}
#line 310 "outil.ch"

static char *string ;

#line 319 "outil.ch"
#line 319 "outil.ch"
PTREE metafind ( PTREE paramTree, PTREE tree )
#line 319 "outil.ch"
{
#line 319 "outil.ch"
    register PPTREE _inter ;
#line 319 "outil.ch"
#line 319 "outil.ch"
#line 319 "outil.ch"
    PTREE   _Baum0 ;
#line 319 "outil.ch"
#line 319 "outil.ch"
#line 321 "outil.ch"
    string = (char *)Value(paramTree);
#line 321 "outil.ch"
#line 322 "outil.ch"
    {
#line 322 "outil.ch"
        PPTREE _ptTree0= (PPTREE) 0,_ptRes0= (PPTREE) 0;
#line 322 "outil.ch"
        _ptRes0 = MakeTree(META, 1);
#line 322 "outil.ch"
        _ptTree0 = MakeString("meta") ;
#line 322 "outil.ch"
        ReplaceTree(_ptRes0, 1, _ptTree0);
#line 322 "outil.ch"
        _Baum0 = _ptRes0;
#line 322 "outil.ch"
    }
#line 322 "outil.ch"
#line 322 "outil.ch"
#line 322 "outil.ch"
    {
#line 322 "outil.ch"
#line 322 "outil.ch"
        ItPtree _iterator1 (tree, _Baum0) ;
#line 322 "outil.ch"
#line 322 "outil.ch"
        PPTREE  _for_elem ;
#line 322 "outil.ch"
#line 322 "outil.ch"
        _iterator1.AllSearch(1);
#line 322 "outil.ch"
#line 323 "outil.ch"
        while ( _for_elem = _iterator1++ ) {
#line 323 "outil.ch"
#line 322 "outil.ch"
            {
#line 322 "outil.ch"
#line 323 "outil.ch"
                if ( NumberTree(for_elem) == META && !strcmp(string, CacheAddrRead((long)sontree(sontree(for_elem, 1), 1))) ) {
#line 323 "outil.ch"
#line 326 "outil.ch"
return for_elem ;
#line 326 "outil.ch"
#line 326 "outil.ch"
                                                                                                                                            }
#line 326 "outil.ch"
#line 326 "outil.ch"
            }
#line 326 "outil.ch"
#line 326 "outil.ch"
            _iterator1.Current(_for_elem);
#line 326 "outil.ch"
#line 326 "outil.ch"
            continue ;
#line 326 "outil.ch"
#line 326 "outil.ch"
        for_continue1 : 
#line 326 "outil.ch"
#line 326 "outil.ch"
            _iterator1.Current(_for_elem);
#line 326 "outil.ch"
#line 326 "outil.ch"
            _iterator1.SkipSon(1);
#line 326 "outil.ch"
#line 326 "outil.ch"
            continue ;
#line 326 "outil.ch"
#line 326 "outil.ch"
        for_break1 : 
#line 326 "outil.ch"
#line 326 "outil.ch"
            break ;
#line 326 "outil.ch"
#line 326 "outil.ch"
        }
#line 326 "outil.ch"
#line 326 "outil.ch"
    }
#line 326 "outil.ch"
#line 329 "outil.ch"
    return (PPTREE)0 ;
#line 329 "outil.ch"
#line 330 "outil.ch"
}
#line 330 "outil.ch"

#line 336 "outil.ch"
#line 336 "outil.ch"
void replace ( PTREE paramTree, PTREE tree, PTREE new_value )
#line 336 "outil.ch"
{
#line 336 "outil.ch"
#line 339 "outil.ch"
    int firstReplace = 1 ;
#line 339 "outil.ch"
#line 341 "outil.ch"
    {
#line 341 "outil.ch"
#line 341 "outil.ch"
        ItPtree _iterator1 (tree, paramTree) ;
#line 341 "outil.ch"
#line 341 "outil.ch"
        PPTREE  _for_elem ;
#line 341 "outil.ch"
#line 341 "outil.ch"
        _iterator1.AllSearch(1);
#line 341 "outil.ch"
#line 342 "outil.ch"
        while ( _for_elem = _iterator1++ ) {
#line 342 "outil.ch"
#line 341 "outil.ch"
            {
#line 341 "outil.ch"
#line 342 "outil.ch"
                if ( FatherTree(for_elem) ) {
#line 342 "outil.ch"
#line 343 "outil.ch"
                                                PTREE   replace_tree ;
#line 343 "outil.ch"
#line 343 "outil.ch"
#line 344 "outil.ch"
                                                if ( firstReplace ) {
#line 344 "outil.ch"
#line 345 "outil.ch"
                                                                        firstReplace = 0 ;
#line 345 "outil.ch"
#line 346 "outil.ch"
                                                                        (replace_tree=new_value);
#line 346 "outil.ch"
#line 346 "outil.ch"
#line 346 "outil.ch"
                                                                     } else 
#line 346 "outil.ch"
#line 348 "outil.ch"
                                                    (replace_tree=CopyTree(new_value));
#line 348 "outil.ch"
#line 348 "outil.ch"
#line 348 "outil.ch"
#line 349 "outil.ch"
                                                {
#line 349 "outil.ch"
                                                    PPTREE _ptTree0= (PPTREE) 0,_sonTree0= (PPTREE) 0 ;
#line 349 "outil.ch"
                                                    if (_ptTree0= fathertree(for_elem)) {
#line 349 "outil.ch"
                                                        int rank = ranktree(for_elem);
#line 349 "outil.ch"
                                                        ReplaceTree(_ptTree0,rank,replace_tree);
#line 349 "outil.ch"
                                                    }
#line 349 "outil.ch"
                                                    for_elem = replace_tree;
#line 349 "outil.ch"
                                                }
#line 349 "outil.ch"
#line 349 "outil.ch"
#line 350 "outil.ch"
                                                goto for_continue1 ;
#line 350 "outil.ch"
#line 350 "outil.ch"
                                             }
#line 350 "outil.ch"
#line 350 "outil.ch"
            }
#line 350 "outil.ch"
#line 350 "outil.ch"
            _iterator1.Current(_for_elem);
#line 350 "outil.ch"
#line 350 "outil.ch"
            continue ;
#line 350 "outil.ch"
#line 350 "outil.ch"
        for_continue1 : 
#line 350 "outil.ch"
#line 350 "outil.ch"
            _iterator1.Current(_for_elem);
#line 350 "outil.ch"
#line 350 "outil.ch"
            _iterator1.SkipSon(1);
#line 350 "outil.ch"
#line 350 "outil.ch"
            continue ;
#line 350 "outil.ch"
#line 350 "outil.ch"
        for_break1 : 
#line 350 "outil.ch"
#line 350 "outil.ch"
            break ;
#line 350 "outil.ch"
#line 350 "outil.ch"
        }
#line 350 "outil.ch"
#line 350 "outil.ch"
    }
#line 350 "outil.ch"
#line 353 "outil.ch"
}
#line 353 "outil.ch"

static int  lineNumberRef = 1 ;
static int  dumpMoreMode = 0 ;
static int  pageNumberRef ;
static int  pageNumber ;

#line 365 "outil.ch"
#line 365 "outil.ch"
void DumpNewLine ( int i )
#line 365 "outil.ch"
{
#line 365 "outil.ch"
#line 367 "outil.ch"
    char    c [3];
#line 367 "outil.ch"
#line 369 "outil.ch"
    if ( lineNumberRef <= 30000 ) 
#line 369 "outil.ch"
#line 370 "outil.ch"
        LNewLine(i);
#line 370 "outil.ch"
#line 371 "outil.ch"
    if ( dumpMoreMode && currLine - lineNumberRef >= 24 ) {
#line 371 "outil.ch"
#line 372 "outil.ch"
                                                                lineNumberRef = currLine ;
#line 372 "outil.ch"
#line 373 "outil.ch"
                                                                pageNumber++ ;
#line 373 "outil.ch"
#line 374 "outil.ch"
                                                                read(0, &c, 1);
#line 374 "outil.ch"
#line 375 "outil.ch"
                                                                if ( pageNumber >= pageNumberRef ) 
#line 375 "outil.ch"
#line 376 "outil.ch"
                                                                    lineNumberRef = 30000 ;
#line 376 "outil.ch"
#line 376 "outil.ch"
                                                              }
#line 376 "outil.ch"
#line 378 "outil.ch"
}
#line 378 "outil.ch"

#define LNewLine DumpNewLine

#line 383 "outil.ch"
#line 383 "outil.ch"
void DumpTree ( PPTREE treeParam )
#line 383 "outil.ch"
{
#line 383 "outil.ch"
    register PPTREE _inter ;
#line 383 "outil.ch"
#line 383 "outil.ch"
#line 385 "outil.ch"
    int i, test ;
#line 385 "outil.ch"
#line 386 "outil.ch"
    PTREE   name1, son ;
#line 386 "outil.ch"
#line 386 "outil.ch"
#line 387 "outil.ch"
    PTREE   comm, cont ;
#line 387 "outil.ch"
#line 387 "outil.ch"
#line 388 "outil.ch"
    int oldIsVirtMod = isVirtMod ;
#line 388 "outil.ch"
#line 390 "outil.ch"
    isVirtMod = 0 ;
#line 390 "outil.ch"
#line 392 "outil.ch"
    PTREE   tree (treeParam) ;
#line 392 "outil.ch"
#line 392 "outil.ch"
#line 395 "outil.ch"
    if ( lineNumberRef >= 30000 ) 
#line 395 "outil.ch"
#line 396 "outil.ch"
        return ;
#line 396 "outil.ch"
#line 399 "outil.ch"
    if ( (!tree) ) {
#line 399 "outil.ch"
#line 400 "outil.ch"
                        PrintString("[ NIL ] ");
#line 400 "outil.ch"
#line 401 "outil.ch"
                        return ;
#line 401 "outil.ch"
#line 401 "outil.ch"
                     }
#line 401 "outil.ch"
#line 405 "outil.ch"
    (comm=(PTREE)0);
#line 405 "outil.ch"
#line 405 "outil.ch"
#line 406 "outil.ch"
    while ( (PPTREE)((comm=NextComm(tree, PRE, comm))) ) {
#line 406 "outil.ch"
#line 407 "outil.ch"
                                                                    (cont=(PTREE)0);
#line 407 "outil.ch"
#line 407 "outil.ch"
#line 408 "outil.ch"
                                                                    PrintString("PRE -> ");
#line 408 "outil.ch"
#line 408 "outil.ch"
                                                                    LNewLine(1);
#line 408 "outil.ch"
#line 408 "outil.ch"
#line 409 "outil.ch"
                                                                    Tab();
#line 409 "outil.ch"
#line 409 "outil.ch"
#line 411 "outil.ch"
                                                                    Mark();
#line 411 "outil.ch"
                                                                    while ( (PPTREE)((cont=NextCommContent(comm, cont))) ) {
#line 411 "outil.ch"
#line 412 "outil.ch"
PrintString(BrainyValue(cont));
#line 412 "outil.ch"
#line 412 "outil.ch"
LNewLine(1);
#line 412 "outil.ch"
#line 412 "outil.ch"
#line 412 "outil.ch"
                                                                                                                                  }
#line 412 "outil.ch"
                                                                    UnMark();
#line 412 "outil.ch"
#line 412 "outil.ch"
#line 412 "outil.ch"
                                                                 }
#line 412 "outil.ch"
#line 416 "outil.ch"
    switch ( NumberTree(tree) ) {
#line 416 "outil.ch"
#line 419 "outil.ch"
        case TERM_TREE : 
#line 419 "outil.ch"
#line 419 "outil.ch"
        _Case0 : 
#line 419 "outil.ch"
#line 419 "outil.ch"
            ;
#line 419 "outil.ch"
#line 418 "outil.ch"
            {
#line 418 "outil.ch"
#line 419 "outil.ch"
                int x, y, dx, dy, x0, y0 ;
#line 419 "outil.ch"
#line 420 "outil.ch"
                char    string [30];
#line 420 "outil.ch"
#line 421 "outil.ch"
                if ( GetCoord(tree, &x, &y, &dx, &dy) ) {
#line 421 "outil.ch"
#line 421 "outil.ch"
                                                                    PTREE   _Baum0 ;
#line 421 "outil.ch"
#line 421 "outil.ch"
#line 422 "outil.ch"
                                                                    _Baum0 = (PPTREE) 0 ;
#line 422 "outil.ch"
#line 422 "outil.ch"
#line 422 "outil.ch"
                                                                    GetCoordAbs(tree, _Baum0, &x0, &y0);
#line 422 "outil.ch"
#line 423 "outil.ch"
                                                                    sprintf(string, "%d %d %d %d %d %d", y0, x0, y, x, dy, dx);
#line 423 "outil.ch"
#line 425 "outil.ch"
                                                                    PrintString("{");
#line 425 "outil.ch"
#line 425 "outil.ch"
                                                                    WriteString(string);
#line 425 "outil.ch"
#line 425 "outil.ch"
                                                                    PrintString("}");
#line 425 "outil.ch"
#line 425 "outil.ch"
                                                                    LNewLine(1);
#line 425 "outil.ch"
#line 425 "outil.ch"
#line 425 "outil.ch"
                                                                  }
#line 425 "outil.ch"
#line 425 "outil.ch"
            }
#line 425 "outil.ch"
#line 428 "outil.ch"
            PrintString("\"");
#line 428 "outil.ch"
#line 428 "outil.ch"
            DumpBrainyValue(tree);
#line 428 "outil.ch"
#line 428 "outil.ch"
#line 428 "outil.ch"
            PrintString("\"");
#line 428 "outil.ch"
#line 429 "outil.ch"
            break ;
#line 429 "outil.ch"
#line 432 "outil.ch"
        case LIST : 
#line 432 "outil.ch"
#line 432 "outil.ch"
        _Case1 : 
#line 432 "outil.ch"
#line 432 "outil.ch"
            ;
#line 432 "outil.ch"
#line 431 "outil.ch"
            {
#line 431 "outil.ch"
#line 432 "outil.ch"
                int x, y, dx, dy, x0, y0 ;
#line 432 "outil.ch"
#line 433 "outil.ch"
                char    string [30];
#line 433 "outil.ch"
#line 434 "outil.ch"
                if ( GetCoord(tree, &x, &y, &dx, &dy) ) {
#line 434 "outil.ch"
#line 434 "outil.ch"
                                                                    PTREE   _Baum1 ;
#line 434 "outil.ch"
#line 434 "outil.ch"
#line 435 "outil.ch"
                                                                    _Baum1 = (PPTREE) 0 ;
#line 435 "outil.ch"
#line 435 "outil.ch"
#line 435 "outil.ch"
                                                                    GetCoordAbs(tree, _Baum1, &x0, &y0);
#line 435 "outil.ch"
#line 436 "outil.ch"
                                                                    sprintf(string, "%d %d %d %d %d %d", y0, x0, y, x, dy, dx);
#line 436 "outil.ch"
#line 438 "outil.ch"
                                                                    PrintString("{");
#line 438 "outil.ch"
#line 438 "outil.ch"
                                                                    WriteString(string);
#line 438 "outil.ch"
#line 438 "outil.ch"
                                                                    PrintString("}");
#line 438 "outil.ch"
#line 438 "outil.ch"
                                                                    LNewLine(1);
#line 438 "outil.ch"
#line 438 "outil.ch"
#line 438 "outil.ch"
                                                                  }
#line 438 "outil.ch"
#line 438 "outil.ch"
            }
#line 438 "outil.ch"
#line 441 "outil.ch"
            PrintString("[ LIST ");
#line 441 "outil.ch"
#line 441 "outil.ch"
            LNewLine(1);
#line 441 "outil.ch"
#line 441 "outil.ch"
#line 442 "outil.ch"
            Tab();
#line 442 "outil.ch"
#line 442 "outil.ch"
#line 443 "outil.ch"
            Mark();
#line 443 "outil.ch"
            while ( !((!tree)) && ((_inter = (PPTREE)tree,1) && 
#line 443 "outil.ch"
                                        (NumberTree(_inter) == LIST) &&
#line 443 "outil.ch"
                                        1) && lineNumberRef < 30000 ) {
#line 443 "outil.ch"
#line 446 "outil.ch"
(son=(tree?tree.Nextl():(PPTREE)0));
#line 446 "outil.ch"
#line 446 "outil.ch"
#line 447 "outil.ch"
DumpTree(son);
#line 447 "outil.ch"
#line 448 "outil.ch"
LNewLine(1);
#line 448 "outil.ch"
#line 448 "outil.ch"
#line 448 "outil.ch"
                                                                        }
#line 448 "outil.ch"
            if ( tree && !(((_inter = (PPTREE)tree,1) && 
#line 448 "outil.ch"
                                (NumberTree(_inter) == LIST) &&
#line 448 "outil.ch"
                                1)) ) {
#line 448 "outil.ch"
#line 451 "outil.ch"
                                        PrintString("$");
#line 451 "outil.ch"
#line 452 "outil.ch"
                                        DumpTree(tree);
#line 452 "outil.ch"
#line 453 "outil.ch"
                                        LNewLine(1);
#line 453 "outil.ch"
#line 453 "outil.ch"
#line 453 "outil.ch"
                                      }
#line 453 "outil.ch"
            UnMark();
#line 453 "outil.ch"
#line 453 "outil.ch"
#line 456 "outil.ch"
            PrintString("]");
#line 456 "outil.ch"
#line 457 "outil.ch"
            break ;
#line 457 "outil.ch"
#line 460 "outil.ch"
        case IN_LANGUAGE : 
#line 460 "outil.ch"
#line 460 "outil.ch"
        _Case2 : 
#line 460 "outil.ch"
#line 460 "outil.ch"
            ;
#line 460 "outil.ch"
#line 459 "outil.ch"
            {
#line 459 "outil.ch"
#line 460 "outil.ch"
                ((_inter = (PPTREE)tree,1) && 
#line 460 "outil.ch"
                    ((name1=SonTree(_inter,1)),1) &&
#line 460 "outil.ch"
                    ((tree=SonTree(_inter,2)),1) &&
#line 460 "outil.ch"
                    1);
#line 460 "outil.ch"
                ;
#line 460 "outil.ch"
#line 461 "outil.ch"
                {
#line 461 "outil.ch"
                    PLANG _oldLanguage = pCurrentLanguage;
#line 461 "outil.ch"
                    SwitchLang("Value");
#line 461 "outil.ch"
#line 463 "outil.ch"
                    {
#line 463 "outil.ch"
#line 462 "outil.ch"
                        {
#line 462 "outil.ch"
#line 463 "outil.ch"
                            int x, y, dx, dy, x0, y0 ;
#line 463 "outil.ch"
#line 464 "outil.ch"
                            char    string [30];
#line 464 "outil.ch"
#line 465 "outil.ch"
                            if ( GetCoord(tree, &x, &y, &dx, &dy) ) {
#line 465 "outil.ch"
#line 465 "outil.ch"
PTREE   _Baum2 ;
#line 465 "outil.ch"
#line 465 "outil.ch"
#line 466 "outil.ch"
_Baum2 = (PPTREE) 0 ;
#line 466 "outil.ch"
#line 466 "outil.ch"
#line 466 "outil.ch"
GetCoordAbs(tree, _Baum2, &x0, &y0);
#line 466 "outil.ch"
#line 467 "outil.ch"
sprintf(string, "%d %d %d %d %d %d", y0, x0, y, x, dy, dx);
#line 467 "outil.ch"
#line 469 "outil.ch"
PrintString("{");
#line 469 "outil.ch"
#line 469 "outil.ch"
WriteString(string);
#line 469 "outil.ch"
#line 469 "outil.ch"
PrintString("}");
#line 469 "outil.ch"
#line 469 "outil.ch"
LNewLine(1);
#line 469 "outil.ch"
#line 469 "outil.ch"
#line 469 "outil.ch"
                                                                              }
#line 469 "outil.ch"
#line 469 "outil.ch"
                        }
#line 469 "outil.ch"
#line 472 "outil.ch"
                        PrintString("[ IN_LANGUAGE");
#line 472 "outil.ch"
#line 472 "outil.ch"
                        LNewLine(1);
#line 472 "outil.ch"
#line 472 "outil.ch"
#line 473 "outil.ch"
                        Tab();
#line 473 "outil.ch"
#line 473 "outil.ch"
#line 474 "outil.ch"
                        Mark();
#line 474 "outil.ch"
                        PrintString("[ \"");
#line 474 "outil.ch"
                        DumpBrainyValue(name1);
#line 474 "outil.ch"
#line 474 "outil.ch"
                        PrintString("\" ]");
#line 474 "outil.ch"
                        LNewLine(1);
#line 474 "outil.ch"
#line 474 "outil.ch"
                        DumpTree(tree);
#line 474 "outil.ch"
                        LNewLine(1);
#line 474 "outil.ch"
#line 474 "outil.ch"
                        UnMark();
#line 474 "outil.ch"
#line 474 "outil.ch"
#line 478 "outil.ch"
                        PrintString("]");
#line 478 "outil.ch"
#line 479 "outil.ch"
                    };
#line 479 "outil.ch"
                    SwitchLangPoint(_oldLanguage);
#line 479 "outil.ch"
                }
#line 479 "outil.ch"
#line 479 "outil.ch"
#line 479 "outil.ch"
            }
#line 479 "outil.ch"
#line 481 "outil.ch"
            break ;
#line 481 "outil.ch"
#line 484 "outil.ch"
        default : 
#line 484 "outil.ch"
#line 484 "outil.ch"
        _Case3 : 
#line 484 "outil.ch"
#line 484 "outil.ch"
            ;
#line 484 "outil.ch"
#line 483 "outil.ch"
            {
#line 483 "outil.ch"
#line 484 "outil.ch"
                int x, y, dx, dy, x0, y0 ;
#line 484 "outil.ch"
#line 485 "outil.ch"
                char    string [30];
#line 485 "outil.ch"
#line 486 "outil.ch"
                if ( GetCoord(tree, &x, &y, &dx, &dy) ) {
#line 486 "outil.ch"
#line 486 "outil.ch"
                                                                    PTREE   _Baum3 ;
#line 486 "outil.ch"
#line 486 "outil.ch"
#line 487 "outil.ch"
                                                                    _Baum3 = (PPTREE) 0 ;
#line 487 "outil.ch"
#line 487 "outil.ch"
#line 487 "outil.ch"
                                                                    GetCoordAbs(tree, _Baum3, &x0, &y0);
#line 487 "outil.ch"
#line 488 "outil.ch"
                                                                    sprintf(string, "%d %d %d %d %d %d", y0, x0, y, x, dy, dx);
#line 488 "outil.ch"
#line 490 "outil.ch"
                                                                    PrintString("{");
#line 490 "outil.ch"
#line 490 "outil.ch"
                                                                    WriteString(string);
#line 490 "outil.ch"
#line 490 "outil.ch"
                                                                    PrintString("}");
#line 490 "outil.ch"
#line 490 "outil.ch"
                                                                    LNewLine(1);
#line 490 "outil.ch"
#line 490 "outil.ch"
#line 490 "outil.ch"
                                                                  }
#line 490 "outil.ch"
#line 490 "outil.ch"
            }
#line 490 "outil.ch"
#line 493 "outil.ch"
            PrintString("[ ");
#line 493 "outil.ch"
#line 493 "outil.ch"
            WriteString(NameConst(NumberTree(tree)));
#line 493 "outil.ch"
#line 494 "outil.ch"
            if ( test = treearity(tree) > 1 || treearity(tree) == 1 && treearity(sontree(tree, 1)) > 1 ) {
#line 494 "outil.ch"
#line 497 "outil.ch"
LNewLine(1);
#line 497 "outil.ch"
#line 497 "outil.ch"
#line 498 "outil.ch"
Tab();
#line 498 "outil.ch"
#line 498 "outil.ch"
#line 498 "outil.ch"
                                                                                                                     } else 
#line 498 "outil.ch"
#line 500 "outil.ch"
                PrintString(" ");
#line 500 "outil.ch"
#line 500 "outil.ch"
#line 502 "outil.ch"
            Mark();
#line 502 "outil.ch"
#line 502 "outil.ch"
            for ( i = 1 ; i <= treearity(tree) && lineNumberRef < 30000 ; i++ ) {
#line 502 "outil.ch"
#line 505 "outil.ch"
DumpTree(sontree(tree, i));
#line 505 "outil.ch"
#line 506 "outil.ch"
if ( test ) 
#line 506 "outil.ch"
#line 507 "outil.ch"
    LNewLine(1);
#line 507 "outil.ch"
#line 507 "outil.ch"
#line 507 "outil.ch"
                                                                                        }
#line 507 "outil.ch"
#line 507 "outil.ch"
            UnMark();
#line 507 "outil.ch"
#line 507 "outil.ch"
#line 510 "outil.ch"
            PrintString("]");
#line 510 "outil.ch"
    }
#line 510 "outil.ch"
#line 510 "outil.ch"
#line 514 "outil.ch"
    (comm=(PTREE)0);
#line 514 "outil.ch"
#line 514 "outil.ch"
#line 515 "outil.ch"
    while ( (comm=NextComm(tree, POST, comm)) ) {
#line 515 "outil.ch"
#line 516 "outil.ch"
                                                        (cont=(PTREE)0);
#line 516 "outil.ch"
#line 516 "outil.ch"
#line 517 "outil.ch"
                                                        LNewLine(1);
#line 517 "outil.ch"
#line 517 "outil.ch"
#line 518 "outil.ch"
                                                        if ( PrePost() ) 
#line 518 "outil.ch"
#line 519 "outil.ch"
                                                            PrintString("PREPOST -> ");
#line 519 "outil.ch"
                                                        else 
#line 519 "outil.ch"
#line 521 "outil.ch"
                                                            PrintString("POST -> ");
#line 521 "outil.ch"
#line 521 "outil.ch"
#line 522 "outil.ch"
                                                        LNewLine(1);
#line 522 "outil.ch"
#line 522 "outil.ch"
#line 523 "outil.ch"
                                                        Tab();
#line 523 "outil.ch"
#line 523 "outil.ch"
#line 524 "outil.ch"
                                                        Mark();
#line 524 "outil.ch"
                                                        while ( (cont=NextCommContent(comm, cont)) ) {
#line 524 "outil.ch"
#line 525 "outil.ch"
PrintString(BrainyValue(cont));
#line 525 "outil.ch"
#line 525 "outil.ch"
LNewLine(1);
#line 525 "outil.ch"
#line 525 "outil.ch"
#line 525 "outil.ch"
                                                                                                         }
#line 525 "outil.ch"
                                                        UnMark();
#line 525 "outil.ch"
#line 525 "outil.ch"
#line 525 "outil.ch"
                                                     }
#line 525 "outil.ch"
#line 529 "outil.ch"
    isVirtMod = oldIsVirtMod ;
#line 529 "outil.ch"
#line 530 "outil.ch"
}
#line 530 "outil.ch"

#line 532 "outil.ch"
#line 532 "outil.ch"
void MDumpTree ( PPTREE tree, int pageNum )
#line 532 "outil.ch"
{
#line 532 "outil.ch"
#line 535 "outil.ch"
    dumpMoreMode = 1 ;
#line 535 "outil.ch"
#line 536 "outil.ch"
    lineNumberRef = currLine ;
#line 536 "outil.ch"
#line 537 "outil.ch"
    pageNumber = 0 ;
#line 537 "outil.ch"
#line 538 "outil.ch"
    pageNumberRef = pageNum ;
#line 538 "outil.ch"
#line 539 "outil.ch"
    DumpTree(tree);
#line 539 "outil.ch"
#line 540 "outil.ch"
    dumpMoreMode = 0 ;
#line 540 "outil.ch"
#line 541 "outil.ch"
    lineNumberRef = 0 ;
#line 541 "outil.ch"
#line 542 "outil.ch"
}
#line 542 "outil.ch"

#line 544 "outil.ch"
#line 544 "outil.ch"
void DumpNode ( PPTREE tree )
#line 544 "outil.ch"
{
#line 544 "outil.ch"
#line 546 "outil.ch"
    PrintString("[ ");
#line 546 "outil.ch"
#line 546 "outil.ch"
    WriteString(NameConst(NumberTree(tree)));
#line 546 "outil.ch"
#line 546 "outil.ch"
    PrintString("]");
#line 546 "outil.ch"
#line 546 "outil.ch"
    LNewLine(1);
#line 546 "outil.ch"
#line 546 "outil.ch"
#line 547 "outil.ch"
}
#line 547 "outil.ch"

#undef LNewLine

#define INT int

#if (I386 || LINUX) && !DOS
#line 547 "outil.ch"
#line 559 "outil.ch"
#line 559 "outil.ch"
#line 559 "outil.ch"
void TheConstructor ( int va_alist, ... )
#line 559 "outil.ch"
{
#line 559 "outil.ch"
#line 562 "outil.ch"
    register int    arity ;
#line 562 "outil.ch"
#line 563 "outil.ch"
    int NodeType ;
#line 563 "outil.ch"
#line 564 "outil.ch"
    MY_TREE ptTree ;
#line 564 "outil.ch"
#line 565 "outil.ch"
    va_list arg_marker ;
#line 565 "outil.ch"
#line 567 "outil.ch"
    va_start(arg_marker);
#line 567 "outil.ch"
#line 568 "outil.ch"
#ifdef SUN
#line 568 "outil.ch"
#line 569 "outil.ch"
    NodeType = (int)va_arg(arg_marker,INT);
#line 569 "outil.ch"
#endif
#line 569 "outil.ch"
#line 571 "outil.ch"
    while ( NodeType != - 3 ) {
#line 571 "outil.ch"
#line 572 "outil.ch"
                                    switch ( NodeType ) {
#line 572 "outil.ch"
#line 573 "outil.ch"
                                        case - 2 : 
#line 573 "outil.ch"
#line 574 "outil.ch"
                                            PushTree((PPTREE)va_arg(arg_marker,PPTREE));
#line 574 "outil.ch"
#line 575 "outil.ch"
                                            break ;
#line 575 "outil.ch"
#line 576 "outil.ch"
                                        case - 4 : 
#line 576 "outil.ch"
#line 577 "outil.ch"
                                            PushTree((PPTREE)0);
#line 577 "outil.ch"
#line 578 "outil.ch"
                                            break ;
#line 578 "outil.ch"
#line 580 "outil.ch"
                                        default : 
#line 580 "outil.ch"
#line 580 "outil.ch"
                                            ptTree = MakeTree(NodeType, arity = (int)va_arg(arg_marker,INT));
#line 580 "outil.ch"
#line 583 "outil.ch"
#line 583 "outil.ch"
                                            for (; arity ; arity-- ) 
#line 583 "outil.ch"
#line 584 "outil.ch"
                                                ReplaceTree(ptTree, arity, PopTree);
#line 584 "outil.ch"
#line 584 "outil.ch"
#line 585 "outil.ch"
                                            PushTree(ptTree);
#line 585 "outil.ch"
#line 586 "outil.ch"
                                            break ;
#line 586 "outil.ch"
                                    }
#line 586 "outil.ch"
#line 586 "outil.ch"
#line 588 "outil.ch"
                                    NodeType = (int)va_arg(arg_marker,INT);
#line 588 "outil.ch"
#line 588 "outil.ch"
                                 }
#line 588 "outil.ch"
#line 590 "outil.ch"
}
#line 590 "outil.ch"
#else 
#line 592 "outil.ch"
#line 592 "outil.ch"
void TheConstructor ( int NodeType, ... )
#line 592 "outil.ch"
{
#line 592 "outil.ch"
#line 595 "outil.ch"
    register int    arity ;
#line 595 "outil.ch"
#line 596 "outil.ch"
    MY_TREE ptTree ;
#line 596 "outil.ch"
#line 597 "outil.ch"
    va_list arg_marker ;
#line 597 "outil.ch"
#line 599 "outil.ch"
    va_start(arg_marker, NodeType);
#line 599 "outil.ch"
#line 600 "outil.ch"
#if defined(SUN) && !defined(SOLARIS) && !defined(DOS)
#line 600 "outil.ch"
#line 601 "outil.ch"
    NodeType = (int)va_arg(arg_marker,INT);
#line 601 "outil.ch"
#endif
#line 601 "outil.ch"
#line 603 "outil.ch"
    while ( NodeType != - 3 ) {
#line 603 "outil.ch"
#line 604 "outil.ch"
                                    switch ( NodeType ) {
#line 604 "outil.ch"
#line 605 "outil.ch"
                                        case - 2 : 
#line 605 "outil.ch"
#line 606 "outil.ch"
                                            PushTree((PPTREE)va_arg(arg_marker,PPTREE));
#line 606 "outil.ch"
#line 607 "outil.ch"
                                            break ;
#line 607 "outil.ch"
#line 608 "outil.ch"
                                        case - 4 : 
#line 608 "outil.ch"
#line 609 "outil.ch"
                                            PushTree((PPTREE)0);
#line 609 "outil.ch"
#line 610 "outil.ch"
                                            break ;
#line 610 "outil.ch"
#line 612 "outil.ch"
                                        default : 
#line 612 "outil.ch"
#line 612 "outil.ch"
                                            ptTree = MakeTree(NodeType, arity = (int)va_arg(arg_marker,INT));
#line 612 "outil.ch"
#line 615 "outil.ch"
#line 615 "outil.ch"
                                            for (; arity ; arity-- ) 
#line 615 "outil.ch"
#line 616 "outil.ch"
                                                ReplaceTree(ptTree, arity, PopTree);
#line 616 "outil.ch"
#line 616 "outil.ch"
#line 617 "outil.ch"
                                            PushTree(ptTree);
#line 617 "outil.ch"
#line 618 "outil.ch"
                                            break ;
#line 618 "outil.ch"
                                    }
#line 618 "outil.ch"
#line 618 "outil.ch"
#line 620 "outil.ch"
                                    NodeType = (int)va_arg(arg_marker,INT);
#line 620 "outil.ch"
#line 620 "outil.ch"
                                 }
#line 620 "outil.ch"
#line 622 "outil.ch"
}
#endif

#line 629 "outil.ch"
#line 629 "outil.ch"
void PatchANode ( char *languageName, PTREE the_elem )
#line 629 "outil.ch"
{
#line 629 "outil.ch"
#line 632 "outil.ch"
    char    *NodeLanguage ;
#line 632 "outil.ch"
#line 633 "outil.ch"
    OVER_LANG   *pOverLang ;
#line 633 "outil.ch"
#line 635 "outil.ch"
    NodeLanguage = GetNodeLang(the_elem) -> name ;
#line 635 "outil.ch"
#line 636 "outil.ch"
    pOverLang = GetLang(languageName) -> overLang ;
#line 636 "outil.ch"
#line 637 "outil.ch"
#line 637 "outil.ch"
    for (; pOverLang && pOverLang -> name ; pOverLang++ ) 
#line 637 "outil.ch"
#line 638 "outil.ch"
        if ( !strcmp(pOverLang -> name, NodeLanguage) ) {
#line 638 "outil.ch"
#line 639 "outil.ch"
                                                                if ( NumberTree(the_elem) > IN_LANGUAGE && NumberTree(the_elem) != TERM_TREE ) 
#line 639 "outil.ch"
#line 641 "outil.ch"
                                                                    PatchNode(the_elem, GetLang(languageName), NumberTree(the_elem) + pOverLang -> offset);
#line 641 "outil.ch"
                                                                else 
#line 641 "outil.ch"
#line 644 "outil.ch"
                                                                    PatchNode(the_elem, GetLang(languageName), NumberTree(the_elem));
#line 644 "outil.ch"
#line 644 "outil.ch"
#line 646 "outil.ch"
                                                                goto nextNode ;
#line 646 "outil.ch"
#line 646 "outil.ch"
                                                             }
#line 646 "outil.ch"
#line 646 "outil.ch"
#line 648 "outil.ch"
    pOverLang = GetNodeLang(the_elem) -> overLang ;
#line 648 "outil.ch"
#line 649 "outil.ch"
#line 649 "outil.ch"
    for (; pOverLang && pOverLang -> name ; pOverLang++ ) 
#line 649 "outil.ch"
#line 650 "outil.ch"
        if ( !strcmp(pOverLang -> name, languageName) ) {
#line 650 "outil.ch"
#line 651 "outil.ch"
                                                                if ( NumberTree(the_elem) > IN_LANGUAGE && NumberTree(the_elem) != TERM_TREE ) 
#line 651 "outil.ch"
#line 653 "outil.ch"
                                                                    PatchNode(the_elem, GetLang(languageName), NumberTree(the_elem) - pOverLang -> offset);
#line 653 "outil.ch"
                                                                else 
#line 653 "outil.ch"
#line 656 "outil.ch"
                                                                    PatchNode(the_elem, GetLang(languageName), NumberTree(the_elem));
#line 656 "outil.ch"
#line 656 "outil.ch"
#line 658 "outil.ch"
                                                                goto nextNode ;
#line 658 "outil.ch"
#line 658 "outil.ch"
                                                             }
#line 658 "outil.ch"
#line 658 "outil.ch"
#line 660 "outil.ch"
nextNode : 
#line 660 "outil.ch"
#line 661 "outil.ch"
    ;
#line 661 "outil.ch"
#line 662 "outil.ch"
}
#line 662 "outil.ch"

#line 664 "outil.ch"
#line 664 "outil.ch"
void InLang ( char *languageName, PTREE tree )
#line 664 "outil.ch"
{
#line 664 "outil.ch"
#line 666 "outil.ch"
    {
#line 666 "outil.ch"
#line 666 "outil.ch"
        int _for_slot = 1, _arity = treearity(tree);
#line 666 "outil.ch"
#line 666 "outil.ch"
        MY_TREE _for_elem = (PPTREE)0 ;
#line 666 "outil.ch"
#line 666 "outil.ch"
#line 666 "outil.ch"
        for (; _for_slot <= _arity ; _for_slot++ ) {
#line 666 "outil.ch"
#line 666 "outil.ch"
            _for_elem = SonTree(tree, _for_slot);
#line 666 "outil.ch"
#line 667 "outil.ch"
            if ( _for_elem && NumberTree(_for_elem) != IN_LANGUAGE ) {
#line 667 "outil.ch"
#line 667 "outil.ch"
                                                                        InLang(languageName, for_elem);
#line 667 "outil.ch"
#line 667 "outil.ch"
                                                                     }
#line 667 "outil.ch"
#line 667 "outil.ch"
        }
#line 667 "outil.ch"
#line 667 "outil.ch"
#line 667 "outil.ch"
    }
#line 667 "outil.ch"
#line 669 "outil.ch"
    PatchANode(languageName, tree);
#line 669 "outil.ch"
#line 670 "outil.ch"
}
#line 670 "outil.ch"

static int  currentLine, currentCol ;

#line 679 "outil.ch"
#line 679 "outil.ch"
char *IsPosComment ( PTREE comm )
#line 679 "outil.ch"
{
#line 679 "outil.ch"
#line 682 "outil.ch"
    char    *val = Value(comm);
#line 682 "outil.ch"
#line 684 "outil.ch"
    if ( !strncmp(val, POS_STUB, strlen(POS_STUB)) ) 
#line 684 "outil.ch"
#line 685 "outil.ch"
        return val ;
#line 685 "outil.ch"
    else 
#line 685 "outil.ch"
#line 687 "outil.ch"
        return (char *)0 ;
#line 687 "outil.ch"
#line 687 "outil.ch"
#line 688 "outil.ch"
}
#line 688 "outil.ch"

#line 696 "outil.ch"
#line 696 "outil.ch"
int GetStartPos ( PTREE tree, int *line, int *col )
#line 696 "outil.ch"
{
#line 696 "outil.ch"
#line 699 "outil.ch"
    PTREE   comm ;
#line 699 "outil.ch"
#line 699 "outil.ch"
#line 700 "outil.ch"
    int result = 0 ;
#line 700 "outil.ch"
#line 703 "outil.ch"
    while ( PSET(comm, NextComm(tree, PRE, comm)) ) {
#line 703 "outil.ch"
#line 704 "outil.ch"
                                                            if ( GetPosCommentContent(comm, line, col) ) {
#line 704 "outil.ch"
#line 709 "outil.ch"
result = 1 ;
#line 709 "outil.ch"
#line 709 "outil.ch"
                                                                                                             }
#line 709 "outil.ch"
#line 709 "outil.ch"
                                                          }
#line 709 "outil.ch"
#line 714 "outil.ch"
    return result ;
#line 714 "outil.ch"
#line 715 "outil.ch"
}
#line 715 "outil.ch"

#line 721 "outil.ch"
#line 721 "outil.ch"
int GetEndPos ( PTREE tree, int *line, int *col )
#line 721 "outil.ch"
{
#line 721 "outil.ch"
#line 724 "outil.ch"
    PTREE   comm ;
#line 724 "outil.ch"
#line 724 "outil.ch"
#line 727 "outil.ch"
    while ( PSET(comm, NextComm(tree, POST, comm)) ) {
#line 727 "outil.ch"
#line 728 "outil.ch"
                                                            if ( GetPosCommentContent(comm, line, col) ) {
#line 728 "outil.ch"
#line 731 "outil.ch"
return 1 ;
#line 731 "outil.ch"
#line 731 "outil.ch"
                                                                                                             }
#line 731 "outil.ch"
#line 731 "outil.ch"
                                                           }
#line 731 "outil.ch"
#line 736 "outil.ch"
    return 0 ;
#line 736 "outil.ch"
#line 737 "outil.ch"
}
#line 737 "outil.ch"

#line 743 "outil.ch"
#line 743 "outil.ch"
int GetPosCommentContent ( PTREE comm, int *lig, int *col )
#line 743 "outil.ch"
{
#line 743 "outil.ch"
#line 746 "outil.ch"
    char    *val ;
#line 746 "outil.ch"
#line 748 "outil.ch"
    if ( val = IsPosComment(comm) ) {
#line 748 "outil.ch"
#line 749 "outil.ch"
                                        sscanf(val, POS_STUB_FORMAT, lig, col);
#line 749 "outil.ch"
#line 750 "outil.ch"
                                        return 1 ;
#line 750 "outil.ch"
#line 750 "outil.ch"
                                       }
#line 750 "outil.ch"
#line 752 "outil.ch"
    return 0 ;
#line 752 "outil.ch"
#line 753 "outil.ch"
}
#line 753 "outil.ch"

#line 759 "outil.ch"
#line 759 "outil.ch"
void SetPosCommentContent ( PTREE comm, int lig, int col )
#line 759 "outil.ch"
{
#line 759 "outil.ch"
#line 762 "outil.ch"
    PTREE   content = (PTREE)0 ;
#line 762 "outil.ch"
#line 762 "outil.ch"
#line 762 "outil.ch"
    (content=SonTree(SonTree(comm, 1), 1));
#line 762 "outil.ch"
#line 762 "outil.ch"
#line 764 "outil.ch"
    if ( IsPosComment(content) ) {
#line 764 "outil.ch"
#line 765 "outil.ch"
                                    char    addr [MAXLENGTH];
#line 765 "outil.ch"
#line 766 "outil.ch"
                                    sprintf(addr, POS_STUB_FORMAT, lig, col);
#line 766 "outil.ch"
#line 767 "outil.ch"
                                    replacetree(content, 1, MakeString(addr));
#line 767 "outil.ch"
#line 767 "outil.ch"
                                   }
#line 767 "outil.ch"
#line 769 "outil.ch"
}
#line 769 "outil.ch"

#line 775 "outil.ch"
#line 775 "outil.ch"
PTREE DestroyComment ( PTREE comm )
#line 775 "outil.ch"
{
#line 775 "outil.ch"
#line 778 "outil.ch"
    int rank = ranktree(comm);
#line 778 "outil.ch"
#line 779 "outil.ch"
    PTREE   commRet ;
#line 779 "outil.ch"
#line 779 "outil.ch"
#line 780 "outil.ch"
    PTREE   father ;
#line 780 "outil.ch"
#line 780 "outil.ch"
#line 782 "outil.ch"
    (father=FatherTree(comm));
#line 782 "outil.ch"
#line 782 "outil.ch"
#line 785 "outil.ch"
    if ( rank == 2 ) 
#line 785 "outil.ch"
#line 786 "outil.ch"
        (commRet=father);
#line 786 "outil.ch"
#line 786 "outil.ch"
    else 
#line 786 "outil.ch"
#line 788 "outil.ch"
        (commRet=(PTREE)0);
#line 788 "outil.ch"
#line 788 "outil.ch"
#line 788 "outil.ch"
#line 791 "outil.ch"
    replacetree(father, rank, sontree(comm, 2));
#line 791 "outil.ch"
#line 794 "outil.ch"
    return commRet ;
#line 794 "outil.ch"
#line 795 "outil.ch"
}
#line 795 "outil.ch"

#line 801 "outil.ch"
#line 801 "outil.ch"
void TrimPosComment ( PTREE tree )
#line 801 "outil.ch"
{
#line 801 "outil.ch"
    register PPTREE _inter ;
#line 801 "outil.ch"
#line 801 "outil.ch"
#line 804 "outil.ch"
    PTREE   comm, oldComm, father ;
#line 804 "outil.ch"
#line 804 "outil.ch"
#line 805 "outil.ch"
    char    *val ;
#line 805 "outil.ch"
#line 806 "outil.ch"
    int preLineMax = - 1, preColMax = - 1 ;
#line 806 "outil.ch"
#line 807 "outil.ch"
    int postLineMin = 32000, postColMin = 32000 ;
#line 807 "outil.ch"
#line 808 "outil.ch"
    int line, col ;
#line 808 "outil.ch"
#line 809 "outil.ch"
    int lineFather, colFather ;
#line 809 "outil.ch"
#line 810 "outil.ch"
    int first ;
#line 810 "outil.ch"
#line 811 "outil.ch"
    int again ;
#line 811 "outil.ch"
#line 817 "outil.ch"
    if ( !tree || NumberTree(tree) == TERM_TREE ) 
#line 817 "outil.ch"
#line 818 "outil.ch"
        return ;
#line 818 "outil.ch"
#line 821 "outil.ch"
    if ( (comm=GetComm(tree)) ) {
#line 821 "outil.ch"
#line 822 "outil.ch"
                                    while ( !(((_inter = (PPTREE)comm,1) && 
#line 822 "outil.ch"
                                                    (!SonTree(_inter,2)) &&
#line 822 "outil.ch"
                                                    1)) ) {
#line 822 "outil.ch"
#line 823 "outil.ch"
                                                            ((_inter = (PPTREE)comm,1) && 
#line 823 "outil.ch"
                                                                ((comm=SonTree(_inter,2)),1) &&
#line 823 "outil.ch"
                                                                1);
#line 823 "outil.ch"
                                                            ;
#line 823 "outil.ch"
#line 823 "outil.ch"
                                                          }
#line 823 "outil.ch"
#line 825 "outil.ch"
                                    while ( comm != tree ) {
#line 825 "outil.ch"
#line 826 "outil.ch"
                                                                (father=FatherTree(comm));
#line 826 "outil.ch"
#line 826 "outil.ch"
#line 827 "outil.ch"
                                                                while ( father != tree && !IsPosComment(father) ) 
#line 827 "outil.ch"
#line 828 "outil.ch"
                                                                    (father=FatherTree(father));
#line 828 "outil.ch"
#line 828 "outil.ch"
#line 829 "outil.ch"
                                                                if ( father != tree && GetPosCommentContent(comm, &line, &col) ) {
#line 829 "outil.ch"
#line 830 "outil.ch"
GetPosCommentContent(father, &lineFather, &colFather);
#line 830 "outil.ch"
#line 831 "outil.ch"
if ( lineFather > line || lineFather == line && colFather > col ) {
#line 831 "outil.ch"
#line 833 "outil.ch"
DestroyComment(father);
#line 833 "outil.ch"
#line 834 "outil.ch"
continue ;
#line 834 "outil.ch"
#line 834 "outil.ch"
                                                                        }
#line 834 "outil.ch"
#line 834 "outil.ch"
                                                                                                                                         }
#line 834 "outil.ch"
#line 837 "outil.ch"
                                                                (comm=father);
#line 837 "outil.ch"
#line 837 "outil.ch"
#line 837 "outil.ch"
                                                             }
#line 837 "outil.ch"
#line 837 "outil.ch"
                                   }
#line 837 "outil.ch"
#line 840 "outil.ch"
    (oldComm=(comm=(PTREE)0));
#line 840 "outil.ch"
#line 840 "outil.ch"
#line 841 "outil.ch"
    first = 0 ;
#line 841 "outil.ch"
#line 842 "outil.ch"
    again = 0 ;
#line 842 "outil.ch"
#line 843 "outil.ch"
    while ( (comm=NextComm(tree, PRE, comm)) ) {
#line 843 "outil.ch"
#line 844 "outil.ch"
                                                        if ( GetPosCommentContent(comm, &line, &col) ) {
#line 844 "outil.ch"
#line 845 "outil.ch"
if ( line > preLineMax || line == preLineMax && col > preColMax ) {
#line 845 "outil.ch"
#line 846 "outil.ch"
preLineMax = line ;
#line 846 "outil.ch"
#line 847 "outil.ch"
preColMax = col ;
#line 847 "outil.ch"
#line 850 "outil.ch"
if ( oldComm && !again ) {
#line 850 "outil.ch"
#line 851 "outil.ch"
                                DestroyComment(oldComm);
#line 851 "outil.ch"
#line 851 "outil.ch"
                            }
#line 851 "outil.ch"
#line 855 "outil.ch"
if ( !again ) 
#line 855 "outil.ch"
#line 856 "outil.ch"
    (oldComm=comm);
#line 856 "outil.ch"
#line 856 "outil.ch"
else 
#line 857 "outil.ch"
{
#line 857 "outil.ch"
#line 858 "outil.ch"
    (oldComm=(PTREE)0);
#line 858 "outil.ch"
#line 858 "outil.ch"
#line 859 "outil.ch"
    again = 0 ;
#line 859 "outil.ch"
#line 859 "outil.ch"
}
#line 859 "outil.ch"
#line 861 "outil.ch"
first = 1 ;
#line 861 "outil.ch"
#line 861 "outil.ch"
                                                                        } else 
#line 862 "outil.ch"
{
#line 862 "outil.ch"
#line 865 "outil.ch"
    if ( !again ) {
#line 865 "outil.ch"
#line 866 "outil.ch"
                        (comm=DestroyComment(comm));
#line 866 "outil.ch"
#line 866 "outil.ch"
#line 866 "outil.ch"
                    } else 
#line 867 "outil.ch"
    {
#line 867 "outil.ch"
#line 868 "outil.ch"
        (oldComm=(PTREE)0);
#line 868 "outil.ch"
#line 868 "outil.ch"
#line 869 "outil.ch"
        again = 0 ;
#line 869 "outil.ch"
#line 869 "outil.ch"
    }
#line 869 "outil.ch"
#line 869 "outil.ch"
}
#line 869 "outil.ch"
#line 869 "outil.ch"
                                                                                                             } else 
#line 869 "outil.ch"
#line 873 "outil.ch"
                                                            again = 1 ;
#line 873 "outil.ch"
#line 873 "outil.ch"
#line 873 "outil.ch"
                                                    }
#line 873 "outil.ch"
#line 875 "outil.ch"
    if ( first ) {
#line 875 "outil.ch"
#line 876 "outil.ch"
                    currentLine = preLineMax ;
#line 876 "outil.ch"
#line 877 "outil.ch"
                    currentCol = preColMax ;
#line 877 "outil.ch"
#line 877 "outil.ch"
                  }
#line 877 "outil.ch"
#line 879 "outil.ch"
    {
#line 879 "outil.ch"
#line 879 "outil.ch"
        int _for_slot = 1, _arity = treearity(tree);
#line 879 "outil.ch"
#line 879 "outil.ch"
        MY_TREE _for_elem = (PPTREE)0 ;
#line 879 "outil.ch"
#line 879 "outil.ch"
#line 879 "outil.ch"
        for (; _for_slot <= _arity ; _for_slot++ ) {
#line 879 "outil.ch"
#line 879 "outil.ch"
            _for_elem = SonTree(tree, _for_slot);
#line 879 "outil.ch"
#line 880 "outil.ch"
            if ( _for_elem && NumberTree(_for_elem) != IN_LANGUAGE ) 
#line 880 "outil.ch"
#line 880 "outil.ch"
                TrimPosComment(for_elem);
#line 880 "outil.ch"
#line 880 "outil.ch"
        }
#line 880 "outil.ch"
#line 880 "outil.ch"
#line 880 "outil.ch"
    }
#line 880 "outil.ch"
#line 882 "outil.ch"
    (oldComm=(comm=(PTREE)0));
#line 882 "outil.ch"
#line 882 "outil.ch"
#line 883 "outil.ch"
    first = 0 ;
#line 883 "outil.ch"
#line 884 "outil.ch"
    again = 0 ;
#line 884 "outil.ch"
#line 885 "outil.ch"
    while ( (comm=NextComm(tree, POST, comm)) ) {
#line 885 "outil.ch"
#line 886 "outil.ch"
                                                        if ( GetPosCommentContent(comm, &line, &col) ) {
#line 886 "outil.ch"
#line 887 "outil.ch"
if ( (line < postLineMin || line == postLineMin && col < postColMin) && (line >= currentLine || line == currentLine && col >= currentCol) ) {
#line 887 "outil.ch"
#line 891 "outil.ch"
postLineMin = line ;
#line 891 "outil.ch"
#line 892 "outil.ch"
postColMin = col ;
#line 892 "outil.ch"
#line 895 "outil.ch"
if ( oldComm && !again ) {
#line 895 "outil.ch"
#line 896 "outil.ch"
                                DestroyComment(oldComm);
#line 896 "outil.ch"
#line 896 "outil.ch"
                            }
#line 896 "outil.ch"
#line 900 "outil.ch"
if ( !again ) 
#line 900 "outil.ch"
#line 901 "outil.ch"
    (oldComm=comm);
#line 901 "outil.ch"
#line 901 "outil.ch"
else 
#line 902 "outil.ch"
{
#line 902 "outil.ch"
#line 903 "outil.ch"
    again = 0 ;
#line 903 "outil.ch"
#line 904 "outil.ch"
    (oldComm=0);
#line 904 "outil.ch"
#line 904 "outil.ch"
#line 904 "outil.ch"
}
#line 904 "outil.ch"
#line 906 "outil.ch"
first = 1 ;
#line 906 "outil.ch"
#line 906 "outil.ch"
                                                                                                                                                          } else 
#line 907 "outil.ch"
{
#line 907 "outil.ch"
#line 910 "outil.ch"
    if ( !again ) {
#line 910 "outil.ch"
#line 911 "outil.ch"
                        (comm=DestroyComment(comm));
#line 911 "outil.ch"
#line 911 "outil.ch"
#line 912 "outil.ch"
                        again = 0 ;
#line 912 "outil.ch"
#line 913 "outil.ch"
                        (oldComm=0);
#line 913 "outil.ch"
#line 913 "outil.ch"
#line 913 "outil.ch"
                    }
#line 913 "outil.ch"
#line 913 "outil.ch"
}
#line 913 "outil.ch"
#line 913 "outil.ch"
                                                                                                             } else 
#line 913 "outil.ch"
#line 917 "outil.ch"
                                                            again = 1 ;
#line 917 "outil.ch"
#line 917 "outil.ch"
#line 917 "outil.ch"
                                                     }
#line 917 "outil.ch"
#line 919 "outil.ch"
    if ( first ) {
#line 919 "outil.ch"
#line 920 "outil.ch"
                    currentLine = postLineMin ;
#line 920 "outil.ch"
#line 921 "outil.ch"
                    currentCol = postColMin ;
#line 921 "outil.ch"
#line 921 "outil.ch"
                  }
#line 921 "outil.ch"
#line 923 "outil.ch"
}
#line 923 "outil.ch"

#line 929 "outil.ch"
#line 929 "outil.ch"
void DestroyPosComment ( PTREE tree )
#line 929 "outil.ch"
{
#line 929 "outil.ch"
#line 932 "outil.ch"
    PTREE   comm, oldComm = (PTREE)0, father ;
#line 932 "outil.ch"
#line 932 "outil.ch"
#line 932 "outil.ch"
    (oldComm=(PTREE)0);
#line 932 "outil.ch"
#line 932 "outil.ch"
#line 934 "outil.ch"
    if ( !tree || NumberTree(tree) == TERM_TREE ) 
#line 934 "outil.ch"
#line 935 "outil.ch"
        return ;
#line 935 "outil.ch"
#line 938 "outil.ch"
    while ( (comm=NextComm(tree, PRE, comm)) ) 
#line 938 "outil.ch"
#line 939 "outil.ch"
        if ( IsPosComment(comm) ) {
#line 939 "outil.ch"
#line 942 "outil.ch"
                                        if ( oldComm ) 
#line 942 "outil.ch"
#line 943 "outil.ch"
                                            DestroyComment(oldComm);
#line 943 "outil.ch"
#line 947 "outil.ch"
                                        (oldComm=comm);
#line 947 "outil.ch"
#line 947 "outil.ch"
#line 947 "outil.ch"
                                    }
#line 947 "outil.ch"
#line 951 "outil.ch"
    while ( (comm=NextComm(tree, POST, comm)) ) 
#line 951 "outil.ch"
#line 952 "outil.ch"
        if ( IsPosComment(comm) ) {
#line 952 "outil.ch"
#line 955 "outil.ch"
                                        if ( oldComm ) 
#line 955 "outil.ch"
#line 956 "outil.ch"
                                            DestroyComment(oldComm);
#line 956 "outil.ch"
#line 960 "outil.ch"
                                        (oldComm=comm);
#line 960 "outil.ch"
#line 960 "outil.ch"
#line 960 "outil.ch"
                                    }
#line 960 "outil.ch"
#line 964 "outil.ch"
    if ( oldComm ) 
#line 964 "outil.ch"
#line 965 "outil.ch"
        DestroyComment(oldComm);
#line 965 "outil.ch"
#line 966 "outil.ch"
}
#line 966 "outil.ch"

static int  NbTree ;
static int  NbDump ;

#line 971 "outil.ch"
#line 971 "outil.ch"
void MakeTreeGenDirRec ( PTREE paramTree, int nbTreeParam )
#line 971 "outil.ch"
{
#line 971 "outil.ch"
    register PPTREE _inter ;
#line 971 "outil.ch"
#line 971 "outil.ch"
#line 973 "outil.ch"
    int nbParam, currParam, gennode ;
#line 973 "outil.ch"
#line 974 "outil.ch"
    char    string [5];
#line 974 "outil.ch"
#line 975 "outil.ch"
    PTREE   son ;
#line 975 "outil.ch"
#line 975 "outil.ch"
#line 977 "outil.ch"
    if ( nbTreeParam ) {
#line 977 "outil.ch"
#line 978 "outil.ch"
                            Mark();
#line 978 "outil.ch"
#line 979 "outil.ch"
                            PrintString("TheConstructor(");
#line 979 "outil.ch"
#line 980 "outil.ch"
                            NbTree = nbTreeParam ;
#line 980 "outil.ch"
#line 981 "outil.ch"
                            NbDump = 0 ;
#line 981 "outil.ch"
#line 982 "outil.ch"
                            MakeTreeGenDirRec(paramTree);
#line 982 "outil.ch"
#line 983 "outil.ch"
                            PrintString("-3) ;");
#line 983 "outil.ch"
#line 983 "outil.ch"
                            LNewLine(1);
#line 983 "outil.ch"
#line 983 "outil.ch"
#line 984 "outil.ch"
                            UnMark();
#line 984 "outil.ch"
#line 985 "outil.ch"
                            return ;
#line 985 "outil.ch"
#line 985 "outil.ch"
                        }
#line 985 "outil.ch"
#line 987 "outil.ch"
    if ( NbTree == 50 ) {
#line 987 "outil.ch"
#line 988 "outil.ch"
                            PrintString("-3);");
#line 988 "outil.ch"
#line 988 "outil.ch"
                            LNewLine(1);
#line 988 "outil.ch"
#line 988 "outil.ch"
#line 989 "outil.ch"
                            PrintString("TheConstructor(");
#line 989 "outil.ch"
#line 990 "outil.ch"
                            NbTree = 0 ;
#line 990 "outil.ch"
#line 990 "outil.ch"
                          } else 
#line 990 "outil.ch"
#line 992 "outil.ch"
        NbTree++ ;
#line 992 "outil.ch"
#line 992 "outil.ch"
#line 993 "outil.ch"
    if ( NbDump == 9 ) {
#line 993 "outil.ch"
#line 994 "outil.ch"
                            LNewLine(1);
#line 994 "outil.ch"
#line 994 "outil.ch"
#line 995 "outil.ch"
                            Tab();
#line 995 "outil.ch"
#line 995 "outil.ch"
#line 996 "outil.ch"
                            NbDump = 0 ;
#line 996 "outil.ch"
#line 996 "outil.ch"
                         } else 
#line 996 "outil.ch"
#line 998 "outil.ch"
        NbDump++ ;
#line 998 "outil.ch"
#line 998 "outil.ch"
#line 999 "outil.ch"
    if ( ((_inter = (PPTREE)paramTree,1) && 
#line 999 "outil.ch"
            (NumberTree(_inter) == TERM_TREE) &&
#line 999 "outil.ch"
            1) ) {
#line 999 "outil.ch"
#line 1000 "outil.ch"
                    PrintString("-2,");
#line 1000 "outil.ch"
                    PrintString("MakeString(\"");
#line 1000 "outil.ch"
#line 1001 "outil.ch"
                    DumpBrainyValue(paramTree);
#line 1001 "outil.ch"
#line 1002 "outil.ch"
                    PrintString("\"),");
#line 1002 "outil.ch"
#line 1003 "outil.ch"
                    return ;
#line 1003 "outil.ch"
#line 1003 "outil.ch"
                 }
#line 1003 "outil.ch"
#line 1005 "outil.ch"
    nbParam = treearity(paramTree);
#line 1005 "outil.ch"
#line 1006 "outil.ch"
    currParam = 1 ;
#line 1006 "outil.ch"
#line 1007 "outil.ch"
    while ( currParam <= nbParam ) {
#line 1007 "outil.ch"
#line 1008 "outil.ch"
                                        (son=SonTree(paramTree, currParam));
#line 1008 "outil.ch"
#line 1008 "outil.ch"
#line 1009 "outil.ch"
                                        if ( !((!son)) ) 
#line 1009 "outil.ch"
#line 1010 "outil.ch"
                                            MakeTreeGenDirRec(son);
#line 1010 "outil.ch"
                                        else 
#line 1010 "outil.ch"
#line 1012 "outil.ch"
                                            PrintString("-4,");
#line 1012 "outil.ch"
#line 1012 "outil.ch"
#line 1013 "outil.ch"
                                        currParam++ ;
#line 1013 "outil.ch"
#line 1013 "outil.ch"
                                     }
#line 1013 "outil.ch"
#line 1015 "outil.ch"
    itoa(nbParam, string, 10);
#line 1015 "outil.ch"
#line 1016 "outil.ch"
    WriteString(NameConst(NumberTree(paramTree)));
#line 1016 "outil.ch"
#line 1016 "outil.ch"
    PrintString(",");
#line 1016 "outil.ch"
#line 1016 "outil.ch"
    WriteString(string);
#line 1016 "outil.ch"
#line 1017 "outil.ch"
    PrintString(",");
#line 1017 "outil.ch"
#line 1018 "outil.ch"
}
#line 1018 "outil.ch"
/*Well done my boy */ 
#line 1018 "outil.ch"

