parsing - Hidden token into default channel - AntlrV3 -
Suppose I am white space (WS) in a hidden channel and for a particular rule alone, I want to Also considered white spaces, is it possible to get WS on the default channel only for that specific rule in parse?
Look at the answer to your question question, how to notice that I have a '\ n in the parser rule I will. You should be able to put 'as well' Now, on the Hidden Channel all the options of your WS will be the only concern being in the rule.
Like
rulename: Token1 '' Token2 '' 'token 1 {location action here};
Please note that the name of the rule begins with a lowercase letter and it is a parser rule, whereas "token #" starts with uppercase letters and has lexers rules. The rule between the different tokens requires a place in this example, and I think you can put something like ("'|' '' '\' 'r' | '\ n') + but I Do not try it, leave it to try for you.
Comments
Post a Comment