Complete parser class

This commit is contained in:
Hazem Krimi
2024-03-23 00:08:15 +01:00
parent e488aad6da
commit 4c77ab9817
2 changed files with 51 additions and 3 deletions
+8
View File
@@ -1,4 +1,5 @@
#include <iostream>
#include <regex>
#include <parser.h>
using namespace std;
@@ -6,8 +7,15 @@ using namespace std;
int main(int argc, char* argv[])
{
string path = argv[1];
if (!regex_match(path, regex("^.+\\.vm"))) {
cout << "Wrong file extension!" << endl;
return 1;
}
Parser parser(path);
parser.printFile();
return 0;
}