<commit_before>/**
 * <NAME> - Scanner Tester
 * 9-mar-2016
 * This program is used to test the scanner. It reads in the given source file and outputs the tokens.
 */

#include <iostream>
#include <fstream>
#include <string>
#include <ctime>
using namespace std;

#include "mscan.h"

ifstream sourceFile;
ofstream listFile;
Scanner scan;

int main(int argc, char* argv[]) {

	sourceFile.open(argv[1]);
	if (!sourceFile.is_open()) {
		cout << "File not found.";
		cin.get();
		return 1;<commit_msg>Added "help" Option for scan_test<commit_after>/**
 * <NAME> - Scanner Tester
 * 9-mar-2016
 * This program is used to test the scanner. It reads in the given source file and outputs the tokens.
 */

#include <iostream>
#include <fstream>
#include <string>
#include <ctime>
using namespace std;

#include "mscan.h"

ifstream sourceFile;
ofstream listFile;
Scanner scan;

int main(int argc, char* argv[]) {

	if (strcmp("help", argv[1]) == 0) {
		cout << "Usage: ./scan_test [inputFile]\n       ./scan_test help\nExample: ./scan_test myProgram.mnc" << endl;
		return 0;
	} else {
		sourceFile.open(argv[1]);
		if (!sourceFile.is_open()) {
			cout << "File not found.";
			cin.get();
			return 1;
		}
{'fraction_non_alphanumeric': 0.14728033472803348, 'fraction_numerical': 0.014225941422594143, 'mean_word_length': 3.901639344262295, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4842744', 'n_tokens_mistral': 443, 'n_tokens_neox': 412, 'n_words': 135}