Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Single quotation marks consumed incorrectly
Single quotation marks consumed incorrectly [message #1058806] Wed, 15 May 2013 03:55 Go to next message
Claudio Heeg is currently offline Claudio Heeg
Messages: 75
Registered: April 2013
Member
Hello, following problem:
I'm in the process of defining a grammar.
One concrete function should look as follows:
Func('123','456')

However, currently only
Func('123', '456')
(note the whitespace) and
Func("123","456")
seem to work.
Trying the function as it should be produces the error <mismatched input ','' expecting ','> at the comma.
However, I can't seem to find the error in my grammar that would cause this.

Func: 'Func''('something=String_Encap_IntParam','sthElse=String_Encap_IntParam')';

..

String_Encap_IntParam : STRING_ENCAP_INT;
terminal STRING_ENCAP_INT : '"' INT '"' | "'" INT "'"; 

I do not have any terminals or Datatypes defined that involve the sequence ",'" either, so I'm at a loss here, especially since a simple whitespace makes the function work.

Help is much appreciated.

[Updated on: Wed, 15 May 2013 03:57]

Report message to a moderator

Re: Single quotation marks consumed incorrectly [message #1058808 is a reply to message #1058806] Wed, 15 May 2013 04:05 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6214
Registered: July 2009
Senior Member
Hi,

sorry i cannot reproduce this (Xtext 2.4.1). do you have any keywords contains ws or stuff like that.
Re: Single quotation marks consumed incorrectly [message #1058809 is a reply to message #1058808] Wed, 15 May 2013 04:12 Go to previous message
Claudio Heeg is currently offline Claudio Heeg
Messages: 75
Registered: April 2013
Member
Hello - yeah, it seems to work on a minimal example, just wrote one up quickly.
I guess there's some ambiguity hidden somewhere after all.

Thanks anyway!

Edit:
It also works now and I have no idea why. Always nice.

[Updated on: Wed, 15 May 2013 04:20]

Report message to a moderator

Previous Topic:Content assist formatted text with HTML mark-up
Next Topic:Standalone error when validating
Goto Forum:
  


Current Time: Sat Aug 23 05:44:47 EDT 2014

Powered by FUDForum. Page generated in 0.01807 seconds