[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [xtext-dev] generated CA methods name collision
|
Using underscore won't fix the problem, as _ is allowed in IDs, too :-)
Model :
(elements+=Element+);
Element :
Foo | FooName;
Foo :
"foo" Name_X=ID;
Foo_Name :
"bar" X=ID;
Jan
Am 22.01.2009 um 22:34 schrieb michael clay:
copied from https://bugs.eclipse.org/bugs/show_bug.cgi?id=261364
-------------------------------------------------------------------------
Model :
(elements+=Element+);
Element :
Foo | FooName;
Foo :
"foo" nameX=ID;
FooName :
"bar" x=ID;
Which leads in (only!) one completeFooNameX Method in Both cases
which might
be inappropriate because there may be two complete diffenent things
to assign.
------------------------------------------------------------------
we could detect such name collisions and use a separator character
('_' or '$' for generated names??) between the rule and the assignment
('completeFooName_X')..what do you think?
note: RULE_ID is not allowed to start with '$'
m
_______________________________________________
xtext-dev mailing list
xtext-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/xtext-dev
--
Dr. Jan Köhnlein
Senior Software Architekt
Telefon: +49 (0) 431 / 5606-337
Mobile: +49 (0) 163 / 3979 776
Telefax: +49 (0) 431 / 5606-339
http://www.itemis.de
jan.koehnlein@xxxxxxxxx
itemis AG
Niederlassung Kiel
Schauenburgerstr. 116
24118 Kiel
http://www.itemis.de/
Rechtlicher Hinweis:
Registergericht: Amtsgericht Dortmund HRB 20621
Sitz der Gesellschaft: Lünen
Vorstand: Wolfgang Neuhaus, Jens Wagener, Dr. Georg Pietrek
Aufsichtsrat: Prof. Dr. Burkhard Igel (Vorsitzender), Stephan
Grollmann, Michael Neuhaus