Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » xText Startup Questions
xText Startup Questions [message #375958] Sat, 17 February 2007 22:35 Go to next message
Eclipse UserFriend
Originally posted by: Randy_Simons.msn.com

I want to try out xText, so started with a really simple grammar:
Entity :
"entity" name=ID;

But I still get a warning message:
...//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128: warning:lexical
nondeterminism between alts 2 and 3 of block upon
...//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128: k==1:'\r'
...//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128: k==2:'\n'
...//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
k==3:'\u0003'..'\ufffe'
...//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
k==4:'\u0003'..'\ufffe'
...//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
k==5:<end-of-token>,'\u0003'..'\ufffe'
...//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
k==6:<end-of-token>,'\u0003'..'\ufffe'

How can something so simple be nondeterministic?

Second question: Assuming this warning isn't enough to cause editor
generation to fail, how do I run the generated editor. The tutorial
says something about Eclipse knowing to use the editor for any file with
the right extension (.dsl), but that doesn't seem to work on the example
I'm trying. Am I missing some configuration step?

Thanks for any help.
Randy Simons
Re: xText Startup Questions [message #375961 is a reply to message #375958] Tue, 20 February 2007 19:39 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1771
Registered: July 2009
Senior Member
Just ignore the warnings, they have nothing to do with your grammar.
The built-in lexer rule for strings is responsible for those warnings.
Unfortunately I don't know how to suppress them... :-(

Sven


Randy Simons wrote:
> I want to try out xText, so started with a really simple grammar:
> Entity :
> "entity" name=ID;
>
> But I still get a warning message:
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128: warning:lexical
> nondeterminism between alts 2 and 3 of block upon
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128: k==1:'\r'
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128: k==2:'\n'
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
> k==3:'\u0003'..'\ufffe'
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
> k==4:'\u0003'..'\ufffe'
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
> k==5:<end-of-token>,'\u0003'..'\ufffe'
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
> k==6:<end-of-token>,'\u0003'..'\ufffe'
>
> How can something so simple be nondeterministic?
>
> Second question: Assuming this warning isn't enough to cause editor
> generation to fail, how do I run the generated editor. The tutorial
> says something about Eclipse knowing to use the editor for any file with
> the right extension (.dsl), but that doesn't seem to work on the example
> I'm trying. Am I missing some configuration step?
>
> Thanks for any help.
> Randy Simons


--
Need professional support on Xtext or Xtend?
Mail to: xtext (at) itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: xText Startup Questions [message #562666 is a reply to message #375958] Tue, 20 February 2007 19:39 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1771
Registered: July 2009
Senior Member
Just ignore the warnings, they have nothing to do with your grammar.
The built-in lexer rule for strings is responsible for those warnings.
Unfortunately I don't know how to suppress them... :-(

Sven


Randy Simons wrote:
> I want to try out xText, so started with a really simple grammar:
> Entity :
> "entity" name=ID;
>
> But I still get a warning message:
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128: warning:lexical
> nondeterminism between alts 2 and 3 of block upon
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128: k==1:'\r'
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128: k==2:'\n'
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
> k==3:'\u0003'..'\ufffe'
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
> k==4:'\u0003'..'\ufffe'
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
> k==5:<end-of-token>,'\u0003'..'\ufffe'
> ..//my.dsl/src-gen//org/example/dsl/parser/mydsl.g:128:
> k==6:<end-of-token>,'\u0003'..'\ufffe'
>
> How can something so simple be nondeterministic?
>
> Second question: Assuming this warning isn't enough to cause editor
> generation to fail, how do I run the generated editor. The tutorial
> says something about Eclipse knowing to use the editor for any file with
> the right extension (.dsl), but that doesn't seem to work on the example
> I'm trying. Am I missing some configuration step?
>
> Thanks for any help.
> Randy Simons


--
Need professional support on Xtext or Xtend?
Mail to: xtext (at) itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Previous Topic:[oaw] metamodel referencing
Next Topic:[MOFScript] _getFeature problem
Goto Forum:
  


Current Time: Sun Nov 23 16:19:12 GMT 2014

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

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