This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <unordered_map> | |
#include <set> | |
using namespace std ; | |
unordered_map<string, set<string> > productions, first_values, follow_values; | |
set<string> non_terminals, terminals; | |
string start_symbol ; | |
string getBody(string produc) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Harsh Vardhan Kumar on 10-09-2018. | |
// | |
#include <iostream> | |
#include <unordered_map> | |
#include <string> | |
using namespace std ; | |
unordered_map <string, int> keywords ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Harsh Vardhan Kumar on 28-02-2018. | |
// | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <unordered_map> | |
#include <unordered_set> | |
#include <fstream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Harsh Vardhan Kumar on 29-01-2018. | |
// | |
#include <iostream> | |
#include <set> | |
#include <vector> | |
using namespace std ; | |
const int inf = 1000000 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Harsh Vardhan Kumar on 29-01-2018. | |
// | |
#include <iostream> | |
#include <set> | |
#include <vector> | |
#define inf 1000000 ; | |
#define nil -1000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Harsh Vardhan Kumar on 01-01-2018. | |
// | |
#ifndef UNTITLED_UFDS_H | |
#define UNTITLED_UFDS_H | |
#include <vector> | |
#include <iostream> | |
#include <unordered_map> |