feat: cv2

This commit is contained in:
2026-01-14 21:03:35 +01:00
parent 6ceb3994e7
commit a3bf7ac1d5
11 changed files with 614 additions and 420 deletions

View File

@@ -3,24 +3,41 @@
ExplicitAction { ExplicitDelimStart (HexNumber | ActionId) ExplicitDelimEnd }
EscapedSingleAction { Escape EscapedLetter }
Action { SingleLetter | ExplicitAction | EscapedSingleAction }
ActionString { Action* }
ChordInput { (ActionString CompoundDelim)* ActionString }
ActionString { Action+ }
CompoundLiteral { CompoundDelim HexNumber CompoundDelim }
CompoundInput { ActionString CompoundDelim }
ChordInput { CompoundLiteral? CompoundInput* ActionString }
ChordPhrase { ActionString }
Chord { ChordInput PhraseDelim ChordPhrase ChordDelim }
@skip {
Space
}
@tokens {
@precedence {HexNumber}
@precedence {CompoundDelim, PhraseDelim, ExplicitDelimStart, ChordDelim, SingleLetter}
@precedence {EscapedLetter}
@precedence { HexNumber, ActionId }
@precedence { Space, Escape }
@precedence { Space, SingleLetter }
@precedence { Escape, SingleLetter }
@precedence { CompoundDelim, SingleLetter }
@precedence { ActionId, Space }
@precedence { EscapedLetter, Space }
Space {" "}
ExplicitDelimStart {"<"}
ExplicitDelimEnd {">"}
CompoundDelim {"|"}
PhraseDelim {"=>"}
Escape { "\\" }
HexNumber { "0x" $[a-fA-F0-9]+ }
ActionId { $[a-zA-Z_]$[a-zA-Z0-9_]* }
SingleLetter { ![\\] }
EscapedLetter { ![] }
ChordDelim { ($[\n] | @eof) }
ActionId { ![\n>]+ }
SingleLetter { ![\n<] }
EscapedLetter { ![\n] }
ChordDelim { ("\n" | @eof) }
}
@detectDelim