Add script to trim whitespace

This commit is contained in:
Max Brunsfeld 2014-03-09 19:49:35 -07:00
parent e681a63552
commit 39aa0ccc91
66 changed files with 350 additions and 347 deletions

View file

@ -14,7 +14,7 @@ namespace tree_sitter {
LexActionTypeError,
LexActionTypeAdvance
} LexActionType;
class LexAction {
LexAction(LexActionType type, size_t state_index, rules::Symbol symbol);
public:
@ -23,12 +23,12 @@ namespace tree_sitter {
static LexAction Advance(size_t state_index);
bool operator==(const LexAction &action) const;
bool operator<(const LexAction &action) const;
LexActionType type;
rules::Symbol symbol;
size_t state_index;
};
std::ostream& operator<<(std::ostream &stream, const LexAction &item);
}
@ -50,16 +50,16 @@ namespace tree_sitter {
std::set<LexAction> default_actions;
std::set<rules::CharacterSet> expected_inputs() const;
};
typedef long int LexStateId;
class LexTable {
public:
static const LexStateId ERROR_STATE_ID;
LexStateId add_state();
void add_action(LexStateId state_id, rules::CharacterSet rule, LexAction action);
void add_default_action(LexStateId state_id, LexAction action);
std::vector<LexState> states;
LexState error_state;
};