How to get a list of all valid options for the next token?(ANTLR 3)
get the list of FOLLOW sets for each rule, all you need is to access the FOLLOW stack with: BitSet fset = state.followingstate.fsp; ANTLR pushes the current set of tokens that can follow a particular invocation of the rule before it enters the rule. The Rule catches ... Other labels:
faq_actions, faq_analysis
How can I print out the text of the line where an error occurs?(ANTLR 3)
you are using the CommonTokenStream or any other stream that buffers tokens, simply use the token at which the error occurs and look for the line information from that token. Then, just print out that line from the input buffer. I guess you could ...