Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Wiki-like Syntax
icon5.gif  Wiki-like Syntax [message #827369] Fri, 23 March 2012 08:28
Heinrich Müller is currently offline Heinrich MüllerFriend
Messages: 10
Registered: March 2012
Junior Member
Hi guys.
I'm a beginner with Xtext and I would like to hear your opinion
considering the feasibility of a wiki-like grammar based on Xtext.

Currently I have the following scheme in mind:
There are two different kinds of documents I want to be able to parse:
a) A tabbed document, much like an excel spreadsheet
b) A document that consists of blocks with headers that define the block. Following that is some free text.
Both documents have in common that I want to be able to define certain tags that can be included in others, much like a XML tree structure.
On the top, there can be some tags that define the file name, a common reference tag (like a hyperlink) and images to be linked to the document. Additionally, there are historic fragments of text on the top that will be either deleted later on or converted to the format of the rest of the document.
The structure I've defined as of now is random, as I generate files for the grammar out of a Hibernate DB.

--------------------------------------

Example for "document header":
"Document title"
|Img="my_pic.png"
|Ref="../refs/random_link.html"


Example for (a):
||Simple||textual||example
||Not||much||to||see_here
||$$Enclosed_tag$$||possible||too


Example for (b):
{Block title 1}
Lorem ipsum bla bla bla
Lorem ipsum bla bla bla
Lorem ipsum bla bla bla

{Block title 2}
Lorem ipsum bla bla bla
Lorem ipsum bla bla bla
Lorem ipsum bla bla bla


--------------------------------------

The main problem is to define the terminal/rule for the free text area. What is the most effective way to handle this? Is it easier to define start/end tags for the free text to concatenate the output?


Cheers.
Heinrich
Previous Topic:Scope Traversal
Next Topic:Resolve Non-LL(*) decisions
Goto Forum:
  


Current Time: Thu Apr 25 18:12:36 GMT 2024

Powered by FUDForum. Page generated in 0.02891 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top