protected List<WordToken> collate(List<WordToken> list){
  List<WordToken> result=list;
  if (previous != null) {
    result=previous.collate(list);
  }
  result.add(word);
  return result;
}

protected List < WordToken > collate ( List < WordToken > list ) { List < WordToken > result = list ; if ( previous != null ) { result = previous . collate ( list ) ; } result . add ( word ) ; return result ; }
collate all the words in the stack into the list .
