mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 00:43:04 +00:00
44 lines
1.0 KiB
Plaintext
44 lines
1.0 KiB
Plaintext
@top Program { Chord* }
|
|
|
|
ExplicitAction { ExplicitDelimStart (HexNumber | ActionId) ExplicitDelimEnd }
|
|
EscapedSingleAction { Escape EscapedLetter }
|
|
Action { SingleLetter | ExplicitAction | EscapedSingleAction }
|
|
|
|
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, 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 { ![\n>]+ }
|
|
SingleLetter { ![\n<] }
|
|
EscapedLetter { ![\n] }
|
|
ChordDelim { ("\n" | @eof) }
|
|
}
|
|
|
|
@detectDelim
|