|
|
|
Re: Extended C Language Editor in XText [message #644588 is a reply to message #644587] |
Mon, 13 December 2010 12:16 |
Meinte Boersma Messages: 434 Registered: July 2009 Location: Leiden, Netherlands |
Senior Member |
|
|
Again: there are no importing facilities for importing complete, pre-existing grammars (in some other grammar def. language) into Xtext.
What you'll have to consider when picking up an existing grammar (e.g., the one you linked):
- Is it actually an LL(*)-parsable language? This rules out left recursion as in the C++ one.
- How big is the conceptual distance between a grammar "just for parsing" (as the C++ one) and a grammar which actually produces a model (tree/attribute grammar)?
E.g., I see many productions in the C++ grammar which are just aliases for terminal rules (mostly identifier). This makes no sense in an Xtext grammar, as you'd most like transform this into an assignment like or something. You'll have to understand both the C(++)-language and both grammar languages quite well to be able to do this. It's certainly possible (and done before), but prepare to dig in into all these aspects.
Xtext blogs: executable models...again? | workshop material | custom scoping with Xtend
|
|
|
Powered by
FUDForum. Page generated in 0.03574 seconds