[Xtext] not fixed elements in a grammar file [message #39697] |
Mon, 13 April 2009 12:58  |
Eclipse User |
|
|
|
Hello,
Supposing that our text file is composed of columns (like a CSV file)
The unknown nubmer of column in not a deal because we can solve with many
operators (* or +) in the grammar file.
My problem is in the name of elements in the grammar file. Actually I dont
want to put fixed names for may columns because it may change from a file
to another.
To be clearer, I will return to the Addressbook example. Here we now
exacttly what we want, FirstName, lastName, phoneNumber,...
my problem is that I don't want to put fixed names to my elements.
In the begining, I thought that I can do this with a "foreach" loop in the
xpand file. But I don't know if it is feasable
Does any one have an idea about this kind of problem?
Thanks for help.
Best regards,
Hayfa.
|
|
|
Re: [Xtext] not fixed elements in a grammar file [message #39820 is a reply to message #39697] |
Tue, 14 April 2009 03:27   |
Eclipse User |
|
|
|
Hi Hayfa,
could you come up with an example explaining what you want to achieve.
I didn't get it.
Sven
Hayfa schrieb:
> Hello,
>
> Supposing that our text file is composed of columns (like a CSV file)
>
> The unknown nubmer of column in not a deal because we can solve with
> many operators (* or +) in the grammar file.
> My problem is in the name of elements in the grammar file. Actually I
> dont want to put fixed names for may columns because it may change from
> a file to another.
>
> To be clearer, I will return to the Addressbook example. Here we now
> exacttly what we want, FirstName, lastName, phoneNumber,...
> my problem is that I don't want to put fixed names to my elements.
>
> In the begining, I thought that I can do this with a "foreach" loop in
> the xpand file. But I don't know if it is feasable
>
> Does any one have an idea about this kind of problem?
> Thanks for help.
>
> Best regards,
>
> Hayfa.
>
>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09186 seconds