src/parse.js
function endChoice(stack) {
    if (stack._parentChoice) {
      var choice=stack._parentChoice;
      delete stack._parentChoice;
      delete stack._parentGroup;
      delete stack.groupCounter;
      var parentStack=choice._parentStack;
      delete choice._parentStack;
      
      return parentStack;
    }
    return stack;
  }
function endChoice(stack) {
    if (stack._parentChoice) {
      var choice=stack._parentChoice;
      delete stack._parentChoice;
      delete stack._parentGroup;
      delete stack.groupCounter;
      var parentStack=choice._parentStack;
      delete choice._parentStack;
      
      return parentStack;
    }
    return stack;
  }
function endChoice ( stack ) { if ( stack . _parentChoice ) { var choice = stack . _parentChoice ; delete stack . _parentChoice ; delete stack . _parentGroup ; delete stack . groupCounter ; var parentStack = choice . _parentStack ; delete choice . _parentStack ; return parentStack ; } return stack ; }
if current stack is a choice's branch,return the original parent stack
if current stack is a choice s branch return the original parent stack