Artifact b62bd3bd35b28617f15da8252948b06f893c7d02f103aa40dd73c17ba67798d0:
- File
bs/lex/tokenprovider.h
— part of check-in
[5ea9869c62]
at
2019-02-01 18:34:21
on branch trunk
— Lexer:
- added TokenProvider interface.
- added an adapter for a vector of saved tokens as an alternative token provider.
#ifndef EMPATHY_LEX_TOKENPROVIDER_H #define EMPATHY_LEX_TOKENPROVIDER_H namespace empathy::lex { class TokenProvider { public: virtual ~TokenProvider() {} virtual bool eos() const = 0; virtual optional< ir::Term > consume() = 0; virtual optional< ir::Term > lookAhead( size_t distance = 0 ) = 0; }; } #endif