NaBL rule composition
The new DSLs that I build on top of BaseC need to be able to ‘update’ name binding rules from the host language. For example, state machines can have internal variables which can be accessed using the dot operator (similar to struct member access). Thus, the state machine DSL should define a new name resolution rule for the FieldAccess constructor, but currently this will override the FieldAccess rule from the base language.
Submitted by Mircea Voda on 3 April 2014 at 13:42
Issue Log
On 8 May 2014 at 12:07 Guido Wachsmuth commented:
This will be fixed with the introduction of NaBL Core. You can express separate rules and disambiguate them:
Host Language:
field-excess: FieldAccess(e, f) refers to Field f in Struct s where e has type StructTy(s)
Extension:
state-excess: FieldAccess(e, f) refers to State f in StateMachine m where e has type StateMachineTy(m) field-excess < state-excess
On 8 May 2014 at 12:07 Guido Wachsmuth tagged @guwac
Log in to post comments