Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Usage of EOF to consume a file in Xtext
Usage of EOF to consume a file in Xtext [message #1810303] Wed, 07 August 2019 09:37
Luigi Maiese is currently offline Luigi MaieseFriend
Messages: 1
Registered: August 2019
Junior Member
Hi everyone,

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:

apiVersion: myApiVersion
kind: myKind
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.

Looking at:
https://www.eclipse.org/Xtext/documentation/301_grammarlanguage.html
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
Previous Topic:LSP -> Debugger implementation
Next Topic:XText Web. How finds ACE the Language Server?
Goto Forum:
  


Current Time: Thu Apr 25 23:29:36 GMT 2024

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

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

Back to the top