Skip to content
Discussion options

You must be logged in to vote

That's ok because it means a zero lenthed token sequence (that subtree of the parse tree should have no tokens). When start and end index are the same it means a single token. It's confusing and, frankly, rather counter intuitive.

So, you would see this if you have an empty rule.

The start/end indices are the same counter intuitive definition for char streams in the lexer.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@n9
Comment options

@kaby76
Comment options

@n9
Comment options

@kaby76
Comment options

Answer selected by n9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants