Resolve token conflicts by tokens' order in grammar

This commit is contained in:
Max Brunsfeld 2014-03-24 19:18:06 -07:00
parent 2a5dd3434f
commit aac0786449
10 changed files with 52 additions and 48 deletions

View file

@ -10,8 +10,8 @@
namespace tree_sitter {
typedef enum {
ParseActionTypeAccept,
ParseActionTypeError,
ParseActionTypeAccept,
ParseActionTypeShift,
ParseActionTypeReduce,
} ParseActionType;
@ -55,7 +55,7 @@ namespace tree_sitter {
class ParseState {
public:
ParseState();
std::map<rules::Symbol, std::set<ParseAction>> actions;
std::map<rules::Symbol, ParseAction> actions;
std::set<rules::Symbol> expected_inputs() const;
LexStateId lex_state_id;
};