I want to create a very simple indented space grammar. Each line consists of 1 or more words, but indents, such as python (4 spaces or tab - one indent), and no indents for indents, for example:
if something cool occurs do this else otherwise do this loop around something each time doing this and do that say good byte
Instead of reading each line, calculating the indentation and building the tree manually, can all this be done in the ANTLR grammar? My target language is Java.
source share