tag:blogger.com,1999:blog-6255758224607466565.post3191964166661636833..comments2024-02-11T10:25:39.241+01:00Comments on Sebastian Zarnekow's Blog: Xtext Corner #8 - Libraries Are KeyAnonymoushttp://www.blogger.com/profile/05886096380926364322noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-6255758224607466565.post-89419426241188239912016-05-15T13:20:17.373+02:002016-05-15T13:20:17.373+02:00This is indeed a true statement that libraries are...This is indeed a true statement that libraries are very important for the students. They can learn positive things by having combine study. The <a href="http://www.sopwriter.com/our-sop-writing-service/qualified-sop-for-mba-writing-service/" rel="nofollow">mba statement of purpose</a> would be easy for them to write.<br />aliyaahttps://www.blogger.com/profile/06184256288293330921noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-38939278785145382772014-07-14T08:19:17.472+02:002014-07-14T08:19:17.472+02:00Nice article. Any thoughts on the following. Is it...Nice article. Any thoughts on the following. Is it possible ?<br /><br />http://www.eclipse.org/forums/index.php/t/792246/Neerajhttps://www.blogger.com/profile/09215755142704176108noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-6011127759533507952014-04-01T15:46:02.941+02:002014-04-01T15:46:02.941+02:00This comment has been removed by the author.Paul Munteanhttps://www.blogger.com/profile/13412574559683786127noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-60350736707335174592014-04-01T15:45:23.393+02:002014-04-01T15:45:23.393+02:00This comment has been removed by the author.Paul Munteanhttps://www.blogger.com/profile/13412574559683786127noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-47619576853475748152014-04-01T15:45:17.763+02:002014-04-01T15:45:17.763+02:00Hallo Sebastian,
ich habe eine frage die ich auf ...Hallo Sebastian,<br /><br />ich habe eine frage die ich auf Stackoverflow gepostet habe.<br />Vieleicht kast du mir helfen die zu beantworten.<br /><br />https://stackoverflow.com/questions/22780523/how-to-add-c-library-files-to-xtext-checks<br /><br /><br /><br />-- <br />Mit freundlichen Grüße,<br /><br />Paul MunteanPaul Munteanhttps://www.blogger.com/profile/13412574559683786127noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-35652358511293182452013-07-29T13:20:11.250+02:002013-07-29T13:20:11.250+02:00Thanks Sebastian. That's helps somewhat. I wil...Thanks Sebastian. That's helps somewhat. I will keep checking back in hope of an extended example; no pressure!Jonhttps://www.blogger.com/profile/06407603469507669729noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-81115664655264896412013-07-09T23:30:59.964+02:002013-07-09T23:30:59.964+02:00Jon,
I'm not sure that I'll find the time...Jon,<br /><br />I'm not sure that I'll find the time to provide a fully working example in the next weeks.<br /><br />The simplest idea is basically the same as with other artifacts, e.g. with Java libs: You create an archive that contains your library models and put that one onto the classpath of the project. There are other approaches that do not require a java project, but if you use reuse Java classpath semantics, it should work transparently.Anonymoushttps://www.blogger.com/profile/05886096380926364322noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-21621371280825413302013-06-26T16:30:22.712+02:002013-06-26T16:30:22.712+02:00Hi Sebastian,
I have read this post on several oc...Hi Sebastian,<br /><br />I have read this post on several occasions now but still haven't quite understood it. <br /><br />You commented earlier that "It's just the idea that a mechanism which could be used to define functions in the language, is used to define the library functions." then "Alternatively a dedicated syntax can be introduced to define the libraries iff the language itself does not allow to define functions." and finally "I think I will come up with a how to for this approach in the upcoming weeks."<br /><br />I would very much like to read such a how to, describing the first and second approaches. A pair of demonstration projects would be even better. Is there any chance of this happening in the near future? I think this would make a valuable addition to the Xtext documentation as it seems to me a recurring theme in language development.<br /><br />Specifically, I have a situation where I would like to allow users to define functions in my language, but I also want to provide a standard library of function which follow the same pattern. Some indication of how to validate these would be great. I would rather not use EMF directly as I am only familiar with Xtext.<br /><br />Thanks,<br /><br />JonJonhttps://www.blogger.com/profile/06407603469507669729noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-16916474871149162182012-11-10T19:14:45.420+01:002012-11-10T19:14:45.420+01:00Cristiano,
I'm not sure what you have in mind...Cristiano,<br /><br />I'm not sure what you have in mind when you say 'reuse' in that context. Both the generator and the inferrer are Java classes. Reusing those is no different from other classes: composition or inheritance will work. If you want to reuse the output of the inferrer / generator, it's straight forward, too. The inferrer will add the elements to the resource that contains the original model so the inferred things are part of the resource content. The generated parts will be available anyway. Does that make sense to you? Maybe I'm missing your point, though.<br /><br />Regards,<br />SebastianAnonymoushttps://www.blogger.com/profile/05886096380926364322noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-26265608266446883272012-11-10T18:23:00.329+01:002012-11-10T18:23:00.329+01:00Hi,
What I couldn't figure out yet is how woul...Hi,<br />What I couldn't figure out yet is how would be the best way to reuse generation/inferrer defined with a library element.<br />For example, suppose that I have a HousePartsLibrary DSL.<br />With this Dsl I could define different house parts: BlackDoor, BlueDoor, BrickWall, GlassWall, TransparentRoof, etc.<br />And I have a second dsl HouseBuildingDSL where I could reuse all parts created by first dsl. So one house could be:<br />House myhouse{<br /> MainRoof mainroof : TransparentRoof<br /> }<br />It would be interesting to reuse the generator/inferrer of the created element.<br />Could you explain if/how could we do that ?Cristiano Gaviãohttps://www.blogger.com/profile/14887987648892135349noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-2117242439394247902012-11-09T16:24:57.449+01:002012-11-09T16:24:57.449+01:00I'm not sure that I understood what understood...I'm not sure that I understood what understood ;-)<br /><br />No, I don't introduce hidden or invisible concepts in the grammar. It's just the idea that a mechanism which could be used to define functions in the language, is used to define the library functions. Alternatively a dedicated syntax can be introduced to define the libraries iff the language itself does not allow to define functions. I think I will come up with a how to for this approach in the upcoming weeks.Anonymoushttps://www.blogger.com/profile/05886096380926364322noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-73283327305464994622012-11-09T16:02:25.129+01:002012-11-09T16:02:25.129+01:00OK, I think I get it now. You define the _thing_ y...OK, I think I get it now. You define the _thing_ you want as an unreachable node in the grammar. Left alone everything would be statically legal, just there would be no possible input that would ever match the 'function call' rule. <br /><br />Then you plug in the _set of values for the thing_ at run-time. That way, you are not modifying the grammar.soruhttps://www.blogger.com/profile/15239096977838440296noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-5829367181168054582012-11-08T18:15:55.919+01:002012-11-08T18:15:55.919+01:00Xtext is covered in many tutorials throughout the ...Xtext is covered in many tutorials throughout the web and so is the difference between cross references and object instantiation, using EMF and such things. Actually it's a basic thing to have something like<br /><br />Function: name=ID;<br />FunctionCall: function=[Function];<br /><br />The first rule will declare a new function where the second calls such a function. Now it's perfectly possible to create a library with a couple of function declarations that are made available for clients.Anonymoushttps://www.blogger.com/profile/05886096380926364322noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-12266715519782243642012-11-08T18:02:16.926+01:002012-11-08T18:02:16.926+01:00I'm definitely still missing something about h...I'm definitely still missing something about how this would work. If I type:<br /> FunctionCall: function=[Function] <br /><br />into the xtext syntaxt editor, I get an error 'cannot find type for Function'. And as far as I can see, all the scope provider stuff happens downstream from that, after you have generated code from .xtext file for your DSL editor.<br /><br />Which you can't do, as it has an error in it. <br /><br />Is there a tutorial or something somewhere that covers this?soruhttps://www.blogger.com/profile/15239096977838440296noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-62050825669451195242012-11-08T15:16:55.421+01:002012-11-08T15:16:55.421+01:00ImportedNamespaceAwareLocalScopeProvider.getImplic...ImportedNamespaceAwareLocalScopeProvider.getImplicitImports(boolean) is a good starting point (or if you use Xbase: XbaseImportedNamespaceScopeProvider.getImplicitImports(boolean) respectively).<br /><br />The easiest way in the Java context is most likely to ship the libs in a jar and add that one to the class-path of the project.Anonymoushttps://www.blogger.com/profile/05886096380926364322noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-85098040149122871592012-11-08T14:59:46.553+01:002012-11-08T14:59:46.553+01:00Hi Sebastian,
I really like this approach.
What&...Hi Sebastian,<br /><br />I really like this approach.<br /><br />What's the best way to ensure that these libraries are non-expandable? <br /><br />I just want the language user not to change or add any library functions. So I guess it would be the best solution to roll it out with the language.<br /><br />Anyway, there must be a way to import these libraries implictly (like Xtend does with IterableExtensions,...).<br /><br />It would be great if you could show how to define those implicit imports in one of your upcoming Xtext Corner blogs. I guess the ImportedNamespaceAwareLocalScopeProvider is a good starting point, isn't it?<br /><br />Kind regards<br />OliverOliver Lhttps://www.blogger.com/profile/02621313520562207518noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-5951802066652226752012-11-08T14:32:30.217+01:002012-11-08T14:32:30.217+01:00Just as it was described in the post:
FunctionCal...Just as it was described in the post:<br /><br />FunctionCall: function=[Function]<br /><br />Your scope provider is responsible for finding the invoked function thus you are free to look that up from the current file, the workspace or some implicit library.Anonymoushttps://www.blogger.com/profile/05886096380926364322noreply@blogger.comtag:blogger.com,1999:blog-6255758224607466565.post-26788856207848853472012-11-08T14:29:42.191+01:002012-11-08T14:29:42.191+01:00Interesting, but I don't get a sense from this...Interesting, but I don't get a sense from this of _how_ you would actually go about doing it. When you define your grammar file, how do you tell the system 'this category of things is going to be supplied at run-time, not defined somewhere else in the file'?soruhttps://www.blogger.com/profile/15239096977838440296noreply@blogger.com