Remove some unused imports

This commit is contained in:
Max Brunsfeld 2014-02-10 21:09:43 -08:00
parent ab431c24dc
commit 66f7dcf28a
7 changed files with 8 additions and 13 deletions

View file

@ -3,7 +3,6 @@
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <vector>

View file

@ -3,7 +3,7 @@
#include "rule_transitions.h"
#include "grammar.h"
using std::unordered_map;
using std::map;
using std::set;
using std::dynamic_pointer_cast;
using tree_sitter::rules::Symbol;
@ -12,8 +12,8 @@ namespace tree_sitter {
class Grammar;
namespace build_tables {
unordered_map<Symbol, set<Symbol>> follow_sets(const ParseItem &item, const Grammar &grammar) {
unordered_map<Symbol, set<Symbol>> result;
map<Symbol, set<Symbol>> follow_sets(const ParseItem &item, const Grammar &grammar) {
map<Symbol, set<Symbol>> result;
for (auto pair : sym_transitions(item.rule)) {
auto symbol = *pair.first;

View file

@ -4,13 +4,13 @@
#include "item.h"
#include "symbol.h"
#include <set>
#include <unordered_map>
#include <map>
namespace tree_sitter {
class Grammar;
namespace build_tables {
std::unordered_map<rules::Symbol, std::set<rules::Symbol>> follow_sets(const ParseItem &item, const Grammar &grammar);
std::map<rules::Symbol, std::set<rules::Symbol>> follow_sets(const ParseItem &item, const Grammar &grammar);
}
}

View file

@ -4,7 +4,6 @@
#include <string>
#include "rule.h"
#include <set>
#include <unordered_set>
#include "symbol.h"
#include <vector>

View file

@ -1,7 +1,6 @@
#include "./perform.h"
#include "item.h"
#include "item_set_closure.h"
#include "first_set.h"
#include "item_set_transitions.h"
#include "rules.h"
#include "grammar.h"
@ -9,7 +8,7 @@
using std::pair;
using std::string;
using std::vector;
using std::unordered_map;
using std::map;
namespace tree_sitter {
namespace build_tables {
@ -20,8 +19,8 @@ namespace tree_sitter {
class TableBuilder {
const Grammar grammar;
const Grammar lex_grammar;
unordered_map<const ParseItemSet, size_t> parse_state_indices;
unordered_map<const LexItemSet, size_t> lex_state_indices;
map<const ParseItemSet, size_t> parse_state_indices;
map<const LexItemSet, size_t> lex_state_indices;
ParseTable parse_table;
LexTable lex_table;

View file

@ -1,7 +1,6 @@
#ifndef __TreeSitter__lex_table__
#define __TreeSitter__lex_table__
#include <unordered_map>
#include <vector>
#include <string>
#include <set>

View file

@ -1,5 +1,4 @@
#include "rules.h"
#include <unordered_map>
using std::string;
using std::hash;