code: function(forBlock) {
  		var entities = [];
  
  		var endingOnValue = forBlock ? 'ENDBLK' : 'ENDSEC';
  
  		if (!forBlock) {
  			curr = scanner.next();
  		}
  		while(true) {
  
  			if(curr.code === 0) {
  				if(curr.value === endingOnValue) {
  					break;
  				}
  
  				var entity;
  				var handler = self._entityHandlers[curr.value];
  				if(handler != null) {
  					log.debug(curr.value + ' {');
  					entity = handler.parseEntity(scanner, curr);
  					curr = scanner.lastReadGroup;
  					log.debug('}');
  				} else {
  					log.warn('Unhandled entity ' + curr.value);
  					curr = scanner.next();
  					continue;
  				}
  				ensureHandle(entity);
  				entities.push(entity);
  			} else {
  				// ignored lines from unsupported entity
  				curr = scanner.next();
  			}
  		}
  		if(endingOnValue == 'ENDSEC') curr = scanner.next(); // swallow up ENDSEC, but not ENDBLK
  		return entities;
  	}
docs: Is called after the parser first reads the 0:ENTITIES group. The scanner
  should be on the start of the first entity already.
  @return {Array} the resulting entities