Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Terminal with specific size(how parse a text with data define with specific size?)
Terminal with specific size [message #1823620] Mon, 30 March 2020 12:05
Olivier Germon is currently offline Olivier GermonFriend
Messages: 3
Registered: March 2020
Junior Member
Hello,
I've a language with formatter by size by exemple :
curve is with an int on 4 characters, x and y a double on 16 characters

*Curve
   1             0.0             0.0
   2             0.1             0.0
   3             0.2             0.0
   4             0.3             0.0 
   5             0.4             0.0
   6             0.5             0.0

but is possible too :

*Curve
12341.253462875154262.16234595212451
1235             0.11.2415248612e+01
12361.234567891112e21.234567891112e2

but no :

*Curve
   1      0.0    0.0             0.0
   2             0.1             0.0

I want define :
Curve:"*Curve"
    points+=Point*;

Point: INT4 DOUBLE16 DOUBLE16;

terminal INT4 : " "*n (0..9)*m with n+m=4;
terminal DOUBLE16 : (0..9)*n "." (0..9)*m with n+m=16;
...


Olivier
Previous Topic:Xtext YAML Grammar
Next Topic:Xtext grammar to Java Code Generation
Goto Forum:
  


Current Time: Sun Nov 29 22:35:34 GMT 2020

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

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

Back to the top