Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » DSL with a free text
DSL with a free text [message #1769897] Fri, 04 August 2017 18:35 Go to next message
Serge Lamikhov is currently offline Serge LamikhovFriend
Messages: 26
Registered: May 2016
Junior Member
I am trying to implement a parser for not very formalized DSL that already exists and cannot be modified.
It looks like the following:

~Instruction name: 

~Instruction Description:
Vector Absolute 16-bit Word Parts
Other multi line input

~More structured section
Number1 Name1 Args1
Number2 Name2 Args2

Would you please advise how my parser and terminals should be implemented for free text multi line input where tilde starts a new section?
I think that state dependent lexer is required for this purpose. Is it possible to accomplish this within Xtext?

Thank you

[Updated on: Fri, 04 August 2017 18:50]

Report message to a moderator

Re: DSL with a free text [message #1769953 is a reply to message #1769897] Mon, 07 August 2017 03:49 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14286
Registered: July 2009
Senior Member

the super naive approach does not work for you?


terminal SECTION_VALUE 	:
	'~' !('~')*

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Content Assistant in a Xtext custom language
Next Topic:How to override Error Messages
Goto Forum:

Current Time: Mon Jul 04 07:23:30 GMT 2022

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

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

Back to the top