[antlr-interest] Looking for a very simple example

Prashant Deva prashant.deva at gmail.com
Sat Apr 15 08:35:02 PDT 2006


Take a look at this tutorial to see how similar antlr grammar files are to
java files-
http://www.placidsystems.com/articles/article-grammarlayout/grammarLayout.htm



--
Prashant Deva
Creator, ANTLR Studio
Founder, Placid Systems, www.placidsystems.com

On 4/13/06, Erik Forbes <erikforbes at gmail.com> wrote:
>
> Greetings all,
>
> I've been messing with ANTLR for two weeks now, and I'm just not getting
> it. I don't know why, but I can't wrap my head around the concept behind
> ANTLR. I'm starting to think I'm deficient in some way! :(
>
> What I'm trying to do is create for myself a very, VERY simple example for
> parsing something like wiki markup. Say, something that can handle
> horizontal rule markup, bold and/or italic text, headings, and multiline
> centered blocks.
>
> I've seen TML, and I've seen JustWiki's grammar, but they're both
> extremely complex and I don't understand them at all. Very intimidating.
> I've read the ANTLR manual cover to cover (printed it out...) at least 3
> times, and while I am intensely interested in this sort of thing, I just
> can't seem to understand it.
>
> In case anyone is thinking of helping me out, here's the specs I'm looking
> for for the simple example.
>
> Horizontal rules should be a line with nothing but this: ----
> Bold text should be surrounded with **
> Italic text should be surrounded with //
> Bold or Italic cannot span multiple lines, but they can nest inside
> eachother.
> Headings should be a line that starts with 1 or more !, then a space, then
> any unformatted text (no bold or italic here)
> Centered blocks can be multiline, and are surrounded with triple-colons
> :::
>
> I've tried to approach this problem from at least 5 angles, and I keep
> running into trouble. I just don't understand what I'm trying to do.
>
> Can anyone help?
>
> Thanks,
> Erik
>
> --
> Support your local gravity testers -- Skydive!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060415/d47b225a/attachment.html


More information about the antlr-interest mailing list