node label/key in XText when translating from grako -


in grako 1 can use following name:e add result of e ast using name key. example

var_def     =     var+:id {',' var+:id}* 

what translation of xtext? tried

var_def:      var=id (',' var=id)*; 

which not failing, raising following warning

multiple markers @ line - possibly assigned value of feature 'var' may overridden    subsequent assignments. - assignment override possibly assigned value of    feature 'var'. 

i think trying mimic name behavior, not have success.

with solution last id available in ast. assume var should multi-valued feature holding ids, not last one. can expressed as

var_def:     var+=id (',' var+=id)*; 

in resulting ast var list of ids.


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -