I am working on a note taking language (think wiki markup, but somewhat 
more specialized), and I am trying to use Antlr 3.2 to parse and create 
an AST of the content/structure.

Does anyone have any sample wiki (or similar) grammar that works in 
Antlr 3.2?  I found this:

http://dirkriehle.com/publications/2008/wiki-creole/

which is for Creole 1.0 (with is meant to be a standard Wiki markup 
language).  Unfortunately, it doesn't work for me.

Thanks in advance.

cheers,
eric


** More Information for the Interested **


I have a working grammar that can parse document sections and 
paragraphs, for example:

    *section 1
    ---

    this is a paragraph in the section

    section 1.1
    ---

    nested sections!

    ---
    ---
    *


It works great (after a bit of trial and error and reading The 
Definitive ANTLR Reference and giving gUnit a spin).  Now, I am trying 
to start supporting other standard wiki type things in my grammar, like:

Lists:

  * this is a list item
  * this is another list item

Formatting:

this is **bold**!
this is //italic//.

The problem is, my grammar for the the sections/paragraphs above is 
"word" based (ie: I create WORD tokens with the lexer), while the Creole 
example tokenizes the stream into character tokens to be able to 
identify the list, formatting, and other delimiters.

I am hoping for a working example that shows some best practices for a 
language like wiki markup before I go about re-structuring my grammar to 
support these other things (which I think I need to do).

Or, if I am totally misguided, let me know that too.

cheers,
eric


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to