Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » DSL with Multiline String as in YAML("|" + Multiline string as in YAML in an Xtext DSL)
DSL with Multiline String as in YAML [message #1785519] Mon, 16 April 2018 07:52
Patrick Stöckle is currently offline Patrick StöckleFriend
Messages: 1
Registered: November 2017
Junior Member
I'm trying to model a YAML-like DSL in Xtext. In this DSL, I need some Multiline String as in YAML.
description: |
  	Line 1
    line 2
    ...


My first try was this:

terminal BEGIN:
	'synthetic:BEGIN'; // increase indentation
terminal END:
	'synthetic:END'; // decrease indentation
terminal MULTI_LINE_STRING:
	"|"
	BEGIN ANY_OTHER END;


and my second try was
terminal MULTI_LINE_STRING:
	"|"
	BEGIN
	((!('\n'))+ '\n')+
	END;


but both of them did not succeed. Is there any way to do this in Xtext?
P.S. I asked the same question on
Previous Topic:QualifiedNameProvider ends up in cyclic resolution, when referring to object of other resource
Next Topic:Maven build problem with xtext 2.13.0
Goto Forum:
  


Current Time: Thu Apr 25 08:10:40 GMT 2024

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

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

Back to the top