def syntax_trees( self, layer=None ):
        """ Builds syntactic trees (estnltk.syntax.utils.Tree objects) from 
            syntactic annotations and returns as a list. 
            
            If the input argument *layer* is not specified, the type of the
            syntactic parser is used to decide, which syntactic analysis layer 
            should be produced and taken as basis for building syntactic trees;
            If a syntactic parser is not available, then a missing *layer* name 
            is replaced by the first syntactic layer available (1st LAYER_CONLL,
            then LAYER_VISLCG3);
            Otherwise, the *layer* must be provided by the user and it must be 
            either LAYER_CONLL or LAYER_VISLCG3. 
        """
        # If no layer specified, decide the layer based on the type of syntactic
        # analyzer used:
        if not layer and self.__syntactic_parser:
            if isinstance(self.__syntactic_parser, MaltParser):
                layer = LAYER_CONLL
            elif isinstance(self.__syntactic_parser, VISLCG3Parser):
                layer = LAYER_VISLCG3
        # If no syntactic analyzer available, pick the layer as the first syntactic
        # layer available:
        if not layer and self.is_tagged(LAYER_CONLL):
            layer = LAYER_CONLL
        elif not layer and self.is_tagged(LAYER_VISLCG3):
            layer = LAYER_VISLCG3
        # Based on the chosen layer, perform the syntactic analysis (if necessary)
        # and return the results packaged as tree objects;
        if layer:
            if layer==LAYER_CONLL:
                if not self.is_tagged(layer):
                    self.tag_syntax_maltparser()
                return self.syntax_trees_conll
            elif layer==LAYER_VISLCG3:
                if not self.is_tagged(layer):
                    self.tag_syntax_vislcg3()
                return self.syntax_trees_vislcg3
            else:
                raise ValueError('(!) Unexpected layer name: '+str(layer))
        else:
            raise ValueError('(!) Missing layer name! ')