Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Not allowing empty lines at beginning of the page(Not allowing empty lines at beginning of the page)
Not allowing empty lines at beginning of the page [message #1732009] Wed, 11 May 2016 16:06 Go to next message
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 120
Registered: April 2016
Senior Member
index.php/fa/25875/0/

My grammar not allowing empty lines. Can anyone tell me whats wrong with my grammar?

  • Attachment: begin.png
    (Size: 11.97KB, Downloaded 428 times)
  • Attachment: xtextfie.txt
    (Size: 8.72KB, Downloaded 85 times)
Re: Not allowing empty lines at beginning of the page [message #1732041 is a reply to message #1732009] Thu, 12 May 2016 08:08 Go to previous messageGo to next message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 246
Registered: June 2013
Senior Member
when you hover over the error marker, what message will popup?
Re: Not allowing empty lines at beginning of the page [message #1732042 is a reply to message #1732041] Thu, 12 May 2016 08:16 Go to previous messageGo to next message
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 120
Registered: April 2016
Senior Member
missing EOF at '\r\n\r\n\r\n'
Re: Not allowing empty lines at beginning of the page [message #1732050 is a reply to message #1732009] Thu, 12 May 2016 08:41 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6510
Registered: July 2009
Senior Member
Hi

Your grammar treats NL as a distinct terminal so you must place NL
wherever you allow it e.g. to allow NL at the start of the file:

Model: NL* statements+=Statement*;

Regards

Ed Willink


On 11/05/2016 17:06, RamaRao Nandamuri wrote:
> My grammar not allowing empty lines. Can anyone tell me whats wrong with my grammar?
>
>
Re: Not allowing empty lines at beginning of the page [message #1732052 is a reply to message #1732050] Thu, 12 May 2016 08:59 Go to previous messageGo to next message
RamaRao Nandamuri is currently offline RamaRao NandamuriFriend
Messages: 120
Registered: April 2016
Senior Member
thanks, it's working. How can we debug xtext grammar? any suggestions?
Re: Not allowing empty lines at beginning of the page [message #1732055 is a reply to message #1732052] Thu, 12 May 2016 09:39 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13193
Registered: July 2009
Senior Member
you can adapt the workflow as following to create a antlr debug grammar you might be able to use with antlrworks

language = StandardLanguage {
			name = "org.xtext.example.mydsl.MyDsl"
			fileExtensions = "mydsl"

			serializer = {
				generateStub = false
			}
			validator = {
				// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
			}
			parserGenerator = {
				debugGrammar = true
			}
		}


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Handling older files which contain unescaped keywords
Next Topic:Xtext returns statement
Goto Forum:
  


Current Time: Sat Nov 16 01:40:17 GMT 2019

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

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

Back to the top