|Usage of EOF to consume a file in Xtext [message #1810303]
||Wed, 07 August 2019 09:37
| Luigi Maiese
Registered: August 2019
I'm new using Xtext and I'm trying to define my own grammar for reading some configuration files, looking for create a meta model.
This is an example of a configuration file:
metadata: label: service: myNameService name: myName
spec: replicas: numberOfReplicas and something else...
In my application I don't need the "and something else..." part, so i'm looking for a way to write my grammar correctly without taking care of that part.
I found that in Xtext you can define terminal UNCLOSED_STRING:
terminal UNCLOSED_STRING : '"' (!'"')* EOF;
but, after the declaration, I don't know how to use it.
can someone help me to find a way? or maybe are there other approaches to do this?
thank you in advance for everything you will advice
Powered by FUDForum
. Page generated in 0.01470 seconds