Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext(grammar with continuation marker)
Xtext [message #1509151] Sat, 13 December 2014 01:37 Go to next message
Hocine ISSAOUN is currently offline Hocine ISSAOUNFriend
Messages: 1
Registered: December 2014
Junior Member
Hello,

How can I define an xtext grammar for a language that have a continuation marker ?
In this language, all identifiers, strings or keywords and so on, can be split into two lines with a continuation marker in a given column.

Example:
in the BMS language an identifier for example can be split in two lines. the continuation character is * in the 72th column.
in tho following line the word IDENTIFIER is split into two lines. the first line contains the first part (IDENT) and finish with the continuation marker '*' in the 72th column and the second line containes the second part of the word (IFIER). This begin at the 6th column.

..............................................................IDENT*
IFIER


is it mendatory to perform this action to customize the lexer ? In this cas how can I easily modify the default lexer ?

Have an example that I can use ?

Thank you in advance.
Re: Xtext [message #1515691 is a reply to message #1509151] Thu, 18 December 2014 09:30 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

using a datatype rule + a valueconverter (+ maybe changeing whitespace/hidden token handling) might do the same


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Navigating model files
Next Topic:How to create an XML schema for my grammar
Goto Forum:
  


Current Time: Tue Apr 23 15:45:25 GMT 2024

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

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

Back to the top