Allow lexer to accept tokens that ended at previous positions
* Track lookahead in each tree * Add 'mark_end' API that external scanners can use
This commit is contained in:
parent
12d2a9d93f
commit
d222dbb9fd
12 changed files with 96 additions and 71 deletions
|
|
@ -35,12 +35,10 @@ struct AcceptTokenAction {
|
|||
};
|
||||
|
||||
struct LexState {
|
||||
LexState();
|
||||
bool operator==(const LexState &) const;
|
||||
|
||||
std::map<rules::CharacterSet, AdvanceAction> advance_actions;
|
||||
AcceptTokenAction accept_action;
|
||||
bool is_token_start;
|
||||
};
|
||||
|
||||
struct LexTable {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue