Closed
Description
Hi, as we know, the PEG grammar is text(character) based, which means we write lexer and parser grammar together.
But in my application, I have my own lexer(mainly the C-preprocessor) implemented myself, so my question is: can the library support parsing rules for custom lexer.
For example, the lexer has some kinds of std::vector<Token>
supplied, the Token
class may have definition like:
class Token
{
TokenKind kind;
std::string lexeme;
}
Any idea or suggestions?
I mean it could be a generalized peg grammar?
Thanks.
Metadata
Metadata
Assignees
Labels
No labels