Converts notation in closing_notation into a lilypond string.
        :return: str
348827
def GetClosingNotationLilies(self):
        '''
        
        '''
        lstring = ""
        for notation in self.closing_notation:
            result = notation.toLily()
            if type(result) == list:
                result = "".join(result)
            lstring += result
        return lstring
227417
def inline(self) -> str:
        
        return "{0}:{1}:{2}".format(self.amount, self.base,
                                    pypeg2.compose(self.condition, output.Condition))
323545
def ast_str(self, indent=0):
        
        line = self.line or 0
        col = self.column or 0
        name = type(self).__name__
        spell = getattr(self, 'name', '[no spelling]')
        result = ' ({})'.format(self.result) if hasattr(self, 'result') else ''
        prefix = indent * '| '
        return '{}[{}:{}] {}{}: {}'.format(prefix, line, col,
                                           name, result, spell)
840941
def to_string(self):
        """"""
        suffix = '%s %s' % (self.type, self.name)
        if self.initial_value:
            suffix += ' = ' + self.initial_value
        return suffix
1096061
def dialog_turns_to_string(dialog):
    
    # join utterances
    turns_as_strings = map(singe_user_utterances_to_string, dialog)
    # join turns
    return "".join(map(lambda x: x + " " + end_of_turn_symbol + " ", turns_as_strings))
290341
def toLily(self):
        '''
        
        '''
        lilystring = ""
        if self.item is not None:
            if not isinstance(self.GetChild(0), NoteNode):
                if hasattr(self.item, "chord") and self.item.chord:
                    self.item.chord = "stop"
            if isinstance(self.GetChild(0), NoteNode):
                if not hasattr(self.item, "chord") or not self.item.chord:
                    self.item.chord = "start"
            lilystring += self.item.toLily()
        children = self.GetChildrenIndexes()
        written = False
        for child in children:
            if self.GetChild(child) is not None:
                if isinstance(self.GetChild(child), NoteNode):
                    lilystring += " "
                return_val = self.GetChild(child).toLily()
                if isinstance(return_val, str):
                    lilystring += return_val
                else:
                    lilystring = return_val[0] + lilystring + return_val[1]
                if isinstance(child, OtherNodes.ExpressionNode):
                    written = True
                    lilystring += self.item.GetClosingNotationLilies()

        if len(children) == 0 or not written:
            lilystring += self.item.GetClosingNotationLilies()
        return lilystring
710360
def toLily(self):
        '''
        
        '''
        val = "\clef "
        clef = ""
        if hasattr(self, "sign") and self.sign is not None:
            key = self.sign.upper()
            if key == "TAB":
                return "\clef moderntab"
            if hasattr(self, "line") and self.line is not None:
                key += str(self.line)
            if key in clef_type:
                clef = clef_type[key]
            else:
                val = ""
        else:
            val = ""
        if hasattr(self, "octave_change") and self.octave_change is not None:
            options = {1: "^8", 2: "^15", -1: "_8", -2: "_15"}
            if self.octave_change in options:
                clef = "\"" + clef + options[self.octave_change] + "\""
        val += clef
        return val
498228
def expr_to_str(n, l=None):
    
    op = n[0]
    if op.startswith('_') and op.endswith('_'):
        op = op.strip('_')
        if op == 'var':
            return n[1]
        elif op == 'literal':
            if isinstance(n[1], basestring):
                return "'%s'" % n[1]
            return str(n[1])
        elif op == 'cast':
            return "(%s)::%s" % (expr_to_str(n[1]), n[2])
    elif op in '+-*/':
        return "(%s) %s (%s)" % (expr_to_str(n[1]), op, expr_to_str(n[2]))
    elif op == "extract":
        return "extract( %s from %s )" % (n[1], expr_to_str(n[2]))
    else:
        arg = ','.join(map(expr_to_str, n[1:]))
        return "%s(%s)" % (op, arg)
587205
def toString(self):
        
        output = ""
        for layer in reverse(self.layers):
            output += layer.toString()
        return output
337085
def toString(self):
        
        string = ""
        if self.toLayer._verbosity > 4:
            string += "wed: from '" + self.fromLayer.name + "' to '" + self.toLayer.name +"'\n" 
            string += "            "
            for j in range(self.toLayer.size):
                string += "        " + self.toLayer.name + "[" + str(j) + "]"
            string += '\n'
            for i in range(self.fromLayer.size):
                string += self.fromLayer.name+ "["+ str(i)+ "]"+ ": "
                for j in range(self.toLayer.size):
                    string += "              " + str(self.wed[i][j])
                string += '\n'
            string += '\n'
            string += "dweight: from '" + self.fromLayer.name + "' to '" + self.toLayer.name +"'\n"
            string += "            "
            for j in range(self.toLayer.size):
                string += "        " + self.toLayer.name+ "["+ str(j)+ "]"
            string += '\n'
            for i in range(self.fromLayer.size):
                string += self.fromLayer.name+ "["+ str(i)+ "]"+ ": "
                for j in range(self.toLayer.size):
                    string +=  "              " + str(self.dweight[i][j])
                string += '\n'
            string += '\n'
        if self.toLayer._verbosity > 2:
            string += "Weights: from '" + self.fromLayer.name + "' to '" + self.toLayer.name +"'\n"
            string += "            "
            for j in range(self.toLayer.size):
                string += "        "  + self.toLayer.name+ "["+ str(j)+ "]"
            string += '\n'
            for i in range(self.fromLayer.size):
                string += self.fromLayer.name+ "["+ str(i)+ "]"+ ": "
                for j in range(self.toLayer.size):
                    string +=  "    " + str(self.weight[i][j])
                string += '\n'
            string += '\n'
        return string
1153636
def to_string(self):
        
        buff = u""
        for child in self.content.iter():
            if child.tag in [self.qn('text:p'), self.qn('text:h')]:
                buff += self.text_to_string(child) + "\n"
        # remove last newline char
        if buff:
            buff = buff[:-1]
        return buff
882056
function (notation) {
            var tokens = this.notationRe.exec(notation);

            this.rolls = tokens[1] === undefined ? this.defaultRolls : parseInt(tokens[1]); // default if omitted
            this.sides = tokens[2] === undefined ? this.defaultSides : parseInt(tokens[2]); // default if omitted

            var after = tokens[3];
            var additionTokens;

            if (after) { // we have third part of notation
                if (after === '-L') {
                    this.specials.chooseLowest = true;
                } else if (after === '-H') {
                    this.specials.chooseHighest = true;
                } else {
                    additionTokens = this.additionRe.exec(after);
                    this.specials.add = parseInt(additionTokens[2]);
                    if (additionTokens[1] === '-') {
                        this.specials.add *= -1;
                    }
                }
            }

            return this;
        }
300292
def _table_to_str(self):
        # type: () -> str
        
        _marker_line = self._marker_line()
        output = _marker_line + self._row_to_str(self.headers) + _marker_line

        for row in self._rows:
            output += self._row_to_str(row)

        output += _marker_line

        return output
1332761
def tuple_to_string(prog_tuple):
    """"""
    (roman, acc, suff) = prog_tuple
    if acc > 6:
        acc = 0 - acc % 6
    elif acc < -6:
        acc = acc % 6
    while acc < 0:
        roman = 'b' + roman
        acc += 1
    while acc > 0:
        roman = '#' + roman
        acc -= 1
    return roman + suff
741018
def to_s
      if @closing == :close
        "</#{@name}>"
      else
        s = "<#{@name}"
        @attributes.each do |k,v|
          s << " #{k}"
          s << "='#{v.gsub(/'/,"\\\\'")}'" if String === v
        end
        s << " /" if @closing == :self
        s << ">"
        @children.each { |child| s << child.to_s }
        s << "</#{@name}>" if @closing != :self && !@children.empty?
        s
      end
    end
597866
def write_string(self):
        

        map_as_str = []
        for name, id_range_set in self.__map.items():
            for id_range in id_range_set:
                map_as_str.append(
                        name + ':' +
                        str(id_range.first) + ':' +
                        str(id_range.count) + '\n'
                    )

        # Remove trailing newline
        if len(map_as_str) > 0:
            map_as_str[-1] = map_as_str[-1][:-1]

        return ''.join(map_as_str)
1080013
def toLily(self):
        '''
        
        '''

        lilystring = ""
        children = self.GetChildrenIndexes()
        total = self.note_total
        counter = 0
        for child in range(len(children)):
            note = self.GetChild(children[child])
            item = note.GetItem()
            if item is not None:
                item.autoBeam = self.autoBeam
            if hasattr(note, "duration"):
                try:
                    counter += int(note.duration)
                except:
                    if note.duration == "\\longa":
                        counter += 0.25
                    if note.duration == "\\breve":
                        counter += 0.5
            if counter > total / 2:
                if hasattr(self, "mid_barline"):
                    lilystring += self.mid_barline.toLily()
                    self.__delattr__("mid_barline")
            if hasattr(self, "rest") and hasattr(self, "total"):
                lilystring += "R" + self.total
            else:
                lilystring += note.toLily() + " "
        return lilystring