Goose  Diff

Differences From Artifact [95310ce80c]:

  • File bs/empathy.cpp — part of check-in [7b2e42a02c] at 2018-11-02 18:20:51 on branch trunk — ir: implemented Enumerate. (user: achavasse size: 973)

To Artifact [331de8c08d]:

  • File bs/empathy.cpp — part of check-in [adc06c3670] at 2018-11-03 00:19:40 on branch trunk — ir: Implemented Compare. (user: achavasse size: 1161)

11
12
13
14
15
16
17

18
19
20
21
22
23
24




25
26
27
   // ir::ToString( cout, gg ) << endl;

    ir::Trie<> testTrie;
    testTrie = Merge( testTrie, gg );
    testTrie = Merge( testTrie, TVEC( TSID( blah ), TSTR( "bar" ) ) );
    testTrie = Merge( testTrie, TVEC( TSID( foo ), TSTR( "bar" ) ) );
    testTrie = Merge( testTrie, TVEC( TSID( blah ), TSTR( "meh" ) ) );

    testTrie = Merge( testTrie, TSTR( "bar" ) );
    testTrie = Merge( testTrie, TSTR( "foo" ) );
    testTrie = Merge( testTrie, TVEC( TSID( foo ), TSTR( "barrr" ), VECOFLENGTH( M ), REPEAT( ANYTERM( U ) ) ) );
    ir::GraphVizDump( "dump2.dot", testTrie );

    for( auto&& t : Enumerate( testTrie ) )
        ir::ToString( cout, t ) << endl;





    return EXIT_SUCCESS;
}







>







>
>
>
>



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
   // ir::ToString( cout, gg ) << endl;

    ir::Trie<> testTrie;
    testTrie = Merge( testTrie, gg );
    testTrie = Merge( testTrie, TVEC( TSID( blah ), TSTR( "bar" ) ) );
    testTrie = Merge( testTrie, TVEC( TSID( foo ), TSTR( "bar" ) ) );
    testTrie = Merge( testTrie, TVEC( TSID( blah ), TSTR( "meh" ) ) );
    auto testTrie2 = testTrie;
    testTrie = Merge( testTrie, TSTR( "bar" ) );
    testTrie = Merge( testTrie, TSTR( "foo" ) );
    testTrie = Merge( testTrie, TVEC( TSID( foo ), TSTR( "barrr" ), VECOFLENGTH( M ), REPEAT( ANYTERM( U ) ) ) );
    ir::GraphVizDump( "dump2.dot", testTrie );

    for( auto&& t : Enumerate( testTrie ) )
        ir::ToString( cout, t ) << endl;

    cout << Compare( testTrie, testTrie2 ) << endl;
    cout << Compare( testTrie2, testTrie2 ) << endl;
    cout << Compare( testTrie, testTrie ) << endl;

    return EXIT_SUCCESS;
}