Hey!
While porting an early YACC grammar of Rust, I noticed an interesting edge case that I'm not entirely sure how to handle.
When parsing nested generic parameters, the "original" YACC grammar has a rule to parse a >> token, and emits code that puts back a > token into the lexer. It seems that this is how it works around ambiguities between >> as an operator and >> as generic parameter delimiters.
How should I approach such cases in grmtools? I am aware you can call lexer methods in action blocks, but currently the lexer trait has a limited API.
Hey!
While porting an early YACC grammar of Rust, I noticed an interesting edge case that I'm not entirely sure how to handle.
When parsing nested generic parameters, the "original" YACC grammar has a rule to parse a
>>token, and emits code that puts back a>token into the lexer. It seems that this is how it works around ambiguities between>>as an operator and>>as generic parameter delimiters.How should I approach such cases in grmtools? I am aware you can call lexer methods in action blocks, but currently the lexer trait has a limited API.