Added more rules and tests
This commit is contained in:
@ -1,19 +1,23 @@
|
||||
|
||||
?value: root
|
||||
root: (pc | dur_change | oct_change | WS | chord | cycle | randompitch | range | list | subdivision)*
|
||||
root: (pc | dur_change | oct_mod | oct_change | WS | chord | cycle | randompitch | range | list | subdivision)*
|
||||
list: "(" root ")"
|
||||
randompitch: /[\(][-?0-9][,][-?0-9][\)]/
|
||||
range: /[-?0-9]\.\.[-?0-9]/
|
||||
randompitch: /\(-?[0-9],-?[0-9]\)/
|
||||
range: /-?[0-9]\.\.-?[0-9]/
|
||||
cycle: "<" root ">"
|
||||
pc: prefix* pitch
|
||||
pitch: /[-?0-9TE]/
|
||||
prefix: octave | duration
|
||||
oct_change: octave WS
|
||||
pitch: /-?[0-9TE]/
|
||||
prefix: (octave | duration_chars | escaped_decimal | escaped_octave)
|
||||
oct_change: escaped_octave WS
|
||||
escaped_octave: /<-?[0-9]>/
|
||||
oct_mod: octave WS
|
||||
octave: /[_^]+/
|
||||
chord: pc pc+
|
||||
dur_change: duration WS
|
||||
duration: dur+
|
||||
dur: dchar dot*
|
||||
escaped_decimal: "<" decimal ">"
|
||||
dur_change: (duration_chars | decimal) WS
|
||||
duration_chars: dotted_dur+
|
||||
dotted_dur: dchar dot*
|
||||
decimal: /-?[0-9]+\.[0-9]+/
|
||||
dchar: /[mklpdcwyhnqaefsxtgujzo]/
|
||||
dot: "."
|
||||
subitems: (pc | WS | chord | cycle | subdivision)*
|
||||
|
||||
Reference in New Issue
Block a user