[furcas-discussion] Parser generation and URIs in _beforeSeqEl

Thomas Goldschmidt thomas.goldschmidt at de.abb.com
Thu Feb 3 14:44:52 CET 2011


Hi Axel,

There is already a bug opened on this issue:
https://bugzilla.furcas.org/cgi-bin/bugzilla3/show_bug.cgi?id=88

Cheers,
Thomas


 
Thomas Goldschmidt 

ABB AG
Forschungszentrum
Wallstadter Straße 59
68526 Ladenburg
Office Phone: +49 6203 716134
Office Fax: +49 6203 716253
e-mail: thomas.goldschmidt at de.abb.com

ABB AG
Sitz/Head Office: Mannheim 
Registergericht/Registry Court: Mannheim
Handelsregisternummer/Commercial Register No.: HRB 4664
Geschäftsführung/Managing Board: Peter Smits (Vorsitzender), Joachim 
Schneider, Markus Ochsner, Hans-Georg Krabbe
Vorsitzender des Aufsichtsrats/Chairman of Supervisory Board: Bernhard 
Jucker

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
Weitergabe dieser Mail ist nicht gestattet. 

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.



Axel Uhl <axel.uhl at gmx.de> 
Sent by: furcas-discussion-bounces at lists.furcas.org
03.02.2011 14:41

To
furcas-discussion at lists.furcas.org
cc

Subject
[furcas-discussion] Parser generation and URIs in _beforeSeqEl






Hi all,

Sebastian accidentally ran into an issue that seems to have to do with 
how the parser generator adds URIs to the _beforeSeqEl calls in the 
generated parser. You can, for example, see that in TCSParser, line 6188:

 
_beforeSeqEl("
http://www.furcas.org/transientParsingResource_mu-KICssEeCJxeruKCZONA#//@templates.17/@templateSequence/@elements.0
");

The call uses a URI that obviously refers to a transient element that in 
this case is supposed to be part of the TCS concrete syntax. However, 
the URI refers to a transient resource that for sure doesn't survive the 
parser generation phase as we currently don't seem to be storing the 
mapping model anywhere.

Interestingly, this doesn't seem to cause problems... except for this 
one test case that Sebastian added. 
TestNestedScopesWithTextBlocks.testRebindingToDefinitionInInnerScope 
causes an exception when 
ParserTextBlocksHandler.notifyEnterSequenceElement is trying to actually 
load the EObject with the URI specified in the _beforeSeqEl call from 
the current ResourceSet. But if the test case is run as the entire 
ReferenceResolvingTests suite, for reasons yet to explore the 
ResourceSet doesn't contain the mapping definition of the test language 
anymore. In turn, the URI can't be resolved in the resource set. 
Downstream, this ultimately leads to an exception because EMF can't 
resolve the URI 
http://www.furcas.org/transientParsingResource_C-8x4C-WEeCFZIxoq4PPuw#//@templates.4/@templateSequence/@elements.0 

to an input stream because without proper proxy settings, www.furcas.org 
can't be resolved in the SAP intranet.

What does this mean w.r.t how the URIs need to look that are generated 
into the _beforeSeqEl calls? It seems to mean that these URIs in general 
should be resolvable in the scope of the ResourceSet used during 
(incremental) parsing. This would also mean that the TCSParser may 
ultimately cause problems because its URIs can't be resolved anymore, 
either.

I suppose we'd need to store at least the durable TCS mapping model 
persistently and generate URIs into TCSParser that can be resolved to 
this persistent resource. For test cases this may be different, and 
Sebastian's particular problem may be resolved by ensuring that the 
transiently-created mapping remains in the test's resource set.

Best,
-- Axel

[attachment "smime.p7s" deleted by Thomas Goldschmidt/DEABB/ABB] 
_______________________________________________
Furcas-discussion mailing list
Furcas-discussion at lists.furcas.org
http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.furcas.org/pipermail/furcas-discussion/attachments/20110203/d3c6952e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 454 bytes
Desc: not available
URL: <http://lists.furcas.org/pipermail/furcas-discussion/attachments/20110203/d3c6952e/attachment.gif>


More information about the Furcas-discussion mailing list