Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Dynamically switch separator in csv file when certain rule is encountered
Dynamically switch separator in csv file when certain rule is encountered [message #1441199] Thu, 09 October 2014 11:40 Go to next message
Jasper Timmer is currently offline Jasper TimmerFriend
Messages: 1
Registered: October 2014
Junior Member
Hi,

I'm new to XText, I have some previous experience with grammars Rascal (maybe you know about it, maybe you don't). But in both environments I cannot solve the following problem, maybe you can help me solve this for XText:

I have a CSV file, but with a certain line, the separator can change to whatever character. Example (you can also escape the separator):

a,b,c,list;with;values
a,b,c,list\,with\,values
@separator,;
a;b;c;list,with,values
a;b;c;list\;with\;values


How do I model that? Thanks for helping!

[Updated on: Thu, 09 October 2014 11:45]

Report message to a moderator

Re: Dynamically switch separator in csv file when certain rule is encountered [message #1441210 is a reply to message #1441199] Thu, 09 October 2014 11:54 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14668
Registered: July 2009
Senior Member
i thinki you need a "custom lexer" for that

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:LUNA SR1, Xtext 2.7.2 Dependency Problem
Next Topic:Automatically indent while typing
Goto Forum:
  


Current Time: Fri Apr 26 18:28:06 GMT 2024

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

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

Back to the top