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

RIEN    DEBUT_CPLUSPLUS ;
void    traitement_addlist (PTREE) ;
void    traitement_proc (PTREE) ;
void    traitement_while (PTREE) ;
void    rep_addlist (PTREE, PTREE, PTREE) ;
int nb_addlist, find_elem ;

#line 53 "trait.ch"
#line 53 "trait.ch"
void traitement ( PTREE tree )
#line 53 "trait.ch"
{
#line 53 "trait.ch"
    register PPTREE _inter ;
#line 53 "trait.ch"
#line 53 "trait.ch"
#line 53 "trait.ch"
    PTREE   _Baum0 ;
#line 53 "trait.ch"
#line 53 "trait.ch"
#line 57 "trait.ch"
    {
#line 57 "trait.ch"
        PPTREE _ptTree0= (PPTREE) 0,_ptRes0= (PPTREE) 0;
#line 57 "trait.ch"
        _ptRes0 = MakeTree(metalang::DEFINE, 2);
#line 57 "trait.ch"
        {
#line 57 "trait.ch"
            PPTREE _ptTree1= (PPTREE) 0,_ptRes1= (PPTREE) 0;
#line 57 "trait.ch"
            _ptRes1 = MakeTree(META, 1);
#line 57 "trait.ch"
            _ptTree1 = MakeString("name") ;
#line 57 "trait.ch"
            ReplaceTree(_ptRes1, 1, _ptTree1);
#line 57 "trait.ch"
            _ptTree0 = _ptRes1;
#line 57 "trait.ch"
        }
#line 57 "trait.ch"
        ReplaceTree(_ptRes0, 1, _ptTree0);
#line 57 "trait.ch"
        {
#line 57 "trait.ch"
            PPTREE _ptTree1= (PPTREE) 0,_ptRes1= (PPTREE) 0;
#line 57 "trait.ch"
            _ptRes1 = MakeTree(META, 1);
#line 57 "trait.ch"
            _ptTree1 = MakeString("list") ;
#line 57 "trait.ch"
            ReplaceTree(_ptRes1, 1, _ptTree1);
#line 57 "trait.ch"
            _ptTree0 = _ptRes1;
#line 57 "trait.ch"
        }
#line 57 "trait.ch"
        ReplaceTree(_ptRes0, 2, _ptTree0);
#line 57 "trait.ch"
        _Baum0 = _ptRes0;
#line 57 "trait.ch"
    }
#line 57 "trait.ch"
#line 57 "trait.ch"
#line 57 "trait.ch"
    {
#line 57 "trait.ch"
#line 57 "trait.ch"
        ItPtree _iterator1 (tree, _Baum0) ;
#line 57 "trait.ch"
#line 57 "trait.ch"
        PPTREE  _for_elem ;
#line 57 "trait.ch"
#line 57 "trait.ch"
        _iterator1.AllSearch(1);
#line 57 "trait.ch"
#line 58 "trait.ch"
        while ( _for_elem = _iterator1++ ) {
#line 58 "trait.ch"
#line 58 "trait.ch"
            {
#line 58 "trait.ch"
#line 58 "trait.ch"
                traitement_proc(for_elem);
#line 58 "trait.ch"
#line 58 "trait.ch"
                goto for_continue1 ;
#line 58 "trait.ch"
#line 58 "trait.ch"
            }
#line 58 "trait.ch"
#line 58 "trait.ch"
            _iterator1.Current(_for_elem);
#line 58 "trait.ch"
#line 58 "trait.ch"
            continue ;
#line 58 "trait.ch"
#line 58 "trait.ch"
        for_continue1 : 
#line 58 "trait.ch"
#line 58 "trait.ch"
            _iterator1.Current(_for_elem);
#line 58 "trait.ch"
#line 58 "trait.ch"
            _iterator1.SkipSon(1);
#line 58 "trait.ch"
#line 58 "trait.ch"
            continue ;
#line 58 "trait.ch"
#line 58 "trait.ch"
        for_break1 : 
#line 58 "trait.ch"
#line 58 "trait.ch"
            break ;
#line 58 "trait.ch"
#line 58 "trait.ch"
        }
#line 58 "trait.ch"
#line 58 "trait.ch"
    }
#line 58 "trait.ch"
#line 59 "trait.ch"
}
#line 59 "trait.ch"

static PTREE    the_while ;
#line 59 "trait.ch"

#line 68 "trait.ch"
#line 68 "trait.ch"
void traitement_proc ( PTREE tree )
#line 68 "trait.ch"
{
#line 68 "trait.ch"
    register PPTREE _inter ;
#line 68 "trait.ch"
#line 68 "trait.ch"
#line 68 "trait.ch"
    PTREE   _Baum1 ;
#line 68 "trait.ch"
#line 68 "trait.ch"
#line 68 "trait.ch"
    PTREE   _Baum0 ;
#line 68 "trait.ch"
#line 68 "trait.ch"
#line 71 "trait.ch"
    PTREE   searched, declaration, elem, position ;
#line 71 "trait.ch"
#line 71 "trait.ch"
#line 72 "trait.ch"
    char    name [20];
#line 72 "trait.ch"
#line 73 "trait.ch"
    int i ;
#line 73 "trait.ch"
#line 75 "trait.ch"
    nb_addlist = 0 ;
#line 75 "trait.ch"
#line 76 "trait.ch"
    {
#line 76 "trait.ch"
        /* [ metalang::WHILE
            [ META "condition"]
            [ META "stat"]
           ]
#line 76 "trait.ch"
        */
#line 76 "trait.ch"
        TheConstructor(-2,MakeString("condition"),META,1,-2,MakeString("stat"),META,1,metalang::WHILE,2,-3) ;
#line 76 "trait.ch"
        _Baum0 = PopTree ;
#line 76 "trait.ch"
        }
#line 76 "trait.ch"
#line 76 "trait.ch"
#line 76 "trait.ch"
    {
#line 76 "trait.ch"
#line 76 "trait.ch"
        ItPtree _iterator1 (tree, _Baum0) ;
#line 76 "trait.ch"
#line 76 "trait.ch"
        PPTREE  _for_elem ;
#line 76 "trait.ch"
#line 76 "trait.ch"
        _iterator1.AllSearch(1);
#line 76 "trait.ch"
#line 77 "trait.ch"
        while ( _for_elem = _iterator1++ ) {
#line 77 "trait.ch"
#line 77 "trait.ch"
            {
#line 77 "trait.ch"
#line 77 "trait.ch"
                (the_while=for_elem);
#line 77 "trait.ch"
#line 77 "trait.ch"
#line 77 "trait.ch"
                traitement_while(for_elem);
#line 77 "trait.ch"
#line 77 "trait.ch"
                goto for_continue1 ;
#line 77 "trait.ch"
#line 77 "trait.ch"
            }
#line 77 "trait.ch"
#line 77 "trait.ch"
            _iterator1.Current(_for_elem);
#line 77 "trait.ch"
#line 77 "trait.ch"
            continue ;
#line 77 "trait.ch"
#line 77 "trait.ch"
        for_continue1 : 
#line 77 "trait.ch"
#line 77 "trait.ch"
            _iterator1.Current(_for_elem);
#line 77 "trait.ch"
#line 77 "trait.ch"
            _iterator1.SkipSon(1);
#line 77 "trait.ch"
#line 77 "trait.ch"
            continue ;
#line 77 "trait.ch"
#line 77 "trait.ch"
        for_break1 : 
#line 77 "trait.ch"
#line 77 "trait.ch"
            break ;
#line 77 "trait.ch"
#line 77 "trait.ch"
        }
#line 77 "trait.ch"
#line 77 "trait.ch"
    }
#line 77 "trait.ch"
#line 78 "trait.ch"
    {
#line 78 "trait.ch"
        /* [ metalang::REPEAT
            [ META "stat"]
            [ META "condition"]
           ]
#line 78 "trait.ch"
        */
#line 78 "trait.ch"
        TheConstructor(-2,MakeString("stat"),META,1,-2,MakeString("condition"),META,1,metalang::REPEAT,2,-3) ;
#line 78 "trait.ch"
        _Baum1 = PopTree ;
#line 78 "trait.ch"
        }
#line 78 "trait.ch"
#line 78 "trait.ch"
#line 78 "trait.ch"
    {
#line 78 "trait.ch"
#line 78 "trait.ch"
        ItPtree _iterator2 (tree, _Baum1) ;
#line 78 "trait.ch"
#line 78 "trait.ch"
        PPTREE  _for_elem ;
#line 78 "trait.ch"
#line 78 "trait.ch"
        _iterator2.AllSearch(1);
#line 78 "trait.ch"
#line 79 "trait.ch"
        while ( _for_elem = _iterator2++ ) {
#line 79 "trait.ch"
#line 79 "trait.ch"
            {
#line 79 "trait.ch"
#line 79 "trait.ch"
                (the_while=for_elem);
#line 79 "trait.ch"
#line 79 "trait.ch"
#line 79 "trait.ch"
                traitement_while(for_elem);
#line 79 "trait.ch"
#line 79 "trait.ch"
                goto for_continue2 ;
#line 79 "trait.ch"
#line 79 "trait.ch"
            }
#line 79 "trait.ch"
#line 79 "trait.ch"
            _iterator2.Current(_for_elem);
#line 79 "trait.ch"
#line 79 "trait.ch"
            continue ;
#line 79 "trait.ch"
#line 79 "trait.ch"
        for_continue2 : 
#line 79 "trait.ch"
#line 79 "trait.ch"
            _iterator2.Current(_for_elem);
#line 79 "trait.ch"
#line 79 "trait.ch"
            _iterator2.SkipSon(1);
#line 79 "trait.ch"
#line 79 "trait.ch"
            continue ;
#line 79 "trait.ch"
#line 79 "trait.ch"
        for_break2 : 
#line 79 "trait.ch"
#line 79 "trait.ch"
            break ;
#line 79 "trait.ch"
#line 79 "trait.ch"
        }
#line 79 "trait.ch"
#line 79 "trait.ch"
    }
#line 79 "trait.ch"
#line 80 "trait.ch"
    if ( nb_addlist ) {
#line 80 "trait.ch"
#line 81 "trait.ch"
                        position = (PPTREE) 0 ;
#line 81 "trait.ch"
#line 81 "trait.ch"
#line 82 "trait.ch"
#line 82 "trait.ch"
                        for ( i = 1 ; i <= nb_addlist ; i++ ) {
#line 82 "trait.ch"
#line 83 "trait.ch"
                                                                    sprintf(name, "%s%d", "_addlist", i);
#line 83 "trait.ch"
#line 84 "trait.ch"
                                                                    {
#line 84 "trait.ch"
                                                                        PPTREE _ptTree0= (PPTREE) 0 ;
#line 84 "trait.ch"
                                                                        {
#line 84 "trait.ch"
PPTREE _ptTree1= (PPTREE) 0,_ptRes1= (PPTREE) 0;
#line 84 "trait.ch"
_ptRes1 = MakeTree(metalang::IDENT, 1);
#line 84 "trait.ch"
_ptTree1 = StoreRef(MakeString(name));
#line 84 "trait.ch"
ReplaceTree(_ptRes1, 1, _ptTree1);
#line 84 "trait.ch"
_ptTree0 = _ptRes1;
#line 84 "trait.ch"
                                                                        }
#line 84 "trait.ch"
                                                                        position =  AddList( position,_ptTree0);
#line 84 "trait.ch"
                                                                    }
#line 84 "trait.ch"
#line 84 "trait.ch"
#line 85 "trait.ch"
                                                                   }
#line 85 "trait.ch"
#line 85 "trait.ch"
#line 86 "trait.ch"
                        {
#line 86 "trait.ch"
                            /* [ metalang::DECLARE [ META "position"]]
#line 86 "trait.ch"
                            */
#line 86 "trait.ch"
                            TheConstructor(-2,MakeString("position"),META,1,metalang::DECLARE,1,-3) ;
#line 86 "trait.ch"
                            declaration = PopTree ;
#line 86 "trait.ch"
                            {
#line 86 "trait.ch"
                                register PPTREE _inter ;
#line 86 "trait.ch"
#line 86 "trait.ch"
#line 1 "trait.ch"
                                metarep("position", declaration, position);
#line 1 "trait.ch"
#line 1 "trait.ch"
                            }
#line 1 "trait.ch"
                        }
#line 1 "trait.ch"
#line 1 "trait.ch"
#line 87 "trait.ch"
                        ((_inter = (PPTREE)tree,1) && 
#line 87 "trait.ch"
                            ((elem=SonTree(_inter,2)),1) &&
#line 87 "trait.ch"
                            1);
#line 87 "trait.ch"
                        ;
#line 87 "trait.ch"
#line 88 "trait.ch"
                        {
#line 88 "trait.ch"
                            PPTREE _ptTree0= (PPTREE) 0,_sonTree0= (PPTREE) 0 ;
#line 88 "trait.ch"
                            _ptTree0 = declaration;
#line 88 "trait.ch"
                            {
#line 88 "trait.ch"
                                PPTREE _ptTree1= (PPTREE) 0 ;
#line 88 "trait.ch"
                                _ptTree0 = AddList( _ptTree0,elem);
#line 88 "trait.ch"
                            }
#line 88 "trait.ch"
                            ReplaceTree(tree, 2, _ptTree0);
#line 88 "trait.ch"
                        }
#line 88 "trait.ch"
#line 88 "trait.ch"
#line 89 "trait.ch"
                       }
#line 89 "trait.ch"
#line 90 "trait.ch"
}
#line 90 "trait.ch"

#line 94 "trait.ch"
#line 94 "trait.ch"
void traitement_while ( PTREE tree )
#line 94 "trait.ch"
{
#line 94 "trait.ch"
#line 94 "trait.ch"
    PTREE   _Baum0 ;
#line 94 "trait.ch"
#line 94 "trait.ch"
#line 99 "trait.ch"
    {
#line 99 "trait.ch"
        /* [ metalang::ADDLIST
            [ LIST 
                [ META "list"]
                [ META "elem"]
            ]
           ]
#line 99 "trait.ch"
        */
#line 99 "trait.ch"
        TheConstructor(-2,MakeString("list"),META,1,-2,MakeString("elem"),META,1,-4,LIST,2,LIST,2,metalang::ADDLIST,1,-3) ;
#line 99 "trait.ch"
        _Baum0 = PopTree ;
#line 99 "trait.ch"
        }
#line 99 "trait.ch"
#line 99 "trait.ch"
#line 99 "trait.ch"
    {
#line 99 "trait.ch"
#line 99 "trait.ch"
        ItPtree _iterator1 (tree, _Baum0) ;
#line 99 "trait.ch"
#line 99 "trait.ch"
        PPTREE  _for_elem ;
#line 99 "trait.ch"
#line 99 "trait.ch"
        _iterator1.AllSearch(1);
#line 99 "trait.ch"
#line 100 "trait.ch"
        while ( _for_elem = _iterator1++ ) {
#line 100 "trait.ch"
#line 100 "trait.ch"
            {
#line 100 "trait.ch"
#line 100 "trait.ch"
                traitement_addlist(for_elem);
#line 100 "trait.ch"
#line 100 "trait.ch"
                goto for_continue1 ;
#line 100 "trait.ch"
#line 100 "trait.ch"
            }
#line 100 "trait.ch"
#line 100 "trait.ch"
            _iterator1.Current(_for_elem);
#line 100 "trait.ch"
#line 100 "trait.ch"
            continue ;
#line 100 "trait.ch"
#line 100 "trait.ch"
        for_continue1 : 
#line 100 "trait.ch"
#line 100 "trait.ch"
            _iterator1.Current(_for_elem);
#line 100 "trait.ch"
#line 100 "trait.ch"
            _iterator1.SkipSon(1);
#line 100 "trait.ch"
#line 100 "trait.ch"
            continue ;
#line 100 "trait.ch"
#line 100 "trait.ch"
        for_break1 : 
#line 100 "trait.ch"
#line 100 "trait.ch"
            break ;
#line 100 "trait.ch"
#line 100 "trait.ch"
        }
#line 100 "trait.ch"
#line 100 "trait.ch"
    }
#line 100 "trait.ch"
#line 101 "trait.ch"
}
#line 101 "trait.ch"

static PTREE    theName, theOldName ;
#line 101 "trait.ch"
static int  useValue ;

#line 109 "trait.ch"
#line 109 "trait.ch"
void traitement_addlist ( PTREE tree )
#line 109 "trait.ch"
{
#line 109 "trait.ch"
    register PPTREE _inter ;
#line 109 "trait.ch"
#line 109 "trait.ch"
#line 109 "trait.ch"
    PTREE   _Baum0 ;
#line 109 "trait.ch"
#line 109 "trait.ch"
#line 112 "trait.ch"
    PTREE   inter, searched, new_value, old_value, list_elem ;
#line 112 "trait.ch"
#line 112 "trait.ch"
#line 113 "trait.ch"
    int rank ;
#line 113 "trait.ch"
#line 114 "trait.ch"
    char    name [20];
#line 114 "trait.ch"
#line 115 "trait.ch"
    find_elem = 0 ;
#line 115 "trait.ch"
#line 116 "trait.ch"
    {
#line 116 "trait.ch"
        PPTREE _ptTree0= (PPTREE) 0,_ptRes0= (PPTREE) 0;
#line 116 "trait.ch"
        _ptRes0 = MakeTree(metalang::IDENT, 1);
#line 116 "trait.ch"
        _ptTree0 = StoreRef(MakeString(Value(tree)));
#line 116 "trait.ch"
        ReplaceTree(_ptRes0, 1, _ptTree0);
#line 116 "trait.ch"
        old_value = _ptRes0;
#line 116 "trait.ch"
    }
#line 116 "trait.ch"
#line 116 "trait.ch"
#line 117 "trait.ch"
    {
#line 117 "trait.ch"
        /* [ metalang::EQUAL
            [ META "old_value"]
            [ META "aff"]
           ]
#line 117 "trait.ch"
        */
#line 117 "trait.ch"
        TheConstructor(-2,MakeString("old_value"),META,1,-2,MakeString("aff"),META,1,metalang::EQUAL,2,-3) ;
#line 117 "trait.ch"
        _Baum0 = PopTree ;
#line 117 "trait.ch"
        {
#line 117 "trait.ch"
            register PPTREE _inter ;
#line 117 "trait.ch"
#line 117 "trait.ch"
#line 1 "trait.ch"
            metarep("old_value", _Baum0, old_value);
#line 1 "trait.ch"
#line 1 "trait.ch"
        }
#line 1 "trait.ch"
    }
#line 1 "trait.ch"
#line 1 "trait.ch"
#line 117 "trait.ch"
    {
#line 117 "trait.ch"
#line 117 "trait.ch"
        ItPtree _iterator1 (the_while, _Baum0) ;
#line 117 "trait.ch"
#line 117 "trait.ch"
        PPTREE  _for_elem ;
#line 117 "trait.ch"
#line 117 "trait.ch"
        _iterator1.AllSearch(1);
#line 117 "trait.ch"
#line 117 "trait.ch"
        while ( _for_elem = _iterator1++ ) {
#line 117 "trait.ch"
#line 117 "trait.ch"
            find_elem++ ;
#line 117 "trait.ch"
#line 117 "trait.ch"
            _iterator1.Current(_for_elem);
#line 117 "trait.ch"
#line 117 "trait.ch"
            continue ;
#line 117 "trait.ch"
#line 117 "trait.ch"
        for_continue1 : 
#line 117 "trait.ch"
#line 117 "trait.ch"
            _iterator1.Current(_for_elem);
#line 117 "trait.ch"
#line 117 "trait.ch"
            _iterator1.SkipSon(1);
#line 117 "trait.ch"
#line 117 "trait.ch"
            continue ;
#line 117 "trait.ch"
#line 117 "trait.ch"
        for_break1 : 
#line 117 "trait.ch"
#line 117 "trait.ch"
            break ;
#line 117 "trait.ch"
#line 117 "trait.ch"
        }
#line 117 "trait.ch"
#line 117 "trait.ch"
    }
#line 117 "trait.ch"
#line 118 "trait.ch"
    if ( !find_elem ) {
#line 118 "trait.ch"
#line 118 "trait.ch"
                            PTREE   _Baum1 ;
#line 118 "trait.ch"
#line 118 "trait.ch"
#line 119 "trait.ch"
                            nb_addlist++ ;
#line 119 "trait.ch"
#line 120 "trait.ch"
                            sprintf(name, "%s%d", "_addlist", nb_addlist);
#line 120 "trait.ch"
#line 121 "trait.ch"
                            {
#line 121 "trait.ch"
                                PPTREE _ptTree0= (PPTREE) 0,_ptRes0= (PPTREE) 0;
#line 121 "trait.ch"
                                _ptRes0 = MakeTree(metalang::IDENT, 1);
#line 121 "trait.ch"
                                _ptTree0 = StoreRef(MakeString(name));
#line 121 "trait.ch"
                                ReplaceTree(_ptRes0, 1, _ptTree0);
#line 121 "trait.ch"
                                new_value = _ptRes0;
#line 121 "trait.ch"
                            }
#line 121 "trait.ch"
#line 121 "trait.ch"
#line 122 "trait.ch"
                            useValue = 0 ;
#line 122 "trait.ch"
#line 123 "trait.ch"
                            (theName=new_value);
#line 123 "trait.ch"
#line 123 "trait.ch"
#line 124 "trait.ch"
                            (theOldName=old_value);
#line 124 "trait.ch"
#line 124 "trait.ch"
#line 125 "trait.ch"
                            {
#line 125 "trait.ch"
                                /* [ metalang::ADDLIST
                                    [ LIST 
                                        [ META "meta0"]
                                        [ META "list"]
                                    ]
                                   ]
#line 125 "trait.ch"
                                */
#line 125 "trait.ch"
                                TheConstructor(-2,MakeString("meta0"),META,1,-2,MakeString("list"),META,1,-4,LIST,2,LIST,2,metalang::ADDLIST,1,-3) ;
#line 125 "trait.ch"
                                _Baum1 = PopTree ;
#line 125 "trait.ch"
                                {
#line 125 "trait.ch"
                                    register PPTREE _inter ;
#line 125 "trait.ch"
#line 125 "trait.ch"
#line 1 "trait.ch"
                                    metarep("meta0", _Baum1, CopyTree(old_value));
#line 1 "trait.ch"
#line 1 "trait.ch"
                                }
#line 1 "trait.ch"
                            }
#line 1 "trait.ch"
#line 1 "trait.ch"
#line 126 "trait.ch"
                            {
#line 126 "trait.ch"
#line 126 "trait.ch"
                                ItPtree _iterator2 (the_while, _Baum1) ;
#line 126 "trait.ch"
#line 126 "trait.ch"
                                PPTREE  _for_elem ;
#line 126 "trait.ch"
#line 126 "trait.ch"
                                _iterator2.AllSearch(1);
#line 126 "trait.ch"
#line 126 "trait.ch"
                                while ( _for_elem = _iterator2++ ) {
#line 126 "trait.ch"
#line 126 "trait.ch"
                                    rep_addlist(for_elem, theName, theOldName);
#line 126 "trait.ch"
#line 126 "trait.ch"
                                    _iterator2.Current(_for_elem);
#line 126 "trait.ch"
#line 126 "trait.ch"
                                    continue ;
#line 126 "trait.ch"
#line 126 "trait.ch"
                                for_continue2 : 
#line 126 "trait.ch"
#line 126 "trait.ch"
                                    _iterator2.Current(_for_elem);
#line 126 "trait.ch"
#line 126 "trait.ch"
                                    _iterator2.SkipSon(1);
#line 126 "trait.ch"
#line 126 "trait.ch"
                                    continue ;
#line 126 "trait.ch"
#line 126 "trait.ch"
                                for_break2 : 
#line 126 "trait.ch"
#line 126 "trait.ch"
                                    break ;
#line 126 "trait.ch"
#line 126 "trait.ch"
                                }
#line 126 "trait.ch"
#line 126 "trait.ch"
                            }
#line 126 "trait.ch"
#line 127 "trait.ch"
                            if ( useValue ) {
#line 127 "trait.ch"
#line 128 "trait.ch"
                                                {
#line 128 "trait.ch"
                                                    /* [ metalang::EQUAL
                                                        [ META "new_value"]
                                                        [ META "old_value"]
                                                       ]
#line 128 "trait.ch"
                                                    */
#line 128 "trait.ch"
                                                    TheConstructor(-2,MakeString("new_value"),META,1,-2,MakeString("old_value"),META,1,metalang::EQUAL,2,-3) ;
#line 128 "trait.ch"
                                                    list_elem = PopTree ;
#line 128 "trait.ch"
                                                    {
#line 128 "trait.ch"
                                                        register PPTREE _inter ;
#line 128 "trait.ch"
#line 128 "trait.ch"
#line 1 "trait.ch"
                                                        metarep("new_value", list_elem, new_value);
#line 1 "trait.ch"
#line 1 "trait.ch"
                                                        metarep("old_value", list_elem, old_value);
#line 1 "trait.ch"
#line 1 "trait.ch"
                                                    }
#line 1 "trait.ch"
                                                }
#line 1 "trait.ch"
#line 1 "trait.ch"
#line 129 "trait.ch"
                                                (searched=fathertree(the_while));
#line 129 "trait.ch"
#line 129 "trait.ch"
#line 130 "trait.ch"
                                                if ( !(((_inter = (PPTREE)searched,1) && 
#line 130 "trait.ch"
                                                            (NumberTree(_inter) == LIST) &&
#line 130 "trait.ch"
                                                            1)) ) {
#line 130 "trait.ch"
#line 131 "trait.ch"
                                                                    rank = ranktree(the_while);
#line 131 "trait.ch"
#line 132 "trait.ch"
                                                                    {
#line 132 "trait.ch"
                                                                        PPTREE _ptTree0= (PPTREE) 0,_ptRes0= (PPTREE) 0;
#line 132 "trait.ch"
                                                                        _ptRes0 = MakeTree(metalang::BEGIN, 1);
#line 132 "trait.ch"
                                                                        _ptTree0 = the_while;
#line 132 "trait.ch"
                                                                        {
#line 132 "trait.ch"
PPTREE _ptTree1= (PPTREE) 0 ;
#line 132 "trait.ch"
_ptTree1 = (PPTREE) 0;
#line 132 "trait.ch"
_ptTree0 = AddList( _ptTree0,_ptTree1);
#line 132 "trait.ch"
                                                                        }
#line 132 "trait.ch"
                                                                        ReplaceTree(_ptRes0, 1, _ptTree0);
#line 132 "trait.ch"
                                                                        inter = _ptRes0;
#line 132 "trait.ch"
                                                                    }
#line 132 "trait.ch"
#line 132 "trait.ch"
#line 133 "trait.ch"
                                                                    replacetree(searched, rank, inter);
#line 133 "trait.ch"
#line 134 "trait.ch"
                                                                    ((_inter = (PPTREE)inter,1) && 
#line 134 "trait.ch"
                                                                        ((inter=SonTree(_inter,1)),1) &&
#line 134 "trait.ch"
                                                                        1);
#line 134 "trait.ch"
                                                                    ;
#line 134 "trait.ch"
#line 135 "trait.ch"
                                                                  } else 
#line 135 "trait.ch"
#line 136 "trait.ch"
                                                    (inter=searched);
#line 136 "trait.ch"
#line 136 "trait.ch"
#line 136 "trait.ch"
#line 137 "trait.ch"
                                                (searched=fathertree(inter));
#line 137 "trait.ch"
#line 137 "trait.ch"
#line 138 "trait.ch"
                                                rank = ranktree(inter);
#line 138 "trait.ch"
#line 139 "trait.ch"
                                                {
#line 139 "trait.ch"
                                                    PPTREE _ptTree0=(PPTREE) 0;
#line 139 "trait.ch"
                                                    _ptTree0 = list_elem;
#line 139 "trait.ch"
                                                    {
#line 139 "trait.ch"
                                                        PPTREE _ptTree1= (PPTREE) 0 ;
#line 139 "trait.ch"
                                                        _ptTree0 = AddList( _ptTree0,inter);
#line 139 "trait.ch"
                                                    }
#line 139 "trait.ch"
                                                    inter = _ptTree0;
#line 139 "trait.ch"
                                                    ;
#line 139 "trait.ch"
                                                }
#line 139 "trait.ch"
#line 139 "trait.ch"
#line 140 "trait.ch"
                                                replacetree(searched, rank, inter);
#line 140 "trait.ch"
#line 141 "trait.ch"
                                             } else 
#line 141 "trait.ch"
#line 142 "trait.ch"
                                nb_addlist-- ;
#line 142 "trait.ch"
#line 142 "trait.ch"
#line 143 "trait.ch"
                        }
#line 143 "trait.ch"
#line 144 "trait.ch"
}
#line 144 "trait.ch"

#line 147 "trait.ch"
#line 147 "trait.ch"
void rep_addlist ( PTREE tree, PTREE new_value, PTREE old_value )
#line 147 "trait.ch"
{
#line 147 "trait.ch"
    register PPTREE _inter ;
#line 147 "trait.ch"
#line 147 "trait.ch"
#line 153 "trait.ch"
    PTREE   inter, elem, rep, elem1, cond, list ;
#line 153 "trait.ch"
#line 153 "trait.ch"
#line 154 "trait.ch"
    int rank ;
#line 154 "trait.ch"
#line 155 "trait.ch"
    (inter=fathertree(tree));
#line 155 "trait.ch"
#line 155 "trait.ch"
#line 156 "trait.ch"
    while ( !(((_inter = (PPTREE)inter,1) && 
#line 156 "trait.ch"
                    (NumberTree(_inter) == metalang::DEFINE) &&
#line 156 "trait.ch"
                    1)) ) {
#line 156 "trait.ch"
#line 157 "trait.ch"
                            switch ( NumberTree(inter) ) {
#line 157 "trait.ch"
#line 158 "trait.ch"
                                case metalang::MAKETREE : 
#line 158 "trait.ch"
#line 158 "trait.ch"
                                _Case0 : 
#line 158 "trait.ch"
#line 158 "trait.ch"
                                    ;
#line 158 "trait.ch"
#line 158 "trait.ch"
                                    return ;
#line 158 "trait.ch"
#line 158 "trait.ch"
                                    goto _Case1 ;
#line 158 "trait.ch"
#line 159 "trait.ch"
                                case metalang::REPLACETREE : 
#line 159 "trait.ch"
#line 159 "trait.ch"
                                _Case1 : 
#line 159 "trait.ch"
#line 159 "trait.ch"
                                    ;
#line 159 "trait.ch"
#line 159 "trait.ch"
                                    return ;
#line 159 "trait.ch"
#line 159 "trait.ch"
                                    goto _Case2 ;
#line 159 "trait.ch"
#line 160 "trait.ch"
                                case metalang::ADDLIST : 
#line 160 "trait.ch"
#line 160 "trait.ch"
                                _Case2 : 
#line 160 "trait.ch"
#line 160 "trait.ch"
                                    ;
#line 160 "trait.ch"
#line 160 "trait.ch"
                                    return ;
#line 160 "trait.ch"
#line 160 "trait.ch"
                                    goto _Case3 ;
#line 160 "trait.ch"
#line 161 "trait.ch"
                                case metalang::RETURN : 
#line 161 "trait.ch"
#line 161 "trait.ch"
                                _Case3 : 
#line 161 "trait.ch"
#line 161 "trait.ch"
                                    ;
#line 161 "trait.ch"
#line 161 "trait.ch"
                                    return ;
#line 161 "trait.ch"
#line 161 "trait.ch"
                                    goto _Case4 ;
#line 161 "trait.ch"
#line 162 "trait.ch"
                                default : 
#line 162 "trait.ch"
#line 162 "trait.ch"
                                _Case4 : 
#line 162 "trait.ch"
#line 162 "trait.ch"
                                    ;
#line 162 "trait.ch"
#line 162 "trait.ch"
                                    (inter=fathertree(inter));
#line 162 "trait.ch"
#line 162 "trait.ch"
                            }
#line 162 "trait.ch"
#line 162 "trait.ch"
#line 164 "trait.ch"
                          }
#line 164 "trait.ch"
#line 165 "trait.ch"
    replace(old_value, tree, CopyTree(new_value));
#line 165 "trait.ch"
#line 166 "trait.ch"
    {
#line 166 "trait.ch"
        PPTREE _ptTree0= (PPTREE) 0,_ptRes0= (PPTREE) 0;
#line 166 "trait.ch"
        _ptRes0 = MakeTree(metalang::ASIT, 1);
#line 166 "trait.ch"
        {
#line 166 "trait.ch"
            PPTREE _ptTree1= (PPTREE) 0,_ptRes1= (PPTREE) 0;
#line 166 "trait.ch"
            _ptRes1 = MakeTree(LIST, 2);
#line 166 "trait.ch"
            _ptTree1 = StoreRef(MakeString(Value(old_value)));
#line 166 "trait.ch"
            ReplaceTree(_ptRes1, 1, _ptTree1);
#line 166 "trait.ch"
            _ptTree0 = _ptRes1;
#line 166 "trait.ch"
        }
#line 166 "trait.ch"
        ReplaceTree(_ptRes0, 1, _ptTree0);
#line 166 "trait.ch"
        cond = _ptRes0;
#line 166 "trait.ch"
    }
#line 166 "trait.ch"
#line 166 "trait.ch"
#line 167 "trait.ch"
    (elem1=CopyTree(new_value));
#line 167 "trait.ch"
#line 167 "trait.ch"
#line 168 "trait.ch"
    (list=CopyTree(old_value));
#line 168 "trait.ch"
#line 168 "trait.ch"
#line 169 "trait.ch"
    {
#line 169 "trait.ch"
        /* [ metalang::IF
            [ META "cond"]
            [ metalang::EQUAL
                [ META "elem1"]
                [ metalang::FUNC
                    [ metalang::IDENT "SonTree"]
                    [ LIST 
                        [ META "elem1"]
                        [ metalang::NUMB "2"]
                    ]
                ]
            ]
            [ metalang::EQUAL
                [ META "list"]
                [ META "elem1"]
            ]
           ]
#line 169 "trait.ch"
        */
#line 169 "trait.ch"
        TheConstructor(-2,MakeString("cond"),META,1,-2,MakeString("elem1"),META,1,-2,MakeString("SonTree"),metalang::IDENT,1,
#line 169 "trait.ch"
            -2,MakeString("elem1"),META,1,-2,MakeString("2"),metalang::NUMB,1,-4,LIST,2,LIST,2,metalang::FUNC,2,metalang::EQUAL,2,-2,MakeString("list"),META,1,
#line 169 "trait.ch"
            -2,MakeString("elem1"),META,1,metalang::EQUAL,2,metalang::IF,3,-3) ;
#line 169 "trait.ch"
        elem = PopTree ;
#line 169 "trait.ch"
        {
#line 169 "trait.ch"
            register PPTREE _inter ;
#line 169 "trait.ch"
#line 169 "trait.ch"
#line 1 "trait.ch"
            metarep("cond", elem, cond);
#line 1 "trait.ch"
#line 1 "trait.ch"
            metarep("elem1", elem, elem1);
#line 1 "trait.ch"
#line 1 "trait.ch"
            metarep("list", elem, list);
#line 1 "trait.ch"
#line 1 "trait.ch"
        }
#line 1 "trait.ch"
    }
#line 1 "trait.ch"
#line 1 "trait.ch"
#line 175 "trait.ch"
    (inter=tree);
#line 175 "trait.ch"
#line 175 "trait.ch"
#line 176 "trait.ch"
    (rep=fathertree(inter));
#line 176 "trait.ch"
#line 176 "trait.ch"
#line 177 "trait.ch"
    if ( !(((_inter = (PPTREE)rep,1) && 
#line 177 "trait.ch"
                (NumberTree(_inter) == LIST) &&
#line 177 "trait.ch"
                1)) ) {
#line 177 "trait.ch"
#line 178 "trait.ch"
                        rank = ranktree(inter);
#line 178 "trait.ch"
#line 179 "trait.ch"
                        {
#line 179 "trait.ch"
                            PPTREE _ptTree0= (PPTREE) 0,_ptRes0= (PPTREE) 0;
#line 179 "trait.ch"
                            _ptRes0 = MakeTree(metalang::BEGIN, 1);
#line 179 "trait.ch"
                            _ptTree0 = inter;
#line 179 "trait.ch"
                            {
#line 179 "trait.ch"
                                PPTREE _ptTree1= (PPTREE) 0 ;
#line 179 "trait.ch"
                                _ptTree1 = (PPTREE) 0;
#line 179 "trait.ch"
                                _ptTree0 = AddList( _ptTree0,_ptTree1);
#line 179 "trait.ch"
                            }
#line 179 "trait.ch"
                            ReplaceTree(_ptRes0, 1, _ptTree0);
#line 179 "trait.ch"
                            inter = _ptRes0;
#line 179 "trait.ch"
                        }
#line 179 "trait.ch"
#line 179 "trait.ch"
#line 180 "trait.ch"
                        replacetree(rep, rank, inter);
#line 180 "trait.ch"
#line 181 "trait.ch"
                        ((_inter = (PPTREE)inter,1) && 
#line 181 "trait.ch"
                            ((inter=SonTree(_inter,1)),1) &&
#line 181 "trait.ch"
                            1);
#line 181 "trait.ch"
                        ;
#line 181 "trait.ch"
#line 182 "trait.ch"
                      } else 
#line 182 "trait.ch"
#line 183 "trait.ch"
        (inter=rep);
#line 183 "trait.ch"
#line 183 "trait.ch"
#line 183 "trait.ch"
#line 184 "trait.ch"
    ((_inter = (PPTREE)inter,1) && 
#line 184 "trait.ch"
        ((rep=SonTree(_inter,2)),1) &&
#line 184 "trait.ch"
        1);
#line 184 "trait.ch"
    ;
#line 184 "trait.ch"
#line 185 "trait.ch"
    {
#line 185 "trait.ch"
        PPTREE _ptTree0= (PPTREE) 0,_sonTree0= (PPTREE) 0 ;
#line 185 "trait.ch"
        _ptTree0 = elem;
#line 185 "trait.ch"
        {
#line 185 "trait.ch"
            PPTREE _ptTree1= (PPTREE) 0 ;
#line 185 "trait.ch"
            _ptTree0 = AddList( _ptTree0,rep);
#line 185 "trait.ch"
        }
#line 185 "trait.ch"
        ReplaceTree(inter, 2, _ptTree0);
#line 185 "trait.ch"
    }
#line 185 "trait.ch"
#line 185 "trait.ch"
#line 186 "trait.ch"
    useValue = 1 ;
#line 186 "trait.ch"
#line 187 "trait.ch"
}
#line 187 "trait.ch"

RIEN    FIN_CPLUSPLUS ;
#line 187 "trait.ch"
/*Well done my boy */ 

