Serialization: Tolerant Expressions Grammar [message #655691] |
Tue, 22 February 2011 05:37  |
Eclipse User |
|
|
|
Hi,
I just designed an expressions grammar and I would like to design concrete expressions in the XTextEditor and in the Sample EMF Editor. Unfortunately, I cannot write the expressions grammar very tolerant as the parser could not be generated in that case.
In consequence, it is easy to write syntactically incorrect expressions in the Sample EMF Editor. These expressions cannot be saved and very hardly debugged in the Sample EMF Editor.
Do you have an alternative idea how to make the Sample EMF Editor not crash that easily when saving?
|
|
|
|
|
|
|
|
|
Re: Serialization: Tolerant Expressions Grammar [message #656040 is a reply to message #656028] |
Wed, 23 February 2011 16:20  |
Eclipse User |
|
|
|
Hi Sebastian,
I am not sure whether I get your point. I have binary expression productions like this:
Addition:
Multiplication ('+' Multiplication)*
Parsing with this one works fine but not serialization of for example an addition node without children. But I would like to have productions that behave like this:
Addition:
Multiplication? ('+' Multiplication?)*
Ideally, this one would offer exception-free serialization, right? But unfortunately, I cannot use ones like these, right?
I was wondering if there is another twist that I dont know of.
[Updated on: Wed, 23 February 2011 16:24] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.14202 seconds