I am trying to parse a language that has a block with user supplied start/end mark, see following example
@IDENT1
text... text...
text ...
IDENT1
OR
@@IDENT2
text... text...
text ...
IDENT2
are both valid block, but following is not
@IDENT1
text ... text...
IDENT2
How could I write a rule in ANTLR4 to parse this?