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;
}
|