100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
p[0] = new_note
def p_chord(p):
'''chord : QUOTE pitch QUOTE
| QUOTE pitch CHORD_TYPE QUOTE
'''
p[0] = Chord(value=p[2].value)
if len(p) > 3:
p[0].chord_type = p[3]
def p_accidental(p):
'''pitch : ACCIDENTAL pitch
'''
|
>
>
|
|
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
p[0] = new_note
def p_chord(p):
'''chord : QUOTE pitch QUOTE
| QUOTE pitch CHORD_TYPE QUOTE
'''
pitch = p[2].value
pitch = pitch.upper()
p[0] = Chord(value=pitch)
if len(p) > 3:
p[0].chord_type = p[3]
def p_accidental(p):
'''pitch : ACCIDENTAL pitch
'''
|