Hi all,
I am new to ANTLR and writing a parser using the intellij tool (I tried to use the command line tool, but that is another discussion). As a test, I downloaded and ran the plugin on the calculator grammer. There were errors at first, but eventually I managed to get a working parse tree after deleting some whitespace (mostly indentation) in the .g4 file.
My question is, how does ANTLR4 read whitespace and what cases whitespace gets in the way of ANTLR and where it is acceptable? I am fine with not using indentation if I need to, but it seems like most .g4 grammars have indentation and plenty of whitespace to make it more readable.
Also, to clarify, this has nothing to do with dealing with whitespace when making a grammar, I am having trouble with whitespace as I physically type out my grammar and run the intellij tool.
Thanks everybody.