Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Terminal does not match a lowercase string(Terminal does not match a lowercase string)
Terminal does not match a lowercase string [message #1764525] Tue, 30 May 2017 21:27 Go to next message
Olaf Bigalk is currently offline Olaf BigalkFriend
Messages: 155
Registered: July 2009
Location: Berlin
Senior Member
I have the following Terminal Definition:
terminal NAME:
	('a'..'z' | 'A'..'Z' | 'À'..'Ö' | 'Ø'..'Ý' | 'ß'..'ö' | 'ø'..'ý' | 'ÿ')+;

and it does not match the following String
clark

What is wrong ?
Re: Terminal does not match a lowercase string [message #1764526 is a reply to message #1764525] Tue, 30 May 2017 21:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14075
Registered: July 2009
Senior Member
Sure that is the only terminal rule or keyword you have?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Terminal does not match a lowercase string [message #1764626 is a reply to message #1764526] Wed, 31 May 2017 22:24 Go to previous messageGo to next message
Olaf Bigalk is currently offline Olaf BigalkFriend
Messages: 155
Registered: July 2009
Location: Berlin
Senior Member
Christian Dietrich wrote on Tue, 30 May 2017 17:29
Sure that is the only terminal rule or keyword you have?


This are all terminal rules I have:
	
AMOUNT:
	INT (',' INT)?;

Vornamen:
	NAME (('-'|'+') NAME)*;

Nachname:
	NAME ((('-'|'+') NAME) | (E NAME))*;

CityName:
	(NAME '.')? NAME (('-'|'+') NAME)* ('/' NAME '.'?)?;

ACCOUNT:
	NAME (('-'|'_'|"."|"+") NAME)*
;

SITE:
	NAME ('.' NAME)+
;

EMAIL:
	ACCOUNT '@' SITE
;
terminal E:
	'e'
;

terminal PLZ:
	(('A'..'Z')+ "-")? '0'..'9' '0'..'9' '0'..'9' '0'..'9' ('0'..'9')?;

enum Anrede:
	du | sie ;

Sex:
	"Mann" | "Frau"| "Ehe"| "Familie" | "D&H";

terminal ADEL:
	('a'..'z' | 'ß'..'ö' | 'ø'..'ý' | 'ÿ')+;

terminal NAME:
	('a'..'z' | 'A'..'Z' | 'À'..'Ö' | 'Ø'..'Ý' | 'ß'..'ö' | 'ø'..'ý' | 'ÿ')+;

	
terminal NUMMERN:
	'S'('1'..'9')('0'..'9')* '_' ('1'..'9')('0'..'9')*;


Can you see somthing that is wrong ?
Re: Terminal does not match a lowercase string [message #1764631 is a reply to message #1764626] Thu, 01 June 2017 03:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14075
Registered: July 2009
Senior Member
Of course. Terminals are context free.
Thus lowercase will be ADEL not NAME
(First come first serve)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Terminal does not match a lowercase string [message #1764732 is a reply to message #1764631] Thu, 01 June 2017 18:32 Go to previous message
Olaf Bigalk is currently offline Olaf BigalkFriend
Messages: 155
Registered: July 2009
Location: Berlin
Senior Member
Thank you very much. I solved my issue by restructuring my terminal rules.

ACCOUNT:
	LOWERNAME (('-'|'_'|"."|"+") LOWERNAME)*
;

SITE:
	LOWERNAME ('.' LOWERNAME)+
;

[...]
	
terminal LOWERNAME:
	('a'..'z' | 'ß'..'ö' | 'ø'..'ý' | 'ÿ')+;

terminal NAME:
	(LOWERNAME | 'A'..'Z' | 'À'..'Ö' | 'Ø'..'Ý' )+;

Previous Topic:UtilsMethods?
Next Topic:name may not be null xtext 2.12
Goto Forum:
  


Current Time: Wed Oct 20 11:01:54 GMT 2021

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

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

Back to the top