I am having a slight problem with manually issuing a token using the lexer rule in ANTLR. I know that the emit () function should be used, but there seems to be a clear lack of documentation about this. Does anyone have a good example of how to do this?
The ANTLR book provides a good example of how you need to do this to parse a Python attachment. For example, if you see a certain number of spaces that is larger than the previous space in the line, emit the INDENT token, but if it is less, emit the DEDENT token. Unfortunately, the book obscures the necessary syntax.
EDIT: Here is an example of what I'm trying to analyze. It is placed on Markdown notebooks:
before blockquote
> text1
>
> > text2
>
> text3
outside blockquote
, > . , , (...) PARAGRAPH_START, CDATA, PARAGRAPH_END, BQUOTE_START, CDATA, BQUOTE_START, CDATA, BQUOTE_END, CDATA, BQUOTE_END, PARAGRAPH_START, CDATA, PARAGRAPH_END. - BQUOTE_END, , , , , ( → = 1)