I'm currently working on a Flash/Flex based website in which users can post Events.
An Event has a description and a list of (dance-)floors (each floor has a name). On each of these floors a list of artist can be added that perform on that floor.
In a first approach I created a text-field for the description and a list of lists for the floors and lineup with thousands of add-/delete-buttons. Unfortunately this was really anoying to fill with information and looked really crappy, so I had the Idea of simply adding a big TextArea for the description and adding BBCode like tags for entering the floors and lineups.
Here an example:
Some description text ... blah blah blah ... some more text ...
blah blah blah
[Floor: Uplifting Floor]
[Floor: Classics Floor]
Tube & Miller
Charly the Diggerman
blah ... blah blah blah ...
The options I was thinking about were an Antlr grammar for this simple language and having a parser generated for this (The generation part is easy, just the grammar is hard for me). The other alternative would be a set of regular expressions and a manually created parser.
Unfortunately my brain seems to be incompatible with formal language definitions and regular expressions.
Does anyone have a hint to a really simple antlr-grammar, that I could use to get me started (Grammar that parses the experts-exchange "code" blocks, for example) or could someone please provide me some sample regular expressions that I could get started with (Looking for something that has a result ["text before the lineup", "content of the lineup", "text after the lineup closing tag"] or ["Floor-Name", "Lineup content"])
I'm not just lazy ... I spent a lot of hours on my antlr and regexp path ... as I mentioned ... My brain seems to be incompatible with this formal thinking :-( (If some one could lend me a brain that can do this, I'd spend an extra 2000 Points ;-) )