1
0
Fork 0

key combo macros

This commit is contained in:
Kevin Matz 2020-11-25 09:39:42 -05:00
parent 5bf36be3be
commit 5c7a2c937a
7 changed files with 630 additions and 227 deletions

View File

@ -70,9 +70,11 @@ Benefiting from the LL(*) parser provided by ANTLR, `multiple targets` and
`ranges` may be combined ad infinitum. This is a known deviation from the
Comment Macro syntax.
### Standard Macros
| Macro | Function | Supported | Notes |
|-------|----------|-----------|-------|
| GM | Go Master | Yes | no GOTO |
| GM | Go Master | Yes | GOTO on current master only |
| HM | Halt Master | Yes | |
| AM | Assert Master | Partial | on current master only |
| RM | Release Master | Partial | on current master only |
@ -105,6 +107,18 @@ Comment Macro syntax.
| HK | Pause Keystroke Macro | Yes | |
| RK | Stop Keystroke Macro | Yes | . |
### Additional Macros
BaconScript also supports several macros that aren't present on Hog4, but become possible/desirable when wrapping OSC.
| Macro | Function | Notes |
|-------|----------|-------|
| INT | Select an Intensity Pallet | keypress macro |
| POS | Select a Position Pallet | keypress macro |
| COLR | Select a Colour Pallet | keypress macro |
| BEAM | Select a Beam Pallet | keypress macro |
| WAIT | Pause for n seconds | |
| PASS | Null instruction | |
## Future Work
Pleas feel welcome to submit pull requests or patches that enable support for:

View File

@ -91,6 +91,17 @@ class OscCommentMacroListener(CommentMacroListener):
logging.info("GO on master %s", master)
self.osc.button_press(ctx.device(), "/hog/hardware/go/" + master)
def exitMasterGoto(self, ctx: CommentMacroParser.MasterGotoContext):
"""On exiting a GOTO macro."""
if ctx.target() is not None:
logging.error("ERROR: limited to GOTO on current master only.")
return
logging.info("GOTO on current master.")
cue = str(ctx.number().value)
self.osc.button_press(ctx.device(), self.osc.buttonMap["goto"])
self.osc.number_entry(ctx.device(), cue)
self.osc.button_press(ctx.device(), self.osc.buttonMap["enter"])
def exitMasterHalt(self, ctx: CommentMacroParser.MasterHaltContext):
"""On exiting a Master Halt macro."""
if ctx.target() is None:
@ -246,3 +257,49 @@ class OscCommentMacroListener(CommentMacroListener):
"""On exiting a Previous Page macro."""
logging.info("Prev Page")
self.osc.button_press(ctx.device(), "/hog/hardware/backpage")
def exitSelectIntensity(self,
ctx: CommentMacroParser.SelectIntensityContext):
"""On exiting a Select Intensity macro."""
if ctx.number().value < 0:
logging.error("Pallet must be greater than 0.")
return
pallet = str(ctx.number().value)
logging.info("Selecting intensity pallet %s", pallet)
self.osc.button_press(ctx.device(), self.osc.buttonMap["intensity"])
self.osc.number_entry(ctx.device(), pallet)
self.osc.button_press(ctx.device(), self.osc.buttonMap["enter"])
def exitSelectPosition(self,
ctx: CommentMacroParser.SelectPositionContext):
"""On exiting a Select Intensity macro."""
if ctx.number().value < 0:
logging.error("Pallet must be greater than 0.")
return
pallet = str(ctx.number().value)
logging.info("Selecting position pallet %s", pallet)
self.osc.button_press(ctx.device(), self.osc.buttonMap["position"])
self.osc.number_entry(ctx.device(), pallet)
self.osc.button_press(ctx.device(), self.osc.buttonMap["enter"])
def exitSelectColour(self, ctx: CommentMacroParser.SelectColourContext):
"""On exiting a Select Intensity macro."""
if ctx.number().value < 0:
logging.error("Pallet must be greater than 0.")
return
pallet = str(ctx.number().value)
logging.info("Selecting colour pallet %s", pallet)
self.osc.button_press(ctx.device(), self.osc.buttonMap["colour"])
self.osc.number_entry(ctx.device(), pallet)
self.osc.button_press(ctx.device(), self.osc.buttonMap["enter"])
def exitSelectBeam(self, ctx: CommentMacroParser.SelectBeamContext):
"""On exiting a Select Intensity macro."""
if ctx.number().value < 0:
logging.error("Pallet must be greater than 0.")
return
pallet = str(ctx.number().value)
logging.info("Selecting beam pallet %s", pallet)
self.osc.button_press(ctx.device(), self.osc.buttonMap["beam"])
self.osc.number_entry(ctx.device(), pallet)
self.osc.button_press(ctx.device(), self.osc.buttonMap["enter"])

View File

@ -71,7 +71,12 @@ macro
| 'GK' target device? #MacroGo
| 'HK' target device? #MacroHalt
| 'RK' target device? #MacroStop
| 'INT' number device? #SelectIntensity
| 'POS' number device? #SelectPosition
| 'COLR' number device? #SelectColour
| 'BEAM' number device? #SelectBeam
| 'WAIT' number #Wait
| 'PASS' #Pass
;
time : TIME number ;

View File

@ -8,106 +8,121 @@ import sys
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2-")
buf.write("\u00f9\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7")
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\62")
buf.write("\u011a\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7")
buf.write("\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r")
buf.write("\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23")
buf.write("\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30")
buf.write("\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36")
buf.write("\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%")
buf.write("\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\3\2")
buf.write("\3\2\3\3\3\3\3\3\3\4\3\4\3\5\3\5\3\5\3\6\3\6\3\6\3\7\3")
buf.write("\7\3\7\3\b\3\b\3\b\3\t\3\t\3\t\3\n\3\n\3\n\3\13\3\13\3")
buf.write("\13\3\13\3\f\3\f\3\f\3\r\3\r\3\r\3\16\3\16\3\16\3\17\3")
buf.write("\17\3\17\3\20\3\20\3\20\3\21\3\21\3\21\3\22\3\22\3\22")
buf.write("\3\23\3\23\3\23\3\24\3\24\3\24\3\25\3\25\3\25\3\26\3\26")
buf.write("\3\26\3\27\3\27\3\27\3\30\3\30\3\30\3\31\3\31\3\31\3\32")
buf.write("\3\32\3\33\3\33\3\34\3\34\3\34\3\35\3\35\3\35\3\36\3\36")
buf.write("\3\36\3\37\3\37\3\37\3 \3 \3 \3!\3!\3!\3!\3!\3\"\3\"\3")
buf.write("#\3#\3$\6$\u00c0\n$\r$\16$\u00c1\3$\3$\6$\u00c6\n$\r$")
buf.write("\16$\u00c7\5$\u00ca\n$\3%\3%\3&\3&\3\'\3\'\3(\3(\3)\3")
buf.write(")\3*\3*\3*\3*\3+\5+\u00db\n+\3+\3+\3,\6,\u00e0\n,\r,\16")
buf.write(",\u00e1\3,\3,\3-\3-\3-\3-\7-\u00ea\n-\f-\16-\u00ed\13")
buf.write("-\3-\3-\7-\u00f1\n-\f-\16-\u00f4\13-\5-\u00f6\n-\3-\3")
buf.write("-\2\2.\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27")
buf.write("\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30")
buf.write("/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E\2G$I%K")
buf.write("&M\'O(Q)S*U+W,Y-\3\2\7\3\2\62;\4\2JJjj\4\2FFff\4\2\13")
buf.write("\13\"\"\4\2\f\f\17\17\2\u00ff\2\3\3\2\2\2\2\5\3\2\2\2")
buf.write("\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17")
buf.write("\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3")
buf.write("\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2")
buf.write("\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3")
buf.write("\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2")
buf.write("\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3")
buf.write("\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2G")
buf.write("\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2")
buf.write("Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2")
buf.write("\3[\3\2\2\2\5]\3\2\2\2\7`\3\2\2\2\tb\3\2\2\2\13e\3\2\2")
buf.write("\2\rh\3\2\2\2\17k\3\2\2\2\21n\3\2\2\2\23q\3\2\2\2\25t")
buf.write("\3\2\2\2\27x\3\2\2\2\31{\3\2\2\2\33~\3\2\2\2\35\u0081")
buf.write("\3\2\2\2\37\u0084\3\2\2\2!\u0087\3\2\2\2#\u008a\3\2\2")
buf.write("\2%\u008d\3\2\2\2\'\u0090\3\2\2\2)\u0093\3\2\2\2+\u0096")
buf.write("\3\2\2\2-\u0099\3\2\2\2/\u009c\3\2\2\2\61\u009f\3\2\2")
buf.write("\2\63\u00a2\3\2\2\2\65\u00a4\3\2\2\2\67\u00a6\3\2\2\2")
buf.write("9\u00a9\3\2\2\2;\u00ac\3\2\2\2=\u00af\3\2\2\2?\u00b2\3")
buf.write("\2\2\2A\u00b5\3\2\2\2C\u00ba\3\2\2\2E\u00bc\3\2\2\2G\u00bf")
buf.write("\3\2\2\2I\u00cb\3\2\2\2K\u00cd\3\2\2\2M\u00cf\3\2\2\2")
buf.write("O\u00d1\3\2\2\2Q\u00d3\3\2\2\2S\u00d5\3\2\2\2U\u00da\3")
buf.write("\2\2\2W\u00df\3\2\2\2Y\u00f5\3\2\2\2[\\\7<\2\2\\\4\3\2")
buf.write("\2\2]^\7I\2\2^_\7O\2\2_\6\3\2\2\2`a\7\61\2\2a\b\3\2\2")
buf.write("\2bc\7J\2\2cd\7O\2\2d\n\3\2\2\2ef\7C\2\2fg\7O\2\2g\f\3")
buf.write("\2\2\2hi\7T\2\2ij\7O\2\2j\16\3\2\2\2kl\7T\2\2lm\7C\2\2")
buf.write("m\20\3\2\2\2no\7T\2\2op\7Q\2\2p\22\3\2\2\2qr\7H\2\2rs")
buf.write("\7O\2\2s\24\3\2\2\2tu\7H\2\2uv\7I\2\2vw\7O\2\2w\26\3\2")
buf.write("\2\2xy\7E\2\2yz\7O\2\2z\30\3\2\2\2{|\7I\2\2|}\7N\2\2}")
buf.write("\32\3\2\2\2~\177\7J\2\2\177\u0080\7N\2\2\u0080\34\3\2")
buf.write("\2\2\u0081\u0082\7C\2\2\u0082\u0083\7N\2\2\u0083\36\3")
buf.write("\2\2\2\u0084\u0085\7T\2\2\u0085\u0086\7N\2\2\u0086 \3")
buf.write("\2\2\2\u0087\u0088\7I\2\2\u0088\u0089\7D\2\2\u0089\"\3")
buf.write("\2\2\2\u008a\u008b\7J\2\2\u008b\u008c\7D\2\2\u008c$\3")
buf.write("\2\2\2\u008d\u008e\7C\2\2\u008e\u008f\7D\2\2\u008f&\3")
buf.write("\2\2\2\u0090\u0091\7T\2\2\u0091\u0092\7D\2\2\u0092(\3")
buf.write("\2\2\2\u0093\u0094\7I\2\2\u0094\u0095\7U\2\2\u0095*\3")
buf.write("\2\2\2\u0096\u0097\7J\2\2\u0097\u0098\7U\2\2\u0098,\3")
buf.write("\2\2\2\u0099\u009a\7C\2\2\u009a\u009b\7U\2\2\u009b.\3")
buf.write("\2\2\2\u009c\u009d\7T\2\2\u009d\u009e\7U\2\2\u009e\60")
buf.write("\3\2\2\2\u009f\u00a0\7E\2\2\u00a0\u00a1\7R\2\2\u00a1\62")
buf.write("\3\2\2\2\u00a2\u00a3\7-\2\2\u00a3\64\3\2\2\2\u00a4\u00a5")
buf.write("\7/\2\2\u00a5\66\3\2\2\2\u00a6\u00a7\7T\2\2\u00a7\u00a8")
buf.write("\7X\2\2\u00a88\3\2\2\2\u00a9\u00aa\7T\2\2\u00aa\u00ab")
buf.write("\7P\2\2\u00ab:\3\2\2\2\u00ac\u00ad\7I\2\2\u00ad\u00ae")
buf.write("\7M\2\2\u00ae<\3\2\2\2\u00af\u00b0\7J\2\2\u00b0\u00b1")
buf.write("\7M\2\2\u00b1>\3\2\2\2\u00b2\u00b3\7T\2\2\u00b3\u00b4")
buf.write("\7M\2\2\u00b4@\3\2\2\2\u00b5\u00b6\7Y\2\2\u00b6\u00b7")
buf.write("\7C\2\2\u00b7\u00b8\7K\2\2\u00b8\u00b9\7V\2\2\u00b9B\3")
buf.write("\2\2\2\u00ba\u00bb\7.\2\2\u00bbD\3\2\2\2\u00bc\u00bd\t")
buf.write("\2\2\2\u00bdF\3\2\2\2\u00be\u00c0\5E#\2\u00bf\u00be\3")
buf.write("\2\2\2\u00c0\u00c1\3\2\2\2\u00c1\u00bf\3\2\2\2\u00c1\u00c2")
buf.write("\3\2\2\2\u00c2\u00c9\3\2\2\2\u00c3\u00c5\7\60\2\2\u00c4")
buf.write("\u00c6\5E#\2\u00c5\u00c4\3\2\2\2\u00c6\u00c7\3\2\2\2\u00c7")
buf.write("\u00c5\3\2\2\2\u00c7\u00c8\3\2\2\2\u00c8\u00ca\3\2\2\2")
buf.write("\u00c9\u00c3\3\2\2\2\u00c9\u00ca\3\2\2\2\u00caH\3\2\2")
buf.write("\2\u00cb\u00cc\7@\2\2\u00ccJ\3\2\2\2\u00cd\u00ce\7,\2")
buf.write("\2\u00ceL\3\2\2\2\u00cf\u00d0\7v\2\2\u00d0N\3\2\2\2\u00d1")
buf.write("\u00d2\t\3\2\2\u00d2P\3\2\2\2\u00d3\u00d4\t\4\2\2\u00d4")
buf.write("R\3\2\2\2\u00d5\u00d6\7K\2\2\u00d6\u00d7\7Q\2\2\u00d7")
buf.write("\u00d8\7R\2\2\u00d8T\3\2\2\2\u00d9\u00db\7\17\2\2\u00da")
buf.write("\u00d9\3\2\2\2\u00da\u00db\3\2\2\2\u00db\u00dc\3\2\2\2")
buf.write("\u00dc\u00dd\7\f\2\2\u00ddV\3\2\2\2\u00de\u00e0\t\5\2")
buf.write("\2\u00df\u00de\3\2\2\2\u00e0\u00e1\3\2\2\2\u00e1\u00df")
buf.write("\3\2\2\2\u00e1\u00e2\3\2\2\2\u00e2\u00e3\3\2\2\2\u00e3")
buf.write("\u00e4\b,\2\2\u00e4X\3\2\2\2\u00e5\u00e6\7\61\2\2\u00e6")
buf.write("\u00e7\7\61\2\2\u00e7\u00eb\3\2\2\2\u00e8\u00ea\n\6\2")
buf.write("\2\u00e9\u00e8\3\2\2\2\u00ea\u00ed\3\2\2\2\u00eb\u00e9")
buf.write("\3\2\2\2\u00eb\u00ec\3\2\2\2\u00ec\u00f6\3\2\2\2\u00ed")
buf.write("\u00eb\3\2\2\2\u00ee\u00f2\7%\2\2\u00ef\u00f1\n\6\2\2")
buf.write("\u00f0\u00ef\3\2\2\2\u00f1\u00f4\3\2\2\2\u00f2\u00f0\3")
buf.write("\2\2\2\u00f2\u00f3\3\2\2\2\u00f3\u00f6\3\2\2\2\u00f4\u00f2")
buf.write("\3\2\2\2\u00f5\u00e5\3\2\2\2\u00f5\u00ee\3\2\2\2\u00f6")
buf.write("\u00f7\3\2\2\2\u00f7\u00f8\b-\2\2\u00f8Z\3\2\2\2\13\2")
buf.write("\u00c1\u00c7\u00c9\u00da\u00e1\u00eb\u00f2\u00f5\3\b\2")
buf.write("\2")
buf.write("\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.")
buf.write("\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\3\2\3\2\3\3\3")
buf.write("\3\3\3\3\4\3\4\3\5\3\5\3\5\3\6\3\6\3\6\3\7\3\7\3\7\3\b")
buf.write("\3\b\3\b\3\t\3\t\3\t\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3")
buf.write("\f\3\f\3\f\3\r\3\r\3\r\3\16\3\16\3\16\3\17\3\17\3\17\3")
buf.write("\20\3\20\3\20\3\21\3\21\3\21\3\22\3\22\3\22\3\23\3\23")
buf.write("\3\23\3\24\3\24\3\24\3\25\3\25\3\25\3\26\3\26\3\26\3\27")
buf.write("\3\27\3\27\3\30\3\30\3\30\3\31\3\31\3\31\3\32\3\32\3\33")
buf.write("\3\33\3\34\3\34\3\34\3\35\3\35\3\35\3\36\3\36\3\36\3\37")
buf.write("\3\37\3\37\3 \3 \3 \3!\3!\3!\3!\3\"\3\"\3\"\3\"\3#\3#")
buf.write("\3#\3#\3#\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3&\3&\3&\3&\3")
buf.write("&\3\'\3\'\3(\3(\3)\6)\u00e1\n)\r)\16)\u00e2\3)\3)\6)\u00e7")
buf.write("\n)\r)\16)\u00e8\5)\u00eb\n)\3*\3*\3+\3+\3,\3,\3-\3-\3")
buf.write(".\3.\3/\3/\3/\3/\3\60\5\60\u00fc\n\60\3\60\3\60\3\61\6")
buf.write("\61\u0101\n\61\r\61\16\61\u0102\3\61\3\61\3\62\3\62\3")
buf.write("\62\3\62\7\62\u010b\n\62\f\62\16\62\u010e\13\62\3\62\3")
buf.write("\62\7\62\u0112\n\62\f\62\16\62\u0115\13\62\5\62\u0117")
buf.write("\n\62\3\62\3\62\2\2\63\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21")
buf.write("\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24")
buf.write("\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37")
buf.write("= ?!A\"C#E$G%I&K\'M(O\2Q)S*U+W,Y-[.]/_\60a\61c\62\3\2")
buf.write("\7\3\2\62;\4\2JJjj\4\2FFff\4\2\13\13\"\"\4\2\f\f\17\17")
buf.write("\2\u0120\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2")
buf.write("\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2")
buf.write("\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2")
buf.write("\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3")
buf.write("\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2")
buf.write("-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3")
buf.write("\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2")
buf.write("?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2")
buf.write("\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2Q\3\2\2\2\2S\3\2\2")
buf.write("\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2")
buf.write("\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\3e\3\2\2\2\5g\3")
buf.write("\2\2\2\7j\3\2\2\2\tl\3\2\2\2\13o\3\2\2\2\rr\3\2\2\2\17")
buf.write("u\3\2\2\2\21x\3\2\2\2\23{\3\2\2\2\25~\3\2\2\2\27\u0082")
buf.write("\3\2\2\2\31\u0085\3\2\2\2\33\u0088\3\2\2\2\35\u008b\3")
buf.write("\2\2\2\37\u008e\3\2\2\2!\u0091\3\2\2\2#\u0094\3\2\2\2")
buf.write("%\u0097\3\2\2\2\'\u009a\3\2\2\2)\u009d\3\2\2\2+\u00a0")
buf.write("\3\2\2\2-\u00a3\3\2\2\2/\u00a6\3\2\2\2\61\u00a9\3\2\2")
buf.write("\2\63\u00ac\3\2\2\2\65\u00ae\3\2\2\2\67\u00b0\3\2\2\2")
buf.write("9\u00b3\3\2\2\2;\u00b6\3\2\2\2=\u00b9\3\2\2\2?\u00bc\3")
buf.write("\2\2\2A\u00bf\3\2\2\2C\u00c3\3\2\2\2E\u00c7\3\2\2\2G\u00cc")
buf.write("\3\2\2\2I\u00d1\3\2\2\2K\u00d6\3\2\2\2M\u00db\3\2\2\2")
buf.write("O\u00dd\3\2\2\2Q\u00e0\3\2\2\2S\u00ec\3\2\2\2U\u00ee\3")
buf.write("\2\2\2W\u00f0\3\2\2\2Y\u00f2\3\2\2\2[\u00f4\3\2\2\2]\u00f6")
buf.write("\3\2\2\2_\u00fb\3\2\2\2a\u0100\3\2\2\2c\u0116\3\2\2\2")
buf.write("ef\7<\2\2f\4\3\2\2\2gh\7I\2\2hi\7O\2\2i\6\3\2\2\2jk\7")
buf.write("\61\2\2k\b\3\2\2\2lm\7J\2\2mn\7O\2\2n\n\3\2\2\2op\7C\2")
buf.write("\2pq\7O\2\2q\f\3\2\2\2rs\7T\2\2st\7O\2\2t\16\3\2\2\2u")
buf.write("v\7T\2\2vw\7C\2\2w\20\3\2\2\2xy\7T\2\2yz\7Q\2\2z\22\3")
buf.write("\2\2\2{|\7H\2\2|}\7O\2\2}\24\3\2\2\2~\177\7H\2\2\177\u0080")
buf.write("\7I\2\2\u0080\u0081\7O\2\2\u0081\26\3\2\2\2\u0082\u0083")
buf.write("\7E\2\2\u0083\u0084\7O\2\2\u0084\30\3\2\2\2\u0085\u0086")
buf.write("\7I\2\2\u0086\u0087\7N\2\2\u0087\32\3\2\2\2\u0088\u0089")
buf.write("\7J\2\2\u0089\u008a\7N\2\2\u008a\34\3\2\2\2\u008b\u008c")
buf.write("\7C\2\2\u008c\u008d\7N\2\2\u008d\36\3\2\2\2\u008e\u008f")
buf.write("\7T\2\2\u008f\u0090\7N\2\2\u0090 \3\2\2\2\u0091\u0092")
buf.write("\7I\2\2\u0092\u0093\7D\2\2\u0093\"\3\2\2\2\u0094\u0095")
buf.write("\7J\2\2\u0095\u0096\7D\2\2\u0096$\3\2\2\2\u0097\u0098")
buf.write("\7C\2\2\u0098\u0099\7D\2\2\u0099&\3\2\2\2\u009a\u009b")
buf.write("\7T\2\2\u009b\u009c\7D\2\2\u009c(\3\2\2\2\u009d\u009e")
buf.write("\7I\2\2\u009e\u009f\7U\2\2\u009f*\3\2\2\2\u00a0\u00a1")
buf.write("\7J\2\2\u00a1\u00a2\7U\2\2\u00a2,\3\2\2\2\u00a3\u00a4")
buf.write("\7C\2\2\u00a4\u00a5\7U\2\2\u00a5.\3\2\2\2\u00a6\u00a7")
buf.write("\7T\2\2\u00a7\u00a8\7U\2\2\u00a8\60\3\2\2\2\u00a9\u00aa")
buf.write("\7E\2\2\u00aa\u00ab\7R\2\2\u00ab\62\3\2\2\2\u00ac\u00ad")
buf.write("\7-\2\2\u00ad\64\3\2\2\2\u00ae\u00af\7/\2\2\u00af\66\3")
buf.write("\2\2\2\u00b0\u00b1\7T\2\2\u00b1\u00b2\7X\2\2\u00b28\3")
buf.write("\2\2\2\u00b3\u00b4\7T\2\2\u00b4\u00b5\7P\2\2\u00b5:\3")
buf.write("\2\2\2\u00b6\u00b7\7I\2\2\u00b7\u00b8\7M\2\2\u00b8<\3")
buf.write("\2\2\2\u00b9\u00ba\7J\2\2\u00ba\u00bb\7M\2\2\u00bb>\3")
buf.write("\2\2\2\u00bc\u00bd\7T\2\2\u00bd\u00be\7M\2\2\u00be@\3")
buf.write("\2\2\2\u00bf\u00c0\7K\2\2\u00c0\u00c1\7P\2\2\u00c1\u00c2")
buf.write("\7V\2\2\u00c2B\3\2\2\2\u00c3\u00c4\7R\2\2\u00c4\u00c5")
buf.write("\7Q\2\2\u00c5\u00c6\7U\2\2\u00c6D\3\2\2\2\u00c7\u00c8")
buf.write("\7E\2\2\u00c8\u00c9\7Q\2\2\u00c9\u00ca\7N\2\2\u00ca\u00cb")
buf.write("\7T\2\2\u00cbF\3\2\2\2\u00cc\u00cd\7D\2\2\u00cd\u00ce")
buf.write("\7G\2\2\u00ce\u00cf\7C\2\2\u00cf\u00d0\7O\2\2\u00d0H\3")
buf.write("\2\2\2\u00d1\u00d2\7Y\2\2\u00d2\u00d3\7C\2\2\u00d3\u00d4")
buf.write("\7K\2\2\u00d4\u00d5\7V\2\2\u00d5J\3\2\2\2\u00d6\u00d7")
buf.write("\7R\2\2\u00d7\u00d8\7C\2\2\u00d8\u00d9\7U\2\2\u00d9\u00da")
buf.write("\7U\2\2\u00daL\3\2\2\2\u00db\u00dc\7.\2\2\u00dcN\3\2\2")
buf.write("\2\u00dd\u00de\t\2\2\2\u00deP\3\2\2\2\u00df\u00e1\5O(")
buf.write("\2\u00e0\u00df\3\2\2\2\u00e1\u00e2\3\2\2\2\u00e2\u00e0")
buf.write("\3\2\2\2\u00e2\u00e3\3\2\2\2\u00e3\u00ea\3\2\2\2\u00e4")
buf.write("\u00e6\7\60\2\2\u00e5\u00e7\5O(\2\u00e6\u00e5\3\2\2\2")
buf.write("\u00e7\u00e8\3\2\2\2\u00e8\u00e6\3\2\2\2\u00e8\u00e9\3")
buf.write("\2\2\2\u00e9\u00eb\3\2\2\2\u00ea\u00e4\3\2\2\2\u00ea\u00eb")
buf.write("\3\2\2\2\u00ebR\3\2\2\2\u00ec\u00ed\7@\2\2\u00edT\3\2")
buf.write("\2\2\u00ee\u00ef\7,\2\2\u00efV\3\2\2\2\u00f0\u00f1\7v")
buf.write("\2\2\u00f1X\3\2\2\2\u00f2\u00f3\t\3\2\2\u00f3Z\3\2\2\2")
buf.write("\u00f4\u00f5\t\4\2\2\u00f5\\\3\2\2\2\u00f6\u00f7\7K\2")
buf.write("\2\u00f7\u00f8\7Q\2\2\u00f8\u00f9\7R\2\2\u00f9^\3\2\2")
buf.write("\2\u00fa\u00fc\7\17\2\2\u00fb\u00fa\3\2\2\2\u00fb\u00fc")
buf.write("\3\2\2\2\u00fc\u00fd\3\2\2\2\u00fd\u00fe\7\f\2\2\u00fe")
buf.write("`\3\2\2\2\u00ff\u0101\t\5\2\2\u0100\u00ff\3\2\2\2\u0101")
buf.write("\u0102\3\2\2\2\u0102\u0100\3\2\2\2\u0102\u0103\3\2\2\2")
buf.write("\u0103\u0104\3\2\2\2\u0104\u0105\b\61\2\2\u0105b\3\2\2")
buf.write("\2\u0106\u0107\7\61\2\2\u0107\u0108\7\61\2\2\u0108\u010c")
buf.write("\3\2\2\2\u0109\u010b\n\6\2\2\u010a\u0109\3\2\2\2\u010b")
buf.write("\u010e\3\2\2\2\u010c\u010a\3\2\2\2\u010c\u010d\3\2\2\2")
buf.write("\u010d\u0117\3\2\2\2\u010e\u010c\3\2\2\2\u010f\u0113\7")
buf.write("%\2\2\u0110\u0112\n\6\2\2\u0111\u0110\3\2\2\2\u0112\u0115")
buf.write("\3\2\2\2\u0113\u0111\3\2\2\2\u0113\u0114\3\2\2\2\u0114")
buf.write("\u0117\3\2\2\2\u0115\u0113\3\2\2\2\u0116\u0106\3\2\2\2")
buf.write("\u0116\u010f\3\2\2\2\u0117\u0118\3\2\2\2\u0118\u0119\b")
buf.write("\62\2\2\u0119d\3\2\2\2\13\2\u00e2\u00e8\u00ea\u00fb\u0102")
buf.write("\u010c\u0113\u0116\3\b\2\2")
return buf.getvalue()
@ -150,16 +165,21 @@ class CommentMacroLexer(Lexer):
T__30 = 31
T__31 = 32
T__32 = 33
NUMBER = 34
THRU = 35
CURRENT = 36
TIME = 37
WHOLEHOG = 38
DP8K = 39
IOP = 40
NEWLINE = 41
WS = 42
COMMENT = 43
T__33 = 34
T__34 = 35
T__35 = 36
T__36 = 37
T__37 = 38
NUMBER = 39
THRU = 40
CURRENT = 41
TIME = 42
WHOLEHOG = 43
DP8K = 44
IOP = 45
NEWLINE = 46
WS = 47
COMMENT = 48
channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]
@ -169,8 +189,9 @@ class CommentMacroLexer(Lexer):
"':'", "'GM'", "'/'", "'HM'", "'AM'", "'RM'", "'RA'", "'RO'",
"'FM'", "'FGM'", "'CM'", "'GL'", "'HL'", "'AL'", "'RL'", "'GB'",
"'HB'", "'AB'", "'RB'", "'GS'", "'HS'", "'AS'", "'RS'", "'CP'",
"'+'", "'-'", "'RV'", "'RN'", "'GK'", "'HK'", "'RK'", "'WAIT'",
"','", "'>'", "'*'", "'t'", "'IOP'" ]
"'+'", "'-'", "'RV'", "'RN'", "'GK'", "'HK'", "'RK'", "'INT'",
"'POS'", "'COLR'", "'BEAM'", "'WAIT'", "'PASS'", "','", "'>'",
"'*'", "'t'", "'IOP'" ]
symbolicNames = [ "<INVALID>",
"NUMBER", "THRU", "CURRENT", "TIME", "WHOLEHOG", "DP8K", "IOP",
@ -181,8 +202,9 @@ class CommentMacroLexer(Lexer):
"T__14", "T__15", "T__16", "T__17", "T__18", "T__19",
"T__20", "T__21", "T__22", "T__23", "T__24", "T__25",
"T__26", "T__27", "T__28", "T__29", "T__30", "T__31",
"T__32", "DIGIT", "NUMBER", "THRU", "CURRENT", "TIME",
"WHOLEHOG", "DP8K", "IOP", "NEWLINE", "WS", "COMMENT" ]
"T__32", "T__33", "T__34", "T__35", "T__36", "T__37",
"DIGIT", "NUMBER", "THRU", "CURRENT", "TIME", "WHOLEHOG",
"DP8K", "IOP", "NEWLINE", "WS", "COMMENT" ]
grammarFileName = "CommentMacro.g4"

View File

@ -305,6 +305,42 @@ class CommentMacroListener(ParseTreeListener):
pass
# Enter a parse tree produced by CommentMacroParser#SelectIntensity.
def enterSelectIntensity(self, ctx:CommentMacroParser.SelectIntensityContext):
pass
# Exit a parse tree produced by CommentMacroParser#SelectIntensity.
def exitSelectIntensity(self, ctx:CommentMacroParser.SelectIntensityContext):
pass
# Enter a parse tree produced by CommentMacroParser#SelectPosition.
def enterSelectPosition(self, ctx:CommentMacroParser.SelectPositionContext):
pass
# Exit a parse tree produced by CommentMacroParser#SelectPosition.
def exitSelectPosition(self, ctx:CommentMacroParser.SelectPositionContext):
pass
# Enter a parse tree produced by CommentMacroParser#SelectColour.
def enterSelectColour(self, ctx:CommentMacroParser.SelectColourContext):
pass
# Exit a parse tree produced by CommentMacroParser#SelectColour.
def exitSelectColour(self, ctx:CommentMacroParser.SelectColourContext):
pass
# Enter a parse tree produced by CommentMacroParser#SelectBeam.
def enterSelectBeam(self, ctx:CommentMacroParser.SelectBeamContext):
pass
# Exit a parse tree produced by CommentMacroParser#SelectBeam.
def exitSelectBeam(self, ctx:CommentMacroParser.SelectBeamContext):
pass
# Enter a parse tree produced by CommentMacroParser#Wait.
def enterWait(self, ctx:CommentMacroParser.WaitContext):
pass
@ -314,6 +350,15 @@ class CommentMacroListener(ParseTreeListener):
pass
# Enter a parse tree produced by CommentMacroParser#Pass.
def enterPass(self, ctx:CommentMacroParser.PassContext):
pass
# Exit a parse tree produced by CommentMacroParser#Pass.
def exitPass(self, ctx:CommentMacroParser.PassContext):
pass
# Enter a parse tree produced by CommentMacroParser#time.
def enterTime(self, ctx:CommentMacroParser.TimeContext):
pass

View File

@ -11,8 +11,8 @@ else:
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3-")
buf.write("\u00fc\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\62")
buf.write("\u0111\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\3\2\7\2\26\n\2\f\2\16\2\31\13")
buf.write("\2\3\2\3\2\3\3\3\3\3\3\7\3 \n\3\f\3\16\3#\13\3\3\3\5\3")
buf.write("&\n\3\3\3\5\3)\n\3\3\4\3\4\3\4\5\4.\n\4\3\4\5\4\61\n\4")
@ -31,107 +31,120 @@ def serializedATN():
buf.write("\u00bd\n\4\3\4\3\4\3\4\5\4\u00c2\n\4\3\4\3\4\3\4\5\4\u00c7")
buf.write("\n\4\3\4\3\4\3\4\5\4\u00cc\n\4\3\4\3\4\3\4\3\4\3\4\5\4")
buf.write("\u00d3\n\4\3\4\3\4\3\4\5\4\u00d8\n\4\3\4\3\4\3\4\5\4\u00dd")
buf.write("\n\4\3\4\3\4\5\4\u00e1\n\4\3\5\3\5\3\5\3\6\3\6\3\6\3\7")
buf.write("\3\7\3\b\3\b\5\b\u00ed\n\b\3\b\3\b\7\b\u00f1\n\b\f\b\16")
buf.write("\b\u00f4\13\b\3\t\3\t\3\t\3\t\3\n\3\n\3\n\2\2\13\2\4\6")
buf.write("\b\n\f\16\20\22\2\3\3\2(*\2\u013d\2\27\3\2\2\2\4(\3\2")
buf.write("\2\2\6\u00e0\3\2\2\2\b\u00e2\3\2\2\2\n\u00e5\3\2\2\2\f")
buf.write("\u00e8\3\2\2\2\16\u00ec\3\2\2\2\20\u00f5\3\2\2\2\22\u00f9")
buf.write("\n\4\3\4\3\4\3\4\5\4\u00e2\n\4\3\4\3\4\3\4\5\4\u00e7\n")
buf.write("\4\3\4\3\4\3\4\5\4\u00ec\n\4\3\4\3\4\3\4\5\4\u00f1\n\4")
buf.write("\3\4\3\4\3\4\5\4\u00f6\n\4\3\5\3\5\3\5\3\6\3\6\3\6\3\7")
buf.write("\3\7\3\b\3\b\5\b\u0102\n\b\3\b\3\b\7\b\u0106\n\b\f\b\16")
buf.write("\b\u0109\13\b\3\t\3\t\3\t\3\t\3\n\3\n\3\n\2\2\13\2\4\6")
buf.write("\b\n\f\16\20\22\2\3\3\2-/\2\u015b\2\27\3\2\2\2\4(\3\2")
buf.write("\2\2\6\u00f5\3\2\2\2\b\u00f7\3\2\2\2\n\u00fa\3\2\2\2\f")
buf.write("\u00fd\3\2\2\2\16\u0101\3\2\2\2\20\u010a\3\2\2\2\22\u010e")
buf.write("\3\2\2\2\24\26\5\4\3\2\25\24\3\2\2\2\26\31\3\2\2\2\27")
buf.write("\25\3\2\2\2\27\30\3\2\2\2\30\32\3\2\2\2\31\27\3\2\2\2")
buf.write("\32\33\7\2\2\3\33\3\3\2\2\2\34!\5\6\4\2\35\36\7\3\2\2")
buf.write("\36 \5\6\4\2\37\35\3\2\2\2 #\3\2\2\2!\37\3\2\2\2!\"\3")
buf.write("\2\2\2\"%\3\2\2\2#!\3\2\2\2$&\7+\2\2%$\3\2\2\2%&\3\2\2")
buf.write("\2&)\3\2\2\2\')\7+\2\2(\34\3\2\2\2(\'\3\2\2\2)\5\3\2\2")
buf.write("\2*-\7\4\2\2+.\5\16\b\2,.\7&\2\2-+\3\2\2\2-,\3\2\2\2.")
buf.write("\60\3\2\2\2/\61\5\n\6\2\60/\3\2\2\2\60\61\3\2\2\2\61\u00e1")
buf.write("\3\2\2\2\62\65\7\4\2\2\63\66\5\16\b\2\64\66\7&\2\2\65")
buf.write("\63\3\2\2\2\65\64\3\2\2\2\66\67\3\2\2\2\678\7\5\2\28:")
buf.write("\5\22\n\29;\5\n\6\2:9\3\2\2\2:;\3\2\2\2;\u00e1\3\2\2\2")
buf.write("<?\7\6\2\2=@\5\16\b\2>@\7&\2\2?=\3\2\2\2?>\3\2\2\2@B\3")
buf.write("\2\2\2AC\5\n\6\2BA\3\2\2\2BC\3\2\2\2C\u00e1\3\2\2\2DG")
buf.write("\7\7\2\2EH\5\16\b\2FH\7&\2\2GE\3\2\2\2GF\3\2\2\2HJ\3\2")
buf.write("\2\2IK\5\n\6\2JI\3\2\2\2JK\3\2\2\2K\u00e1\3\2\2\2LO\7")
buf.write("\b\2\2MP\5\16\b\2NP\7&\2\2OM\3\2\2\2ON\3\2\2\2PR\3\2\2")
buf.write("\2QS\5\n\6\2RQ\3\2\2\2RS\3\2\2\2S\u00e1\3\2\2\2TV\7\t")
buf.write("\2\2UW\5\n\6\2VU\3\2\2\2VW\3\2\2\2W\u00e1\3\2\2\2XZ\7")
buf.write("\n\2\2Y[\5\n\6\2ZY\3\2\2\2Z[\3\2\2\2[\u00e1\3\2\2\2\\")
buf.write("_\7\13\2\2]`\5\16\b\2^`\7&\2\2_]\3\2\2\2_^\3\2\2\2`a\3")
buf.write("\2\2\2ab\7\5\2\2bd\5\22\n\2ce\5\b\5\2dc\3\2\2\2de\3\2")
buf.write("\2\2eg\3\2\2\2fh\5\n\6\2gf\3\2\2\2gh\3\2\2\2h\u00e1\3")
buf.write("\2\2\2ij\7\f\2\2jl\5\22\n\2km\5\b\5\2lk\3\2\2\2lm\3\2")
buf.write("\2\2mo\3\2\2\2np\5\n\6\2on\3\2\2\2op\3\2\2\2p\u00e1\3")
buf.write("\2\2\2qr\7\r\2\2rt\5\22\n\2su\5\n\6\2ts\3\2\2\2tu\3\2")
buf.write("\2\2u\u00e1\3\2\2\2vw\7\16\2\2wy\5\16\b\2xz\5\n\6\2yx")
buf.write("\3\2\2\2yz\3\2\2\2z\u00e1\3\2\2\2{|\7\16\2\2|}\5\16\b")
buf.write("\2}~\7\5\2\2~\u0080\5\22\n\2\177\u0081\5\n\6\2\u0080\177")
buf.write("\3\2\2\2\u0080\u0081\3\2\2\2\u0081\u00e1\3\2\2\2\u0082")
buf.write("\2\2\2\"%\3\2\2\2#!\3\2\2\2$&\7\60\2\2%$\3\2\2\2%&\3\2")
buf.write("\2\2&)\3\2\2\2\')\7\60\2\2(\34\3\2\2\2(\'\3\2\2\2)\5\3")
buf.write("\2\2\2*-\7\4\2\2+.\5\16\b\2,.\7+\2\2-+\3\2\2\2-,\3\2\2")
buf.write("\2.\60\3\2\2\2/\61\5\n\6\2\60/\3\2\2\2\60\61\3\2\2\2\61")
buf.write("\u00f6\3\2\2\2\62\65\7\4\2\2\63\66\5\16\b\2\64\66\7+\2")
buf.write("\2\65\63\3\2\2\2\65\64\3\2\2\2\66\67\3\2\2\2\678\7\5\2")
buf.write("\28:\5\22\n\29;\5\n\6\2:9\3\2\2\2:;\3\2\2\2;\u00f6\3\2")
buf.write("\2\2<?\7\6\2\2=@\5\16\b\2>@\7+\2\2?=\3\2\2\2?>\3\2\2\2")
buf.write("@B\3\2\2\2AC\5\n\6\2BA\3\2\2\2BC\3\2\2\2C\u00f6\3\2\2")
buf.write("\2DG\7\7\2\2EH\5\16\b\2FH\7+\2\2GE\3\2\2\2GF\3\2\2\2H")
buf.write("J\3\2\2\2IK\5\n\6\2JI\3\2\2\2JK\3\2\2\2K\u00f6\3\2\2\2")
buf.write("LO\7\b\2\2MP\5\16\b\2NP\7+\2\2OM\3\2\2\2ON\3\2\2\2PR\3")
buf.write("\2\2\2QS\5\n\6\2RQ\3\2\2\2RS\3\2\2\2S\u00f6\3\2\2\2TV")
buf.write("\7\t\2\2UW\5\n\6\2VU\3\2\2\2VW\3\2\2\2W\u00f6\3\2\2\2")
buf.write("XZ\7\n\2\2Y[\5\n\6\2ZY\3\2\2\2Z[\3\2\2\2[\u00f6\3\2\2")
buf.write("\2\\_\7\13\2\2]`\5\16\b\2^`\7+\2\2_]\3\2\2\2_^\3\2\2\2")
buf.write("`a\3\2\2\2ab\7\5\2\2bd\5\22\n\2ce\5\b\5\2dc\3\2\2\2de")
buf.write("\3\2\2\2eg\3\2\2\2fh\5\n\6\2gf\3\2\2\2gh\3\2\2\2h\u00f6")
buf.write("\3\2\2\2ij\7\f\2\2jl\5\22\n\2km\5\b\5\2lk\3\2\2\2lm\3")
buf.write("\2\2\2mo\3\2\2\2np\5\n\6\2on\3\2\2\2op\3\2\2\2p\u00f6")
buf.write("\3\2\2\2qr\7\r\2\2rt\5\22\n\2su\5\n\6\2ts\3\2\2\2tu\3")
buf.write("\2\2\2u\u00f6\3\2\2\2vw\7\16\2\2wy\5\16\b\2xz\5\n\6\2")
buf.write("yx\3\2\2\2yz\3\2\2\2z\u00f6\3\2\2\2{|\7\16\2\2|}\5\16")
buf.write("\b\2}~\7\5\2\2~\u0080\5\22\n\2\177\u0081\5\n\6\2\u0080")
buf.write("\177\3\2\2\2\u0080\u0081\3\2\2\2\u0081\u00f6\3\2\2\2\u0082")
buf.write("\u0083\7\17\2\2\u0083\u0085\5\16\b\2\u0084\u0086\5\n\6")
buf.write("\2\u0085\u0084\3\2\2\2\u0085\u0086\3\2\2\2\u0086\u00e1")
buf.write("\2\u0085\u0084\3\2\2\2\u0085\u0086\3\2\2\2\u0086\u00f6")
buf.write("\3\2\2\2\u0087\u0088\7\20\2\2\u0088\u008a\5\16\b\2\u0089")
buf.write("\u008b\5\n\6\2\u008a\u0089\3\2\2\2\u008a\u008b\3\2\2\2")
buf.write("\u008b\u00e1\3\2\2\2\u008c\u008d\7\21\2\2\u008d\u008f")
buf.write("\u008b\u00f6\3\2\2\2\u008c\u008d\7\21\2\2\u008d\u008f")
buf.write("\5\16\b\2\u008e\u0090\5\n\6\2\u008f\u008e\3\2\2\2\u008f")
buf.write("\u0090\3\2\2\2\u0090\u00e1\3\2\2\2\u0091\u0092\7\22\2")
buf.write("\u0090\3\2\2\2\u0090\u00f6\3\2\2\2\u0091\u0092\7\22\2")
buf.write("\2\u0092\u0094\5\16\b\2\u0093\u0095\5\n\6\2\u0094\u0093")
buf.write("\3\2\2\2\u0094\u0095\3\2\2\2\u0095\u00e1\3\2\2\2\u0096")
buf.write("\3\2\2\2\u0094\u0095\3\2\2\2\u0095\u00f6\3\2\2\2\u0096")
buf.write("\u0097\7\23\2\2\u0097\u0099\5\16\b\2\u0098\u009a\5\n\6")
buf.write("\2\u0099\u0098\3\2\2\2\u0099\u009a\3\2\2\2\u009a\u00e1")
buf.write("\2\u0099\u0098\3\2\2\2\u0099\u009a\3\2\2\2\u009a\u00f6")
buf.write("\3\2\2\2\u009b\u009c\7\24\2\2\u009c\u009e\5\16\b\2\u009d")
buf.write("\u009f\5\n\6\2\u009e\u009d\3\2\2\2\u009e\u009f\3\2\2\2")
buf.write("\u009f\u00e1\3\2\2\2\u00a0\u00a1\7\25\2\2\u00a1\u00a3")
buf.write("\u009f\u00f6\3\2\2\2\u00a0\u00a1\7\25\2\2\u00a1\u00a3")
buf.write("\5\16\b\2\u00a2\u00a4\5\n\6\2\u00a3\u00a2\3\2\2\2\u00a3")
buf.write("\u00a4\3\2\2\2\u00a4\u00e1\3\2\2\2\u00a5\u00a6\7\26\2")
buf.write("\u00a4\3\2\2\2\u00a4\u00f6\3\2\2\2\u00a5\u00a6\7\26\2")
buf.write("\2\u00a6\u00a8\5\16\b\2\u00a7\u00a9\5\n\6\2\u00a8\u00a7")
buf.write("\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9\u00e1\3\2\2\2\u00aa")
buf.write("\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9\u00f6\3\2\2\2\u00aa")
buf.write("\u00ab\7\27\2\2\u00ab\u00ad\5\16\b\2\u00ac\u00ae\5\n\6")
buf.write("\2\u00ad\u00ac\3\2\2\2\u00ad\u00ae\3\2\2\2\u00ae\u00e1")
buf.write("\2\u00ad\u00ac\3\2\2\2\u00ad\u00ae\3\2\2\2\u00ae\u00f6")
buf.write("\3\2\2\2\u00af\u00b0\7\30\2\2\u00b0\u00b2\5\16\b\2\u00b1")
buf.write("\u00b3\5\n\6\2\u00b2\u00b1\3\2\2\2\u00b2\u00b3\3\2\2\2")
buf.write("\u00b3\u00e1\3\2\2\2\u00b4\u00b5\7\31\2\2\u00b5\u00b7")
buf.write("\u00b3\u00f6\3\2\2\2\u00b4\u00b5\7\31\2\2\u00b5\u00b7")
buf.write("\5\16\b\2\u00b6\u00b8\5\n\6\2\u00b7\u00b6\3\2\2\2\u00b7")
buf.write("\u00b8\3\2\2\2\u00b8\u00e1\3\2\2\2\u00b9\u00ba\7\32\2")
buf.write("\u00b8\3\2\2\2\u00b8\u00f6\3\2\2\2\u00b9\u00ba\7\32\2")
buf.write("\2\u00ba\u00bc\5\22\n\2\u00bb\u00bd\5\n\6\2\u00bc\u00bb")
buf.write("\3\2\2\2\u00bc\u00bd\3\2\2\2\u00bd\u00e1\3\2\2\2\u00be")
buf.write("\3\2\2\2\u00bc\u00bd\3\2\2\2\u00bd\u00f6\3\2\2\2\u00be")
buf.write("\u00bf\7\32\2\2\u00bf\u00c1\7\33\2\2\u00c0\u00c2\5\n\6")
buf.write("\2\u00c1\u00c0\3\2\2\2\u00c1\u00c2\3\2\2\2\u00c2\u00e1")
buf.write("\2\u00c1\u00c0\3\2\2\2\u00c1\u00c2\3\2\2\2\u00c2\u00f6")
buf.write("\3\2\2\2\u00c3\u00c4\7\32\2\2\u00c4\u00c6\7\34\2\2\u00c5")
buf.write("\u00c7\5\n\6\2\u00c6\u00c5\3\2\2\2\u00c6\u00c7\3\2\2\2")
buf.write("\u00c7\u00e1\3\2\2\2\u00c8\u00c9\7\35\2\2\u00c9\u00cb")
buf.write("\u00c7\u00f6\3\2\2\2\u00c8\u00c9\7\35\2\2\u00c9\u00cb")
buf.write("\5\22\n\2\u00ca\u00cc\5\n\6\2\u00cb\u00ca\3\2\2\2\u00cb")
buf.write("\u00cc\3\2\2\2\u00cc\u00e1\3\2\2\2\u00cd\u00ce\7\36\2")
buf.write("\2\u00ce\u00e1\5\n\6\2\u00cf\u00d0\7\37\2\2\u00d0\u00d2")
buf.write("\u00cc\3\2\2\2\u00cc\u00f6\3\2\2\2\u00cd\u00ce\7\36\2")
buf.write("\2\u00ce\u00f6\5\n\6\2\u00cf\u00d0\7\37\2\2\u00d0\u00d2")
buf.write("\5\16\b\2\u00d1\u00d3\5\n\6\2\u00d2\u00d1\3\2\2\2\u00d2")
buf.write("\u00d3\3\2\2\2\u00d3\u00e1\3\2\2\2\u00d4\u00d5\7 \2\2")
buf.write("\u00d3\3\2\2\2\u00d3\u00f6\3\2\2\2\u00d4\u00d5\7 \2\2")
buf.write("\u00d5\u00d7\5\16\b\2\u00d6\u00d8\5\n\6\2\u00d7\u00d6")
buf.write("\3\2\2\2\u00d7\u00d8\3\2\2\2\u00d8\u00e1\3\2\2\2\u00d9")
buf.write("\3\2\2\2\u00d7\u00d8\3\2\2\2\u00d8\u00f6\3\2\2\2\u00d9")
buf.write("\u00da\7!\2\2\u00da\u00dc\5\16\b\2\u00db\u00dd\5\n\6\2")
buf.write("\u00dc\u00db\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\u00e1\3")
buf.write("\u00dc\u00db\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\u00f6\3")
buf.write("\2\2\2\u00de\u00df\7\"\2\2\u00df\u00e1\5\22\n\2\u00e0")
buf.write("*\3\2\2\2\u00e0\62\3\2\2\2\u00e0<\3\2\2\2\u00e0D\3\2\2")
buf.write("\2\u00e0L\3\2\2\2\u00e0T\3\2\2\2\u00e0X\3\2\2\2\u00e0")
buf.write("\\\3\2\2\2\u00e0i\3\2\2\2\u00e0q\3\2\2\2\u00e0v\3\2\2")
buf.write("\2\u00e0{\3\2\2\2\u00e0\u0082\3\2\2\2\u00e0\u0087\3\2")
buf.write("\2\2\u00e0\u008c\3\2\2\2\u00e0\u0091\3\2\2\2\u00e0\u0096")
buf.write("\3\2\2\2\u00e0\u009b\3\2\2\2\u00e0\u00a0\3\2\2\2\u00e0")
buf.write("\u00a5\3\2\2\2\u00e0\u00aa\3\2\2\2\u00e0\u00af\3\2\2\2")
buf.write("\u00e0\u00b4\3\2\2\2\u00e0\u00b9\3\2\2\2\u00e0\u00be\3")
buf.write("\2\2\2\u00e0\u00c3\3\2\2\2\u00e0\u00c8\3\2\2\2\u00e0\u00cd")
buf.write("\3\2\2\2\u00e0\u00cf\3\2\2\2\u00e0\u00d4\3\2\2\2\u00e0")
buf.write("\u00d9\3\2\2\2\u00e0\u00de\3\2\2\2\u00e1\7\3\2\2\2\u00e2")
buf.write("\u00e3\7\'\2\2\u00e3\u00e4\5\22\n\2\u00e4\t\3\2\2\2\u00e5")
buf.write("\u00e6\5\f\7\2\u00e6\u00e7\5\22\n\2\u00e7\13\3\2\2\2\u00e8")
buf.write("\u00e9\t\2\2\2\u00e9\r\3\2\2\2\u00ea\u00ed\5\22\n\2\u00eb")
buf.write("\u00ed\5\20\t\2\u00ec\u00ea\3\2\2\2\u00ec\u00eb\3\2\2")
buf.write("\2\u00ed\u00f2\3\2\2\2\u00ee\u00ef\7#\2\2\u00ef\u00f1")
buf.write("\5\16\b\2\u00f0\u00ee\3\2\2\2\u00f1\u00f4\3\2\2\2\u00f2")
buf.write("\u00f0\3\2\2\2\u00f2\u00f3\3\2\2\2\u00f3\17\3\2\2\2\u00f4")
buf.write("\u00f2\3\2\2\2\u00f5\u00f6\5\22\n\2\u00f6\u00f7\7%\2\2")
buf.write("\u00f7\u00f8\5\22\n\2\u00f8\21\3\2\2\2\u00f9\u00fa\7$")
buf.write("\2\2\u00fa\23\3\2\2\2/\27!%(-\60\65:?BGJORVZ_dgloty\u0080")
buf.write("\u0085\u008a\u008f\u0094\u0099\u009e\u00a3\u00a8\u00ad")
buf.write("\u00b2\u00b7\u00bc\u00c1\u00c6\u00cb\u00d2\u00d7\u00dc")
buf.write("\u00e0\u00ec\u00f2")
buf.write("\u00e2\5\n\6\2\u00e1\u00e0\3\2\2\2\u00e1\u00e2\3\2\2\2")
buf.write("\u00e2\u00f6\3\2\2\2\u00e3\u00e4\7#\2\2\u00e4\u00e6\5")
buf.write("\22\n\2\u00e5\u00e7\5\n\6\2\u00e6\u00e5\3\2\2\2\u00e6")
buf.write("\u00e7\3\2\2\2\u00e7\u00f6\3\2\2\2\u00e8\u00e9\7$\2\2")
buf.write("\u00e9\u00eb\5\22\n\2\u00ea\u00ec\5\n\6\2\u00eb\u00ea")
buf.write("\3\2\2\2\u00eb\u00ec\3\2\2\2\u00ec\u00f6\3\2\2\2\u00ed")
buf.write("\u00ee\7%\2\2\u00ee\u00f0\5\22\n\2\u00ef\u00f1\5\n\6\2")
buf.write("\u00f0\u00ef\3\2\2\2\u00f0\u00f1\3\2\2\2\u00f1\u00f6\3")
buf.write("\2\2\2\u00f2\u00f3\7&\2\2\u00f3\u00f6\5\22\n\2\u00f4\u00f6")
buf.write("\7\'\2\2\u00f5*\3\2\2\2\u00f5\62\3\2\2\2\u00f5<\3\2\2")
buf.write("\2\u00f5D\3\2\2\2\u00f5L\3\2\2\2\u00f5T\3\2\2\2\u00f5")
buf.write("X\3\2\2\2\u00f5\\\3\2\2\2\u00f5i\3\2\2\2\u00f5q\3\2\2")
buf.write("\2\u00f5v\3\2\2\2\u00f5{\3\2\2\2\u00f5\u0082\3\2\2\2\u00f5")
buf.write("\u0087\3\2\2\2\u00f5\u008c\3\2\2\2\u00f5\u0091\3\2\2\2")
buf.write("\u00f5\u0096\3\2\2\2\u00f5\u009b\3\2\2\2\u00f5\u00a0\3")
buf.write("\2\2\2\u00f5\u00a5\3\2\2\2\u00f5\u00aa\3\2\2\2\u00f5\u00af")
buf.write("\3\2\2\2\u00f5\u00b4\3\2\2\2\u00f5\u00b9\3\2\2\2\u00f5")
buf.write("\u00be\3\2\2\2\u00f5\u00c3\3\2\2\2\u00f5\u00c8\3\2\2\2")
buf.write("\u00f5\u00cd\3\2\2\2\u00f5\u00cf\3\2\2\2\u00f5\u00d4\3")
buf.write("\2\2\2\u00f5\u00d9\3\2\2\2\u00f5\u00de\3\2\2\2\u00f5\u00e3")
buf.write("\3\2\2\2\u00f5\u00e8\3\2\2\2\u00f5\u00ed\3\2\2\2\u00f5")
buf.write("\u00f2\3\2\2\2\u00f5\u00f4\3\2\2\2\u00f6\7\3\2\2\2\u00f7")
buf.write("\u00f8\7,\2\2\u00f8\u00f9\5\22\n\2\u00f9\t\3\2\2\2\u00fa")
buf.write("\u00fb\5\f\7\2\u00fb\u00fc\5\22\n\2\u00fc\13\3\2\2\2\u00fd")
buf.write("\u00fe\t\2\2\2\u00fe\r\3\2\2\2\u00ff\u0102\5\22\n\2\u0100")
buf.write("\u0102\5\20\t\2\u0101\u00ff\3\2\2\2\u0101\u0100\3\2\2")
buf.write("\2\u0102\u0107\3\2\2\2\u0103\u0104\7(\2\2\u0104\u0106")
buf.write("\5\16\b\2\u0105\u0103\3\2\2\2\u0106\u0109\3\2\2\2\u0107")
buf.write("\u0105\3\2\2\2\u0107\u0108\3\2\2\2\u0108\17\3\2\2\2\u0109")
buf.write("\u0107\3\2\2\2\u010a\u010b\5\22\n\2\u010b\u010c\7*\2\2")
buf.write("\u010c\u010d\5\22\n\2\u010d\21\3\2\2\2\u010e\u010f\7)")
buf.write("\2\2\u010f\23\3\2\2\2\63\27!%(-\60\65:?BGJORVZ_dgloty")
buf.write("\u0080\u0085\u008a\u008f\u0094\u0099\u009e\u00a3\u00a8")
buf.write("\u00ad\u00b2\u00b7\u00bc\u00c1\u00c6\u00cb\u00d2\u00d7")
buf.write("\u00dc\u00e1\u00e6\u00eb\u00f0\u00f5\u0101\u0107")
return buf.getvalue()
@ -149,9 +162,9 @@ class CommentMacroParser ( Parser ):
"'RM'", "'RA'", "'RO'", "'FM'", "'FGM'", "'CM'", "'GL'",
"'HL'", "'AL'", "'RL'", "'GB'", "'HB'", "'AB'", "'RB'",
"'GS'", "'HS'", "'AS'", "'RS'", "'CP'", "'+'", "'-'",
"'RV'", "'RN'", "'GK'", "'HK'", "'RK'", "'WAIT'", "','",
"<INVALID>", "'>'", "'*'", "'t'", "<INVALID>", "<INVALID>",
"'IOP'" ]
"'RV'", "'RN'", "'GK'", "'HK'", "'RK'", "'INT'", "'POS'",
"'COLR'", "'BEAM'", "'WAIT'", "'PASS'", "','", "<INVALID>",
"'>'", "'*'", "'t'", "<INVALID>", "<INVALID>", "'IOP'" ]
symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
@ -161,9 +174,10 @@ class CommentMacroParser ( Parser ):
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
"<INVALID>", "<INVALID>", "NUMBER", "THRU", "CURRENT",
"TIME", "WHOLEHOG", "DP8K", "IOP", "NEWLINE", "WS",
"COMMENT" ]
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
"<INVALID>", "<INVALID>", "<INVALID>", "NUMBER", "THRU",
"CURRENT", "TIME", "WHOLEHOG", "DP8K", "IOP", "NEWLINE",
"WS", "COMMENT" ]
RULE_prog = 0
RULE_statement = 1
@ -212,16 +226,21 @@ class CommentMacroParser ( Parser ):
T__30=31
T__31=32
T__32=33
NUMBER=34
THRU=35
CURRENT=36
TIME=37
WHOLEHOG=38
DP8K=39
IOP=40
NEWLINE=41
WS=42
COMMENT=43
T__33=34
T__34=35
T__35=36
T__36=37
T__37=38
NUMBER=39
THRU=40
CURRENT=41
TIME=42
WHOLEHOG=43
DP8K=44
IOP=45
NEWLINE=46
WS=47
COMMENT=48
def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
super().__init__(input, output)
@ -272,7 +291,7 @@ class CommentMacroParser ( Parser ):
self.state = 21
self._errHandler.sync(self)
_la = self._input.LA(1)
while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CommentMacroParser.T__1) | (1 << CommentMacroParser.T__3) | (1 << CommentMacroParser.T__4) | (1 << CommentMacroParser.T__5) | (1 << CommentMacroParser.T__6) | (1 << CommentMacroParser.T__7) | (1 << CommentMacroParser.T__8) | (1 << CommentMacroParser.T__9) | (1 << CommentMacroParser.T__10) | (1 << CommentMacroParser.T__11) | (1 << CommentMacroParser.T__12) | (1 << CommentMacroParser.T__13) | (1 << CommentMacroParser.T__14) | (1 << CommentMacroParser.T__15) | (1 << CommentMacroParser.T__16) | (1 << CommentMacroParser.T__17) | (1 << CommentMacroParser.T__18) | (1 << CommentMacroParser.T__19) | (1 << CommentMacroParser.T__20) | (1 << CommentMacroParser.T__21) | (1 << CommentMacroParser.T__22) | (1 << CommentMacroParser.T__23) | (1 << CommentMacroParser.T__26) | (1 << CommentMacroParser.T__27) | (1 << CommentMacroParser.T__28) | (1 << CommentMacroParser.T__29) | (1 << CommentMacroParser.T__30) | (1 << CommentMacroParser.T__31) | (1 << CommentMacroParser.NEWLINE))) != 0):
while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CommentMacroParser.T__1) | (1 << CommentMacroParser.T__3) | (1 << CommentMacroParser.T__4) | (1 << CommentMacroParser.T__5) | (1 << CommentMacroParser.T__6) | (1 << CommentMacroParser.T__7) | (1 << CommentMacroParser.T__8) | (1 << CommentMacroParser.T__9) | (1 << CommentMacroParser.T__10) | (1 << CommentMacroParser.T__11) | (1 << CommentMacroParser.T__12) | (1 << CommentMacroParser.T__13) | (1 << CommentMacroParser.T__14) | (1 << CommentMacroParser.T__15) | (1 << CommentMacroParser.T__16) | (1 << CommentMacroParser.T__17) | (1 << CommentMacroParser.T__18) | (1 << CommentMacroParser.T__19) | (1 << CommentMacroParser.T__20) | (1 << CommentMacroParser.T__21) | (1 << CommentMacroParser.T__22) | (1 << CommentMacroParser.T__23) | (1 << CommentMacroParser.T__26) | (1 << CommentMacroParser.T__27) | (1 << CommentMacroParser.T__28) | (1 << CommentMacroParser.T__29) | (1 << CommentMacroParser.T__30) | (1 << CommentMacroParser.T__31) | (1 << CommentMacroParser.T__32) | (1 << CommentMacroParser.T__33) | (1 << CommentMacroParser.T__34) | (1 << CommentMacroParser.T__35) | (1 << CommentMacroParser.T__36) | (1 << CommentMacroParser.NEWLINE))) != 0):
self.state = 18
self.statement()
self.state = 23
@ -329,7 +348,7 @@ class CommentMacroParser ( Parser ):
self.state = 38
self._errHandler.sync(self)
token = self._input.LA(1)
if token in [CommentMacroParser.T__1, CommentMacroParser.T__3, CommentMacroParser.T__4, CommentMacroParser.T__5, CommentMacroParser.T__6, CommentMacroParser.T__7, CommentMacroParser.T__8, CommentMacroParser.T__9, CommentMacroParser.T__10, CommentMacroParser.T__11, CommentMacroParser.T__12, CommentMacroParser.T__13, CommentMacroParser.T__14, CommentMacroParser.T__15, CommentMacroParser.T__16, CommentMacroParser.T__17, CommentMacroParser.T__18, CommentMacroParser.T__19, CommentMacroParser.T__20, CommentMacroParser.T__21, CommentMacroParser.T__22, CommentMacroParser.T__23, CommentMacroParser.T__26, CommentMacroParser.T__27, CommentMacroParser.T__28, CommentMacroParser.T__29, CommentMacroParser.T__30, CommentMacroParser.T__31]:
if token in [CommentMacroParser.T__1, CommentMacroParser.T__3, CommentMacroParser.T__4, CommentMacroParser.T__5, CommentMacroParser.T__6, CommentMacroParser.T__7, CommentMacroParser.T__8, CommentMacroParser.T__9, CommentMacroParser.T__10, CommentMacroParser.T__11, CommentMacroParser.T__12, CommentMacroParser.T__13, CommentMacroParser.T__14, CommentMacroParser.T__15, CommentMacroParser.T__16, CommentMacroParser.T__17, CommentMacroParser.T__18, CommentMacroParser.T__19, CommentMacroParser.T__20, CommentMacroParser.T__21, CommentMacroParser.T__22, CommentMacroParser.T__23, CommentMacroParser.T__26, CommentMacroParser.T__27, CommentMacroParser.T__28, CommentMacroParser.T__29, CommentMacroParser.T__30, CommentMacroParser.T__31, CommentMacroParser.T__32, CommentMacroParser.T__33, CommentMacroParser.T__34, CommentMacroParser.T__35, CommentMacroParser.T__36]:
self.enterOuterAlt(localctx, 1)
self.state = 26
self.macro()
@ -638,6 +657,28 @@ class CommentMacroParser ( Parser ):
listener.exitPagePrev(self)
class SelectColourContext(MacroContext):
def __init__(self, parser, ctx:ParserRuleContext): # actually a CommentMacroParser.MacroContext
super().__init__(parser)
self.copyFrom(ctx)
def number(self):
return self.getTypedRuleContext(CommentMacroParser.NumberContext,0)
def device(self):
return self.getTypedRuleContext(CommentMacroParser.DeviceContext,0)
def enterRule(self, listener:ParseTreeListener):
if hasattr( listener, "enterSelectColour" ):
listener.enterSelectColour(self)
def exitRule(self, listener:ParseTreeListener):
if hasattr( listener, "exitSelectColour" ):
listener.exitSelectColour(self)
class PageNextContext(MacroContext):
def __init__(self, parser, ctx:ParserRuleContext): # actually a CommentMacroParser.MacroContext
@ -679,6 +720,22 @@ class CommentMacroParser ( Parser ):
listener.exitListRelese(self)
class PassContext(MacroContext):
def __init__(self, parser, ctx:ParserRuleContext): # actually a CommentMacroParser.MacroContext
super().__init__(parser)
self.copyFrom(ctx)
def enterRule(self, listener:ParseTreeListener):
if hasattr( listener, "enterPass" ):
listener.enterPass(self)
def exitRule(self, listener:ParseTreeListener):
if hasattr( listener, "exitPass" ):
listener.exitPass(self)
class ListHaltContext(MacroContext):
def __init__(self, parser, ctx:ParserRuleContext): # actually a CommentMacroParser.MacroContext
@ -720,6 +777,28 @@ class CommentMacroParser ( Parser ):
listener.exitReleaseAll(self)
class SelectIntensityContext(MacroContext):
def __init__(self, parser, ctx:ParserRuleContext): # actually a CommentMacroParser.MacroContext
super().__init__(parser)
self.copyFrom(ctx)
def number(self):
return self.getTypedRuleContext(CommentMacroParser.NumberContext,0)
def device(self):
return self.getTypedRuleContext(CommentMacroParser.DeviceContext,0)
def enterRule(self, listener:ParseTreeListener):
if hasattr( listener, "enterSelectIntensity" ):
listener.enterSelectIntensity(self)
def exitRule(self, listener:ParseTreeListener):
if hasattr( listener, "exitSelectIntensity" ):
listener.exitSelectIntensity(self)
class MacroGoContext(MacroContext):
def __init__(self, parser, ctx:ParserRuleContext): # actually a CommentMacroParser.MacroContext
@ -1040,6 +1119,28 @@ class CommentMacroParser ( Parser ):
listener.exitNodeReset(self)
class SelectPositionContext(MacroContext):
def __init__(self, parser, ctx:ParserRuleContext): # actually a CommentMacroParser.MacroContext
super().__init__(parser)
self.copyFrom(ctx)
def number(self):
return self.getTypedRuleContext(CommentMacroParser.NumberContext,0)
def device(self):
return self.getTypedRuleContext(CommentMacroParser.DeviceContext,0)
def enterRule(self, listener:ParseTreeListener):
if hasattr( listener, "enterSelectPosition" ):
listener.enterSelectPosition(self)
def exitRule(self, listener:ParseTreeListener):
if hasattr( listener, "exitSelectPosition" ):
listener.exitSelectPosition(self)
class ReleaseOthersContext(MacroContext):
def __init__(self, parser, ctx:ParserRuleContext): # actually a CommentMacroParser.MacroContext
@ -1100,6 +1201,28 @@ class CommentMacroParser ( Parser ):
listener.exitWait(self)
class SelectBeamContext(MacroContext):
def __init__(self, parser, ctx:ParserRuleContext): # actually a CommentMacroParser.MacroContext
super().__init__(parser)
self.copyFrom(ctx)
def number(self):
return self.getTypedRuleContext(CommentMacroParser.NumberContext,0)
def device(self):
return self.getTypedRuleContext(CommentMacroParser.DeviceContext,0)
def enterRule(self, listener:ParseTreeListener):
if hasattr( listener, "enterSelectBeam" ):
listener.enterSelectBeam(self)
def exitRule(self, listener:ParseTreeListener):
if hasattr( listener, "exitSelectBeam" ):
listener.exitSelectBeam(self)
def macro(self):
@ -1107,9 +1230,9 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 4, self.RULE_macro)
self._la = 0 # Token type
try:
self.state = 222
self.state = 243
self._errHandler.sync(self)
la_ = self._interp.adaptivePredict(self._input,42,self._ctx)
la_ = self._interp.adaptivePredict(self._input,46,self._ctx)
if la_ == 1:
localctx = CommentMacroParser.MasterGoContext(self, localctx)
self.enterOuterAlt(localctx, 1)
@ -1726,12 +1849,87 @@ class CommentMacroParser ( Parser ):
pass
elif la_ == 32:
localctx = CommentMacroParser.WaitContext(self, localctx)
localctx = CommentMacroParser.SelectIntensityContext(self, localctx)
self.enterOuterAlt(localctx, 32)
self.state = 220
self.match(CommentMacroParser.T__31)
self.state = 221
self.number()
self.state = 223
self._errHandler.sync(self)
_la = self._input.LA(1)
if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CommentMacroParser.WHOLEHOG) | (1 << CommentMacroParser.DP8K) | (1 << CommentMacroParser.IOP))) != 0):
self.state = 222
self.device()
pass
elif la_ == 33:
localctx = CommentMacroParser.SelectPositionContext(self, localctx)
self.enterOuterAlt(localctx, 33)
self.state = 225
self.match(CommentMacroParser.T__32)
self.state = 226
self.number()
self.state = 228
self._errHandler.sync(self)
_la = self._input.LA(1)
if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CommentMacroParser.WHOLEHOG) | (1 << CommentMacroParser.DP8K) | (1 << CommentMacroParser.IOP))) != 0):
self.state = 227
self.device()
pass
elif la_ == 34:
localctx = CommentMacroParser.SelectColourContext(self, localctx)
self.enterOuterAlt(localctx, 34)
self.state = 230
self.match(CommentMacroParser.T__33)
self.state = 231
self.number()
self.state = 233
self._errHandler.sync(self)
_la = self._input.LA(1)
if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CommentMacroParser.WHOLEHOG) | (1 << CommentMacroParser.DP8K) | (1 << CommentMacroParser.IOP))) != 0):
self.state = 232
self.device()
pass
elif la_ == 35:
localctx = CommentMacroParser.SelectBeamContext(self, localctx)
self.enterOuterAlt(localctx, 35)
self.state = 235
self.match(CommentMacroParser.T__34)
self.state = 236
self.number()
self.state = 238
self._errHandler.sync(self)
_la = self._input.LA(1)
if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CommentMacroParser.WHOLEHOG) | (1 << CommentMacroParser.DP8K) | (1 << CommentMacroParser.IOP))) != 0):
self.state = 237
self.device()
pass
elif la_ == 36:
localctx = CommentMacroParser.WaitContext(self, localctx)
self.enterOuterAlt(localctx, 36)
self.state = 240
self.match(CommentMacroParser.T__35)
self.state = 241
self.number()
pass
elif la_ == 37:
localctx = CommentMacroParser.PassContext(self, localctx)
self.enterOuterAlt(localctx, 37)
self.state = 242
self.match(CommentMacroParser.T__36)
pass
@ -1777,9 +1975,9 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 6, self.RULE_time)
try:
self.enterOuterAlt(localctx, 1)
self.state = 224
self.state = 245
self.match(CommentMacroParser.TIME)
self.state = 225
self.state = 246
self.number()
except RecognitionException as re:
localctx.exception = re
@ -1824,9 +2022,9 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 8, self.RULE_device)
try:
self.enterOuterAlt(localctx, 1)
self.state = 227
self.state = 248
self.nodeType()
self.state = 228
self.state = 249
self.number()
except RecognitionException as re:
localctx.exception = re
@ -1873,7 +2071,7 @@ class CommentMacroParser ( Parser ):
self._la = 0 # Token type
try:
self.enterOuterAlt(localctx, 1)
self.state = 230
self.state = 251
_la = self._input.LA(1)
if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CommentMacroParser.WHOLEHOG) | (1 << CommentMacroParser.DP8K) | (1 << CommentMacroParser.IOP))) != 0)):
self._errHandler.recoverInline(self)
@ -1930,32 +2128,32 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 12, self.RULE_target)
try:
self.enterOuterAlt(localctx, 1)
self.state = 234
self.state = 255
self._errHandler.sync(self)
la_ = self._interp.adaptivePredict(self._input,43,self._ctx)
la_ = self._interp.adaptivePredict(self._input,47,self._ctx)
if la_ == 1:
self.state = 232
self.state = 253
self.number()
pass
elif la_ == 2:
self.state = 233
self.state = 254
self.span()
pass
self.state = 240
self.state = 261
self._errHandler.sync(self)
_alt = self._interp.adaptivePredict(self._input,44,self._ctx)
_alt = self._interp.adaptivePredict(self._input,48,self._ctx)
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
if _alt==1:
self.state = 236
self.match(CommentMacroParser.T__32)
self.state = 237
self.state = 257
self.match(CommentMacroParser.T__37)
self.state = 258
self.target()
self.state = 242
self.state = 263
self._errHandler.sync(self)
_alt = self._interp.adaptivePredict(self._input,44,self._ctx)
_alt = self._interp.adaptivePredict(self._input,48,self._ctx)
except RecognitionException as re:
localctx.exception = re
@ -2004,11 +2202,11 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 14, self.RULE_span)
try:
self.enterOuterAlt(localctx, 1)
self.state = 243
self.state = 264
localctx.n1 = self.number()
self.state = 244
self.state = 265
self.match(CommentMacroParser.THRU)
self.state = 245
self.state = 266
localctx.n2 = self.number()
except RecognitionException as re:
localctx.exception = re
@ -2048,7 +2246,7 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 16, self.RULE_number)
try:
self.enterOuterAlt(localctx, 1)
self.state = 247
self.state = 268
self.match(CommentMacroParser.NUMBER)
except RecognitionException as re:
localctx.exception = re

View File

@ -13,17 +13,79 @@ class HogNet:
# button state constants
buttonDOWN = 1
buttonUP = 0
buttonMap: Dict[str, str] = {
"backspace": "/hog/hardware/backspace",
"beam": "/hog/hardware/beam",
"blind": "/hog/hardware/blind",
"clear": "/hog/hardware/clear",
"colour": "/hog/hardware/colour",
"copy": "/hog/hardware/copy",
"cue": "/hog/hardware/cue",
"delete": "/hog/hardware/delete",
"down": "/hog/hardware/down",
"effect": "/hog/hardware/effect",
"enter": "/hog/hardware/enter",
"fan": "/hog/hardware/fan",
"fixture": "/hog/hardware/fixture",
"goto": "/hog/hardware/goto",
"group": "/hog/hardware/group",
"highlight": "/hog/hardware/highlight",
"intensity": "/hog/hardware/intensity",
"left": "/hog/hardware/left",
"list": "/hog/hardware/list",
"live": "/hog/hardware/live",
"macro": "/hog/hardware/macro",
"merge": "/hog/hardware/merge",
"move": "/hog/hardware/move",
"open": "/hog/hardware/open",
"page": "/hog/hardware/page",
"pig": "/hog/hardware/pig",
"position": "/hog/hardware/position",
"record": "/hog/hardware/record",
"right": "/hog/hardware/right",
"scene": "/hog/hardware/scene",
"set": "/hog/hardware/set",
"setup": "/hog/hardware/setup",
"time": "/hog/hardware/time",
"up": "/hog/hardware/up",
"update": "/hog/hardware/update",
".": "/hog/hardware/period",
"@": "/hog/hardware/at",
"-": "/hog/hardware/minus",
"+": "/hog/hardware/plus",
"/": "/hog/hardware/slash",
"0": "/hog/hardware/zero",
"1": "/hog/hardware/one",
"2": "/hog/hardware/two",
"3": "/hog/hardware/three",
"4": "/hog/hardware/four",
"5": "/hog/hardware/five",
"6": "/hog/hardware/six",
"7": "/hog/hardware/seven",
"8": "/hog/hardware/eight",
"9": "/hog/hardware/nine"
}
def __init__(self, servers: Dict[int, object]) -> None:
"""Init method."""
self.servers = servers
def number_entry(self, device: ParserRuleContext,
number: str) -> None:
"""Press digit buttons to make a number."""
for digit in number:
try:
self.button_press(device, self.buttonMap[digit])
except KeyError:
continue
def button_press(self, device: ParserRuleContext,
path: str, delay: float = 0.05) -> None:
"""Button presses are a pair of up/down OSC."""
self.send_message(device, path, self.buttonDOWN)
sleep(delay)
self.send_message(device, path, self.buttonUP)
sleep(delay)
def send_message(self, device: ParserRuleContext,
path: str, arg: Any) -> None: