|
|
@ -59,16 +59,6 @@ class Parser: |
|
|
|
else: |
|
|
|
symbols[0] = symbols[2].add(symbols[1]) |
|
|
|
|
|
|
|
#@staticmethod |
|
|
|
#def p_song_next(symbols): |
|
|
|
# """song_next : block song_next |
|
|
|
# | empty |
|
|
|
# """ |
|
|
|
# if len(symbols) == 2: |
|
|
|
# symbols[0] = ast.Song() |
|
|
|
# else: |
|
|
|
# symbols[0] = symbols[2].add(symbols[1]) |
|
|
|
|
|
|
|
@staticmethod |
|
|
|
def p_block(symbols): |
|
|
|
"""block : SPACE block |
|
|
@ -93,12 +83,6 @@ class Parser: |
|
|
|
""" |
|
|
|
symbols[0] = None |
|
|
|
|
|
|
|
#@staticmethod |
|
|
|
#def p_newlines(symbols): |
|
|
|
# """newlines : NEWLINE newlines |
|
|
|
# | empty""" |
|
|
|
# symbols[0] = ('newlines') |
|
|
|
|
|
|
|
@staticmethod |
|
|
|
def p_directive(symbols): |
|
|
|
"""directive : LBRACE KEYWORD directive_next RBRACE |
|
|
@ -157,22 +141,6 @@ class Parser: |
|
|
|
"""chord : CHORD""" |
|
|
|
symbols[0] = ast.Chord(symbols[1]) |
|
|
|
|
|
|
|
#@staticmethod |
|
|
|
#def p_verse(symbols): |
|
|
|
# """verse : line NEWLINE verse_next |
|
|
|
# """ |
|
|
|
# symbols[0] = symbols[3].prepend(symbols[1]) |
|
|
|
|
|
|
|
#@staticmethod |
|
|
|
#def p_verse_next(symbols): |
|
|
|
# """verse_next : line NEWLINE verse_next |
|
|
|
# | empty |
|
|
|
# """ |
|
|
|
# if len(symbols) == 2: |
|
|
|
# symbols[0] = ast.Verse() |
|
|
|
# else: |
|
|
|
# symbols[0] = symbols[3].prepend(symbols[1]) |
|
|
|
|
|
|
|
@staticmethod |
|
|
|
def p_chorus(symbols): |
|
|
|
"""chorus : SOC maybespace NEWLINE chorus_content EOC maybespace |
|
|
@ -212,16 +180,6 @@ class Parser: |
|
|
|
symbols[0] = symbols[3].prepend(symbols[1]) |
|
|
|
|
|
|
|
|
|
|
|
#@staticmethod |
|
|
|
#def p_bridge_next(symbols): |
|
|
|
# """bridge_next : line NEWLINE bridge_next |
|
|
|
# | empty |
|
|
|
# """ |
|
|
|
# if len(symbols) == 2: |
|
|
|
# symbols[0] = ast.Bridge() |
|
|
|
# else: |
|
|
|
# symbols[0] = symbols[3].prepend(symbols[1]) |
|
|
|
|
|
|
|
@staticmethod |
|
|
|
def p_tab(symbols): |
|
|
|
"""tab : SOT maybespace NEWLINE tab_content EOT maybespace |
|
|
|