Created a Poset template class. It can store the relationships of a partially ordered set, then generate a topological ordering. It will be used to order the type_def declarations in the CGenerator, as they depend on each other in a poset fashion.

This commit is contained in:
Nathan Braswell
2014-05-21 12:01:45 -04:00
parent 6350f93f24
commit d37a07201a
5 changed files with 124 additions and 10 deletions

View File

@@ -14,6 +14,7 @@
#include "Importer.h"
#include "ASTData.h"
#include "CGenerator.h"
#include "Poset.h"
#include "util.h"
#include "Tester.h"
@@ -27,6 +28,8 @@ int main(int argc, char* argv[]) {
RegEx::test();
Lexer::test();
//std::cout << strSlice("123", 0, -1) << std::endl;
Poset<int>::test(); //int specilization just for testing. test() is actually only in the int specilization
if (argc >= 3) {
std::string testResults, line;
int passed = 0, failed = 0;