java - Xtext grammar for a nested indented language -


i'm trying write xtext grammar language follows:

on producer1     producerconsumer1         producerconsumer1_1         producerconsumer1_2             producerconsumer1_2_1     producerconsumer2         producerconsumer2_1  on producer2     producerconsumer1 

with following grammar, can see in eclipse editor white-space blocks acknowledged not nested how intended:

model:     model+=on+ ;  on:     'on' producer=validid     begin         (producerconsumers+=then)*     end ;  then:     'then' producerconsumer=validid     begin         (children+=then)*     end ;  terminal begin: 'synthetic:begin';  // increase indentation terminal end: 'synthetic:end';      // decrease indentation 

i'm new xtext , appreciate pointers on i'm going wrong.

do mean

then: 'then' producerconsumer=id (begin     (children+=then)+ end)? 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -