grammar at.ac.tuwien.big.Questionnaire with org.eclipse.xtext.common.Terminals import "http://www.eclipse.org/emf/2002/Ecore" as ecore generate questionnaire "http://www.ac.at/tuwien/big/Questionnaire" Questionnaire: 'questionnaire' title=STRING '[' (groups+=Group)+ ']' ; Group: 'group' name=STRING '[' (questions+=(OpenQuestion | ClosedQuestion | LikertQuestion)+) ']'(',')? ; OpenQuestion: ('mandatory')? ('multiline')? 'open question' question=STRING(',')? ; ClosedQuestion: 'closed question allowing' ('single answer'|'multiple answers') question=STRING answers=Answers(',')? ; LikertQuestion: 'likert question' question=STRING '('('-')?lower=INT'..'higher=INT')'(',')? ; Answers: 'answers [' (answers+=(OpenAnswer | ClosedAnswer)+)(',')? ']' ('default answer is' answer=[ClosedAnswer])? ; OpenAnswer: answer=STRING'...' ; ClosedAnswer: answer=STRING ('enables question ['question=[ClosedQuestion]']')?(',')? ;