Grammars (II)

grammar ABC::Grammar
{
    regex basenote { <[a..g]+[A..G]> }
    regex octave { "'"+ | ","+ }
    regex accidental { '^' | '^^' | '_' | '__' | '=' }
    regex pitch { <accidental>? <basenote> <octave>? }

    regex number { <digit>+ }
    regex note_length_denominator { '/' <bottom=number>? }
    regex note_length { <top=number>? <note_length_denominator>? }
    regex note { <pitch> <note_length> }
}

« first < prev (19 / 41) next > last »