|
|
Re: How to use Rules from an inherited grammar ? [message #1765648 is a reply to message #1765640] |
Tue, 13 June 2017 06:22   |
|
You likely want to build an inheritance chain with the "with" statement.
grammar A with B
grammar B with C
grammar C with D
This makes the rules available.
Similar if your derive from Xbase:
grammar foo.MyDSL with org.eclipse.xtext.xbase.Xbase
grammar org.eclipse.xtext.xbase.Xbase with org.eclipse.xtext.xbase.Xtype
|
|
|
Re: How to use Rules from an inherited grammar ? [message #1765726 is a reply to message #1765648] |
Tue, 13 June 2017 21:36   |
|
Karsten Thoms wrote on Tue, 13 June 2017 02:22You likely want to build an inheritance chain with the "with" statement.
grammar A with B
grammar B with C
grammar C with D
This makes the rules available.
Yes I did use the "with" keyword for the grammar chain in the way you describe but in the last grammar I could not access the terminal rules ID, STRING, ... any more.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04843 seconds