ANTLR: Help on Lexing Errors for a custom grammar example
问题 What approach would allow me to get the most on reporting lexing errors? For a simple example I would like to write a grammar for the following text (white space is ignored and string constants cannot have a \" in them for simplicity): myvariable = 2 myvariable = "hello world" Group myvariablegroup { myvariable = 3 anothervariable = 4 } Catching errors with a lexer How can you maximize the error reporting potential of a lexer? After reading this post: Where should I draw the line between