kaby76 / Trash

Toolkit for grammars
MIT License
74 stars 5 forks source link

XPath expressions should go across trees #175

Open kaby76 opened 2 years ago

kaby76 commented 2 years ago

There should be a way to check a grammar for a TOKEN_REF that goes to "skip" or off-channel, but I can't do that because we have to be able to go across trees--one is in the parser, and the other is in the lexer parse tree.

kaby76 commented 2 years ago

https://github.com/antlr/antlr4/issues/3875#issuecomment-1242015732. I need to update xpath's so we can search across trees and find these. Something like //parserRuleSpec//TOKEN_REF[text() = //lexerRuleSpec[.//lexerCommands/RARROW]/TOKEN_REF/text()], which works for combined grammars.