[antlr-interest] ANTLR grammar for reStructuredText

Michael Bedward michael.bedward at gmail.com
Fri May 27 21:12:08 PDT 2011


Hi Robin,

I use sphinx / rst so I'm very pleased to see someone working on an
ANTLR grammar. I'd be keen to help out if you are going to make it
open source. It will be a couple of days before I can look at it so
others here might answer your questions before I get to it - if not
I'll reply next week.

Michael


On 28 May 2011 10:34, Robin <diabeteman at gmail.com> wrote:
> I just re-read my email and I may have been a little bit vague in my
> questions :-) So I'll start with some more specific ones :
>
> 1/ How do I match a line of text?
> Since RST is a documentation markup language, there are no limitations in
> the characters allowed. How can I match a sequence of words (sentence)
> without overlapping with specific RST markup ? (such as comments or
> directives)
>
> 2/ How do I match RST section titles?
> http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#sections
> How can I have the parser "remember" the current section number (depth) and
> emit an error if the markup is inconsistent with the previous section
> titles?
>
> 3/ How do I match RST comments?
> http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#comments
> Since indentation matters, is there another way to do it than the python
> parser ? (with a custom TokenStream)
>
> Thanks in advance !
>
> Robin
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list