fragment
HEAD
: '#'
;
fragment
HEADING_TEXT
: (~[#]|'\\#')+?
;
SUBHEADLINE
: HEAD HEAD HEADING_TEXT HEAD HEAD
;
subheadline
: SUBHEADLINE
;
HEAD
: '#'
;
HEADING_TEXT
: (~[#]|'\\#')+?
;
subheadline
: HEAD HEAD HEADING_TEXT HEAD HEAD
;
Greetings!
Note that with the second version, any Skipped and/or Hidden tokens will be accepted between the two HEAD tokens.
Maybe that does not matter in your use case, but just to be aware....
Hope this helps...
-jbb
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.