Understanding the order that the lexer tokenizes #298
-
So, I seem to get some strange occurrences where sometimes the lexer will tokenize something lower on the list, instead of the one higher up. How is the regex run, is it ran over the WHOLE document all at once? if I have regex like (this is overly simplified) it seems like the second one sometimes grabs uppercase letters as well, I think this may be an issue with me not understanding the order and process the regex is called. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
They're tried one after the other in order. |
Beta Was this translation helpful? Give feedback.
-
Thank you for clarifying that piece, as for the other questions, is there a good way to debug what the lexer is doing, which items it is tagging? It seems like a black box sometimes and not acting as I expect it to when testing the regex in a regex tester manually. |
Beta Was this translation helpful? Give feedback.
They're tried one after the other in order.