1
0
Fork 0

introduce WAIT macro

This commit is contained in:
Kevin Matz 2018-10-28 17:27:05 -04:00
parent 9fc84b8241
commit 669f4163e9
7 changed files with 310 additions and 259 deletions

View File

@ -70,6 +70,7 @@ macro
| 'GK' target device? #MacroGo | 'GK' target device? #MacroGo
| 'HK' target device? #MacroHalt | 'HK' target device? #MacroHalt
| 'RK' target device? #MacroStop | 'RK' target device? #MacroStop
| 'WAIT' number #Wait
; ;
time : TIME number ; time : TIME number ;

View File

@ -7,118 +7,121 @@ import sys
def serializedATN(): def serializedATN():
with StringIO() as buf: with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2-") buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2.")
buf.write("\u0111\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("\u0118\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("\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("\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("\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("\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("\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("\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.")
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("\t.\3\2\3\2\3\3\3\3\3\3\3\4\3\4\3\5\3\5\3\5\3\6\3\6\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("\6\3\7\3\7\3\7\3\b\3\b\3\b\3\t\3\t\3\t\3\n\3\n\3\n\3\13")
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("\3\13\3\13\3\13\3\f\3\f\3\f\3\r\3\r\3\r\3\16\3\16\3\16")
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\17\3\17\3\17\3\20\3\20\3\20\3\21\3\21\3\21\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\22\3\23\3\23\3\23\3\24\3\24\3\24\3\25\3\25\3\25\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\26\3\26\3\27\3\27\3\27\3\30\3\30\3\30\3\31\3\31\3\31")
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\32\3\32\3\33\3\33\3\34\3\34\3\34\3\35\3\35\3\35\3\36")
buf.write("\3\36\3\37\3\37\3\37\3 \3 \3 \3!\3!\3\"\3\"\3#\6#\u00bb") buf.write("\3\36\3\36\3\37\3\37\3\37\3 \3 \3 \3!\3!\3!\3!\3!\3\"")
buf.write("\n#\r#\16#\u00bc\3#\3#\6#\u00c1\n#\r#\16#\u00c2\5#\u00c5") buf.write("\3\"\3#\3#\3$\6$\u00c2\n$\r$\16$\u00c3\3$\3$\6$\u00c8")
buf.write("\n#\3$\3$\3%\3%\3&\3&\3\'\3\'\3(\3(\3)\3)\3)\3)\3*\5*") buf.write("\n$\r$\16$\u00c9\5$\u00cc\n$\3%\3%\3&\3&\3\'\3\'\3(\3")
buf.write("\u00d6\n*\3*\3*\3+\6+\u00db\n+\r+\16+\u00dc\3+\3+\3,\3") buf.write("(\3)\3)\3*\3*\3*\3*\3+\5+\u00dd\n+\3+\3+\3,\6,\u00e2\n")
buf.write(",\3,\3,\3,\3,\7,\u00e7\n,\f,\16,\u00ea\13,\3,\3,\3,\3") buf.write(",\r,\16,\u00e3\3,\3,\3-\3-\3-\3-\3-\3-\7-\u00ee\n-\f-")
buf.write(",\3,\3,\3,\7,\u00f3\n,\f,\16,\u00f6\13,\3,\3,\5,\u00fa") buf.write("\16-\u00f1\13-\3-\3-\3-\3-\3-\3-\3-\7-\u00fa\n-\f-\16")
buf.write("\n,\3,\3,\3-\3-\3-\3-\7-\u0102\n-\f-\16-\u0105\13-\3-") buf.write("-\u00fd\13-\3-\3-\5-\u0101\n-\3-\3-\3.\3.\3.\3.\7.\u0109")
buf.write("\3-\7-\u0109\n-\f-\16-\u010c\13-\5-\u010e\n-\3-\3-\4\u00e8") buf.write("\n.\f.\16.\u010c\13.\3.\3.\7.\u0110\n.\f.\16.\u0113\13")
buf.write("\u00f4\2.\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25") buf.write(".\5.\u0115\n.\3.\3.\4\u00ef\u00fb\2/\3\3\5\4\7\5\t\6\13")
buf.write("\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+") buf.write("\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37")
buf.write("\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C\2") buf.write("\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34")
buf.write("E#G$I%K&M\'O(Q)S*U+W,Y-\3\2\7\3\2\62;\4\2JJjj\4\2FFff") buf.write("\67\359\36;\37= ?!A\"C#E\2G$I%K&M\'O(Q)S*U+W,Y-[.\3\2")
buf.write("\4\2\13\13\"\"\4\2\f\f\17\17\2\u011a\2\3\3\2\2\2\2\5\3") buf.write("\7\3\2\62;\4\2JJjj\4\2FFff\4\2\13\13\"\"\4\2\f\f\17\17")
buf.write("\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2") buf.write("\2\u0121\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\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\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\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\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("\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\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)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\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("\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\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;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2E\3\2") 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("\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3") buf.write("?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2")
buf.write("\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y") buf.write("\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2")
buf.write("\3\2\2\2\3[\3\2\2\2\5]\3\2\2\2\7`\3\2\2\2\tb\3\2\2\2\13") buf.write("\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\3]\3\2")
buf.write("e\3\2\2\2\rh\3\2\2\2\17k\3\2\2\2\21n\3\2\2\2\23q\3\2\2") buf.write("\2\2\5_\3\2\2\2\7b\3\2\2\2\td\3\2\2\2\13g\3\2\2\2\rj\3")
buf.write("\2\25t\3\2\2\2\27x\3\2\2\2\31{\3\2\2\2\33~\3\2\2\2\35") buf.write("\2\2\2\17m\3\2\2\2\21p\3\2\2\2\23s\3\2\2\2\25v\3\2\2\2")
buf.write("\u0081\3\2\2\2\37\u0084\3\2\2\2!\u0087\3\2\2\2#\u008a") buf.write("\27z\3\2\2\2\31}\3\2\2\2\33\u0080\3\2\2\2\35\u0083\3\2")
buf.write("\3\2\2\2%\u008d\3\2\2\2\'\u0090\3\2\2\2)\u0093\3\2\2\2") buf.write("\2\2\37\u0086\3\2\2\2!\u0089\3\2\2\2#\u008c\3\2\2\2%\u008f")
buf.write("+\u0096\3\2\2\2-\u0099\3\2\2\2/\u009c\3\2\2\2\61\u009f") buf.write("\3\2\2\2\'\u0092\3\2\2\2)\u0095\3\2\2\2+\u0098\3\2\2\2")
buf.write("\3\2\2\2\63\u00a2\3\2\2\2\65\u00a4\3\2\2\2\67\u00a6\3") buf.write("-\u009b\3\2\2\2/\u009e\3\2\2\2\61\u00a1\3\2\2\2\63\u00a4")
buf.write("\2\2\29\u00a9\3\2\2\2;\u00ac\3\2\2\2=\u00af\3\2\2\2?\u00b2") buf.write("\3\2\2\2\65\u00a6\3\2\2\2\67\u00a8\3\2\2\29\u00ab\3\2")
buf.write("\3\2\2\2A\u00b5\3\2\2\2C\u00b7\3\2\2\2E\u00ba\3\2\2\2") buf.write("\2\2;\u00ae\3\2\2\2=\u00b1\3\2\2\2?\u00b4\3\2\2\2A\u00b7")
buf.write("G\u00c6\3\2\2\2I\u00c8\3\2\2\2K\u00ca\3\2\2\2M\u00cc\3") buf.write("\3\2\2\2C\u00bc\3\2\2\2E\u00be\3\2\2\2G\u00c1\3\2\2\2")
buf.write("\2\2\2O\u00ce\3\2\2\2Q\u00d0\3\2\2\2S\u00d5\3\2\2\2U\u00da") buf.write("I\u00cd\3\2\2\2K\u00cf\3\2\2\2M\u00d1\3\2\2\2O\u00d3\3")
buf.write("\3\2\2\2W\u00f9\3\2\2\2Y\u010d\3\2\2\2[\\\7<\2\2\\\4\3") buf.write("\2\2\2Q\u00d5\3\2\2\2S\u00d7\3\2\2\2U\u00dc\3\2\2\2W\u00e1")
buf.write("\2\2\2]^\7I\2\2^_\7O\2\2_\6\3\2\2\2`a\7\61\2\2a\b\3\2") buf.write("\3\2\2\2Y\u0100\3\2\2\2[\u0114\3\2\2\2]^\7<\2\2^\4\3\2")
buf.write("\2\2bc\7J\2\2cd\7O\2\2d\n\3\2\2\2ef\7C\2\2fg\7O\2\2g\f") buf.write("\2\2_`\7I\2\2`a\7O\2\2a\6\3\2\2\2bc\7\61\2\2c\b\3\2\2")
buf.write("\3\2\2\2hi\7T\2\2ij\7O\2\2j\16\3\2\2\2kl\7T\2\2lm\7C\2") buf.write("\2de\7J\2\2ef\7O\2\2f\n\3\2\2\2gh\7C\2\2hi\7O\2\2i\f\3")
buf.write("\2m\20\3\2\2\2no\7T\2\2op\7Q\2\2p\22\3\2\2\2qr\7H\2\2") buf.write("\2\2\2jk\7T\2\2kl\7O\2\2l\16\3\2\2\2mn\7T\2\2no\7C\2\2")
buf.write("rs\7O\2\2s\24\3\2\2\2tu\7H\2\2uv\7I\2\2vw\7O\2\2w\26\3") buf.write("o\20\3\2\2\2pq\7T\2\2qr\7Q\2\2r\22\3\2\2\2st\7H\2\2tu")
buf.write("\2\2\2xy\7E\2\2yz\7O\2\2z\30\3\2\2\2{|\7I\2\2|}\7N\2\2") buf.write("\7O\2\2u\24\3\2\2\2vw\7H\2\2wx\7I\2\2xy\7O\2\2y\26\3\2")
buf.write("}\32\3\2\2\2~\177\7J\2\2\177\u0080\7N\2\2\u0080\34\3\2") buf.write("\2\2z{\7E\2\2{|\7O\2\2|\30\3\2\2\2}~\7I\2\2~\177\7N\2")
buf.write("\2\2\u0081\u0082\7C\2\2\u0082\u0083\7N\2\2\u0083\36\3") buf.write("\2\177\32\3\2\2\2\u0080\u0081\7J\2\2\u0081\u0082\7N\2")
buf.write("\2\2\2\u0084\u0085\7T\2\2\u0085\u0086\7N\2\2\u0086 \3") buf.write("\2\u0082\34\3\2\2\2\u0083\u0084\7C\2\2\u0084\u0085\7N")
buf.write("\2\2\2\u0087\u0088\7I\2\2\u0088\u0089\7D\2\2\u0089\"\3") buf.write("\2\2\u0085\36\3\2\2\2\u0086\u0087\7T\2\2\u0087\u0088\7")
buf.write("\2\2\2\u008a\u008b\7J\2\2\u008b\u008c\7D\2\2\u008c$\3") buf.write("N\2\2\u0088 \3\2\2\2\u0089\u008a\7I\2\2\u008a\u008b\7")
buf.write("\2\2\2\u008d\u008e\7C\2\2\u008e\u008f\7D\2\2\u008f&\3") buf.write("D\2\2\u008b\"\3\2\2\2\u008c\u008d\7J\2\2\u008d\u008e\7")
buf.write("\2\2\2\u0090\u0091\7T\2\2\u0091\u0092\7D\2\2\u0092(\3") buf.write("D\2\2\u008e$\3\2\2\2\u008f\u0090\7C\2\2\u0090\u0091\7")
buf.write("\2\2\2\u0093\u0094\7I\2\2\u0094\u0095\7U\2\2\u0095*\3") buf.write("D\2\2\u0091&\3\2\2\2\u0092\u0093\7T\2\2\u0093\u0094\7")
buf.write("\2\2\2\u0096\u0097\7J\2\2\u0097\u0098\7U\2\2\u0098,\3") buf.write("D\2\2\u0094(\3\2\2\2\u0095\u0096\7I\2\2\u0096\u0097\7")
buf.write("\2\2\2\u0099\u009a\7C\2\2\u009a\u009b\7U\2\2\u009b.\3") buf.write("U\2\2\u0097*\3\2\2\2\u0098\u0099\7J\2\2\u0099\u009a\7")
buf.write("\2\2\2\u009c\u009d\7T\2\2\u009d\u009e\7U\2\2\u009e\60") buf.write("U\2\2\u009a,\3\2\2\2\u009b\u009c\7C\2\2\u009c\u009d\7")
buf.write("\3\2\2\2\u009f\u00a0\7E\2\2\u00a0\u00a1\7R\2\2\u00a1\62") buf.write("U\2\2\u009d.\3\2\2\2\u009e\u009f\7T\2\2\u009f\u00a0\7")
buf.write("\3\2\2\2\u00a2\u00a3\7-\2\2\u00a3\64\3\2\2\2\u00a4\u00a5") buf.write("U\2\2\u00a0\60\3\2\2\2\u00a1\u00a2\7E\2\2\u00a2\u00a3")
buf.write("\7/\2\2\u00a5\66\3\2\2\2\u00a6\u00a7\7T\2\2\u00a7\u00a8") buf.write("\7R\2\2\u00a3\62\3\2\2\2\u00a4\u00a5\7-\2\2\u00a5\64\3")
buf.write("\7X\2\2\u00a88\3\2\2\2\u00a9\u00aa\7T\2\2\u00aa\u00ab") buf.write("\2\2\2\u00a6\u00a7\7/\2\2\u00a7\66\3\2\2\2\u00a8\u00a9")
buf.write("\7P\2\2\u00ab:\3\2\2\2\u00ac\u00ad\7I\2\2\u00ad\u00ae") buf.write("\7T\2\2\u00a9\u00aa\7X\2\2\u00aa8\3\2\2\2\u00ab\u00ac")
buf.write("\7M\2\2\u00ae<\3\2\2\2\u00af\u00b0\7J\2\2\u00b0\u00b1") buf.write("\7T\2\2\u00ac\u00ad\7P\2\2\u00ad:\3\2\2\2\u00ae\u00af")
buf.write("\7M\2\2\u00b1>\3\2\2\2\u00b2\u00b3\7T\2\2\u00b3\u00b4") buf.write("\7I\2\2\u00af\u00b0\7M\2\2\u00b0<\3\2\2\2\u00b1\u00b2")
buf.write("\7M\2\2\u00b4@\3\2\2\2\u00b5\u00b6\7.\2\2\u00b6B\3\2\2") buf.write("\7J\2\2\u00b2\u00b3\7M\2\2\u00b3>\3\2\2\2\u00b4\u00b5")
buf.write("\2\u00b7\u00b8\t\2\2\2\u00b8D\3\2\2\2\u00b9\u00bb\5C\"") buf.write("\7T\2\2\u00b5\u00b6\7M\2\2\u00b6@\3\2\2\2\u00b7\u00b8")
buf.write("\2\u00ba\u00b9\3\2\2\2\u00bb\u00bc\3\2\2\2\u00bc\u00ba") buf.write("\7Y\2\2\u00b8\u00b9\7C\2\2\u00b9\u00ba\7K\2\2\u00ba\u00bb")
buf.write("\3\2\2\2\u00bc\u00bd\3\2\2\2\u00bd\u00c4\3\2\2\2\u00be") buf.write("\7V\2\2\u00bbB\3\2\2\2\u00bc\u00bd\7.\2\2\u00bdD\3\2\2")
buf.write("\u00c0\7\60\2\2\u00bf\u00c1\5C\"\2\u00c0\u00bf\3\2\2\2") buf.write("\2\u00be\u00bf\t\2\2\2\u00bfF\3\2\2\2\u00c0\u00c2\5E#")
buf.write("\u00c1\u00c2\3\2\2\2\u00c2\u00c0\3\2\2\2\u00c2\u00c3\3") buf.write("\2\u00c1\u00c0\3\2\2\2\u00c2\u00c3\3\2\2\2\u00c3\u00c1")
buf.write("\2\2\2\u00c3\u00c5\3\2\2\2\u00c4\u00be\3\2\2\2\u00c4\u00c5") buf.write("\3\2\2\2\u00c3\u00c4\3\2\2\2\u00c4\u00cb\3\2\2\2\u00c5")
buf.write("\3\2\2\2\u00c5F\3\2\2\2\u00c6\u00c7\7@\2\2\u00c7H\3\2") buf.write("\u00c7\7\60\2\2\u00c6\u00c8\5E#\2\u00c7\u00c6\3\2\2\2")
buf.write("\2\2\u00c8\u00c9\7,\2\2\u00c9J\3\2\2\2\u00ca\u00cb\7v") buf.write("\u00c8\u00c9\3\2\2\2\u00c9\u00c7\3\2\2\2\u00c9\u00ca\3")
buf.write("\2\2\u00cbL\3\2\2\2\u00cc\u00cd\t\3\2\2\u00cdN\3\2\2\2") buf.write("\2\2\2\u00ca\u00cc\3\2\2\2\u00cb\u00c5\3\2\2\2\u00cb\u00cc")
buf.write("\u00ce\u00cf\t\4\2\2\u00cfP\3\2\2\2\u00d0\u00d1\7K\2\2") buf.write("\3\2\2\2\u00ccH\3\2\2\2\u00cd\u00ce\7@\2\2\u00ceJ\3\2")
buf.write("\u00d1\u00d2\7Q\2\2\u00d2\u00d3\7R\2\2\u00d3R\3\2\2\2") buf.write("\2\2\u00cf\u00d0\7,\2\2\u00d0L\3\2\2\2\u00d1\u00d2\7v")
buf.write("\u00d4\u00d6\7\17\2\2\u00d5\u00d4\3\2\2\2\u00d5\u00d6") buf.write("\2\2\u00d2N\3\2\2\2\u00d3\u00d4\t\3\2\2\u00d4P\3\2\2\2")
buf.write("\3\2\2\2\u00d6\u00d7\3\2\2\2\u00d7\u00d8\7\f\2\2\u00d8") buf.write("\u00d5\u00d6\t\4\2\2\u00d6R\3\2\2\2\u00d7\u00d8\7K\2\2")
buf.write("T\3\2\2\2\u00d9\u00db\t\5\2\2\u00da\u00d9\3\2\2\2\u00db") buf.write("\u00d8\u00d9\7Q\2\2\u00d9\u00da\7R\2\2\u00daT\3\2\2\2")
buf.write("\u00dc\3\2\2\2\u00dc\u00da\3\2\2\2\u00dc\u00dd\3\2\2\2") buf.write("\u00db\u00dd\7\17\2\2\u00dc\u00db\3\2\2\2\u00dc\u00dd")
buf.write("\u00dd\u00de\3\2\2\2\u00de\u00df\b+\2\2\u00dfV\3\2\2\2") buf.write("\3\2\2\2\u00dd\u00de\3\2\2\2\u00de\u00df\7\f\2\2\u00df")
buf.write("\u00e0\u00e1\7>\2\2\u00e1\u00e2\7#\2\2\u00e2\u00e3\7/") buf.write("V\3\2\2\2\u00e0\u00e2\t\5\2\2\u00e1\u00e0\3\2\2\2\u00e2")
buf.write("\2\2\u00e3\u00e4\7/\2\2\u00e4\u00e8\3\2\2\2\u00e5\u00e7") buf.write("\u00e3\3\2\2\2\u00e3\u00e1\3\2\2\2\u00e3\u00e4\3\2\2\2")
buf.write("\13\2\2\2\u00e6\u00e5\3\2\2\2\u00e7\u00ea\3\2\2\2\u00e8") buf.write("\u00e4\u00e5\3\2\2\2\u00e5\u00e6\b,\2\2\u00e6X\3\2\2\2")
buf.write("\u00e9\3\2\2\2\u00e8\u00e6\3\2\2\2\u00e9\u00eb\3\2\2\2") buf.write("\u00e7\u00e8\7>\2\2\u00e8\u00e9\7#\2\2\u00e9\u00ea\7/")
buf.write("\u00ea\u00e8\3\2\2\2\u00eb\u00ec\7/\2\2\u00ec\u00ed\7") buf.write("\2\2\u00ea\u00eb\7/\2\2\u00eb\u00ef\3\2\2\2\u00ec\u00ee")
buf.write("/\2\2\u00ed\u00fa\7@\2\2\u00ee\u00ef\7\61\2\2\u00ef\u00f0") buf.write("\13\2\2\2\u00ed\u00ec\3\2\2\2\u00ee\u00f1\3\2\2\2\u00ef")
buf.write("\7,\2\2\u00f0\u00f4\3\2\2\2\u00f1\u00f3\13\2\2\2\u00f2") buf.write("\u00f0\3\2\2\2\u00ef\u00ed\3\2\2\2\u00f0\u00f2\3\2\2\2")
buf.write("\u00f1\3\2\2\2\u00f3\u00f6\3\2\2\2\u00f4\u00f5\3\2\2\2") buf.write("\u00f1\u00ef\3\2\2\2\u00f2\u00f3\7/\2\2\u00f3\u00f4\7")
buf.write("\u00f4\u00f2\3\2\2\2\u00f5\u00f7\3\2\2\2\u00f6\u00f4\3") buf.write("/\2\2\u00f4\u0101\7@\2\2\u00f5\u00f6\7\61\2\2\u00f6\u00f7")
buf.write("\2\2\2\u00f7\u00f8\7,\2\2\u00f8\u00fa\7\61\2\2\u00f9\u00e0") buf.write("\7,\2\2\u00f7\u00fb\3\2\2\2\u00f8\u00fa\13\2\2\2\u00f9")
buf.write("\3\2\2\2\u00f9\u00ee\3\2\2\2\u00fa\u00fb\3\2\2\2\u00fb") buf.write("\u00f8\3\2\2\2\u00fa\u00fd\3\2\2\2\u00fb\u00fc\3\2\2\2")
buf.write("\u00fc\b,\2\2\u00fcX\3\2\2\2\u00fd\u00fe\7\61\2\2\u00fe") buf.write("\u00fb\u00f9\3\2\2\2\u00fc\u00fe\3\2\2\2\u00fd\u00fb\3")
buf.write("\u00ff\7\61\2\2\u00ff\u0103\3\2\2\2\u0100\u0102\n\6\2") buf.write("\2\2\2\u00fe\u00ff\7,\2\2\u00ff\u0101\7\61\2\2\u0100\u00e7")
buf.write("\2\u0101\u0100\3\2\2\2\u0102\u0105\3\2\2\2\u0103\u0101") buf.write("\3\2\2\2\u0100\u00f5\3\2\2\2\u0101\u0102\3\2\2\2\u0102")
buf.write("\3\2\2\2\u0103\u0104\3\2\2\2\u0104\u010e\3\2\2\2\u0105") buf.write("\u0103\b-\2\2\u0103Z\3\2\2\2\u0104\u0105\7\61\2\2\u0105")
buf.write("\u0103\3\2\2\2\u0106\u010a\7%\2\2\u0107\u0109\n\6\2\2") buf.write("\u0106\7\61\2\2\u0106\u010a\3\2\2\2\u0107\u0109\n\6\2")
buf.write("\u0108\u0107\3\2\2\2\u0109\u010c\3\2\2\2\u010a\u0108\3") buf.write("\2\u0108\u0107\3\2\2\2\u0109\u010c\3\2\2\2\u010a\u0108")
buf.write("\2\2\2\u010a\u010b\3\2\2\2\u010b\u010e\3\2\2\2\u010c\u010a") buf.write("\3\2\2\2\u010a\u010b\3\2\2\2\u010b\u0115\3\2\2\2\u010c")
buf.write("\3\2\2\2\u010d\u00fd\3\2\2\2\u010d\u0106\3\2\2\2\u010e") buf.write("\u010a\3\2\2\2\u010d\u0111\7%\2\2\u010e\u0110\n\6\2\2")
buf.write("\u010f\3\2\2\2\u010f\u0110\b-\2\2\u0110Z\3\2\2\2\16\2") buf.write("\u010f\u010e\3\2\2\2\u0110\u0113\3\2\2\2\u0111\u010f\3")
buf.write("\u00bc\u00c2\u00c4\u00d5\u00dc\u00e8\u00f4\u00f9\u0103") buf.write("\2\2\2\u0111\u0112\3\2\2\2\u0112\u0115\3\2\2\2\u0113\u0111")
buf.write("\u010a\u010d\3\b\2\2") buf.write("\3\2\2\2\u0114\u0104\3\2\2\2\u0114\u010d\3\2\2\2\u0115")
buf.write("\u0116\3\2\2\2\u0116\u0117\b.\2\2\u0117\\\3\2\2\2\16\2")
buf.write("\u00c3\u00c9\u00cb\u00dc\u00e3\u00ef\u00fb\u0100\u010a")
buf.write("\u0111\u0114\3\b\2\2")
return buf.getvalue() return buf.getvalue()
@ -160,17 +163,18 @@ class CommentMacroLexer(Lexer):
T__29 = 30 T__29 = 30
T__30 = 31 T__30 = 31
T__31 = 32 T__31 = 32
NUMBER = 33 T__32 = 33
THRU = 34 NUMBER = 34
CURRENT = 35 THRU = 35
TIME = 36 CURRENT = 36
WHOLEHOG = 37 TIME = 37
DP8K = 38 WHOLEHOG = 38
IOP = 39 DP8K = 39
NEWLINE = 40 IOP = 40
WS = 41 NEWLINE = 41
COMMENT = 42 WS = 42
LINE_COMMENT = 43 COMMENT = 43
LINE_COMMENT = 44
channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]
@ -180,8 +184,8 @@ class CommentMacroLexer(Lexer):
"':'", "'GM'", "'/'", "'HM'", "'AM'", "'RM'", "'RA'", "'RO'", "':'", "'GM'", "'/'", "'HM'", "'AM'", "'RM'", "'RA'", "'RO'",
"'FM'", "'FGM'", "'CM'", "'GL'", "'HL'", "'AL'", "'RL'", "'GB'", "'FM'", "'FGM'", "'CM'", "'GL'", "'HL'", "'AL'", "'RL'", "'GB'",
"'HB'", "'AB'", "'RB'", "'GS'", "'HS'", "'AS'", "'RS'", "'CP'", "'HB'", "'AB'", "'RB'", "'GS'", "'HS'", "'AS'", "'RS'", "'CP'",
"'+'", "'-'", "'RV'", "'RN'", "'GK'", "'HK'", "'RK'", "','", "'+'", "'-'", "'RV'", "'RN'", "'GK'", "'HK'", "'RK'", "'WAIT'",
"'>'", "'*'", "'t'", "'IOP'" ] "','", "'>'", "'*'", "'t'", "'IOP'" ]
symbolicNames = [ "<INVALID>", symbolicNames = [ "<INVALID>",
"NUMBER", "THRU", "CURRENT", "TIME", "WHOLEHOG", "DP8K", "IOP", "NUMBER", "THRU", "CURRENT", "TIME", "WHOLEHOG", "DP8K", "IOP",
@ -192,8 +196,9 @@ class CommentMacroLexer(Lexer):
"T__14", "T__15", "T__16", "T__17", "T__18", "T__19", "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__20", "T__21", "T__22", "T__23", "T__24", "T__25",
"T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31",
"DIGIT", "NUMBER", "THRU", "CURRENT", "TIME", "WHOLEHOG", "T__32", "DIGIT", "NUMBER", "THRU", "CURRENT", "TIME",
"DP8K", "IOP", "NEWLINE", "WS", "COMMENT", "LINE_COMMENT" ] "WHOLEHOG", "DP8K", "IOP", "NEWLINE", "WS", "COMMENT",
"LINE_COMMENT" ]
grammarFileName = "CommentMacro.g4" grammarFileName = "CommentMacro.g4"

View File

@ -305,6 +305,15 @@ class CommentMacroListener(ParseTreeListener):
pass pass
# Enter a parse tree produced by CommentMacroParser#Wait.
def enterWait(self, ctx:CommentMacroParser.WaitContext):
pass
# Exit a parse tree produced by CommentMacroParser#Wait.
def exitWait(self, ctx:CommentMacroParser.WaitContext):
pass
# Enter a parse tree produced by CommentMacroParser#time. # Enter a parse tree produced by CommentMacroParser#time.
def enterTime(self, ctx:CommentMacroParser.TimeContext): def enterTime(self, ctx:CommentMacroParser.TimeContext):
pass pass

View File

@ -7,8 +7,8 @@ import sys
def serializedATN(): def serializedATN():
with StringIO() as buf: with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3-") buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3.")
buf.write("\u00f9\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("\u00fb\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\6\2\26\n\2\r\2\16\2\27\3") buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\3\2\6\2\26\n\2\r\2\16\2\27\3")
buf.write("\2\3\2\3\3\3\3\3\3\7\3\37\n\3\f\3\16\3\"\13\3\3\3\5\3") buf.write("\2\3\2\3\3\3\3\3\3\7\3\37\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\60\n\4") buf.write("%\n\3\3\3\5\3(\n\3\3\4\3\4\3\4\5\4-\n\4\3\4\5\4\60\n\4")
@ -27,105 +27,106 @@ def serializedATN():
buf.write("\u00bc\n\4\3\4\3\4\3\4\5\4\u00c1\n\4\3\4\3\4\3\4\5\4\u00c6") buf.write("\u00bc\n\4\3\4\3\4\3\4\5\4\u00c1\n\4\3\4\3\4\3\4\5\4\u00c6")
buf.write("\n\4\3\4\3\4\3\4\5\4\u00cb\n\4\3\4\3\4\3\4\3\4\3\4\5\4") buf.write("\n\4\3\4\3\4\3\4\5\4\u00cb\n\4\3\4\3\4\3\4\3\4\3\4\5\4")
buf.write("\u00d2\n\4\3\4\3\4\3\4\5\4\u00d7\n\4\3\4\3\4\3\4\5\4\u00dc") buf.write("\u00d2\n\4\3\4\3\4\3\4\5\4\u00d7\n\4\3\4\3\4\3\4\5\4\u00dc")
buf.write("\n\4\5\4\u00de\n\4\3\5\3\5\3\5\3\6\3\6\3\6\3\7\3\7\3\b") buf.write("\n\4\3\4\3\4\5\4\u00e0\n\4\3\5\3\5\3\5\3\6\3\6\3\6\3\7")
buf.write("\3\b\5\b\u00ea\n\b\3\b\3\b\7\b\u00ee\n\b\f\b\16\b\u00f1") buf.write("\3\7\3\b\3\b\5\b\u00ec\n\b\3\b\3\b\7\b\u00f0\n\b\f\b\16")
buf.write("\13\b\3\t\3\t\3\t\3\t\3\n\3\n\3\n\2\2\13\2\4\6\b\n\f\16") buf.write("\b\u00f3\13\b\3\t\3\t\3\t\3\t\3\n\3\n\3\n\2\2\13\2\4\6")
buf.write("\20\22\2\3\3\2\')\2\u0139\2\25\3\2\2\2\4\'\3\2\2\2\6\u00dd") buf.write("\b\n\f\16\20\22\2\3\3\2(*\2\u013c\2\25\3\2\2\2\4\'\3\2")
buf.write("\3\2\2\2\b\u00df\3\2\2\2\n\u00e2\3\2\2\2\f\u00e5\3\2\2") buf.write("\2\2\6\u00df\3\2\2\2\b\u00e1\3\2\2\2\n\u00e4\3\2\2\2\f")
buf.write("\2\16\u00e9\3\2\2\2\20\u00f2\3\2\2\2\22\u00f6\3\2\2\2") buf.write("\u00e7\3\2\2\2\16\u00eb\3\2\2\2\20\u00f4\3\2\2\2\22\u00f8")
buf.write("\24\26\5\4\3\2\25\24\3\2\2\2\26\27\3\2\2\2\27\25\3\2\2") buf.write("\3\2\2\2\24\26\5\4\3\2\25\24\3\2\2\2\26\27\3\2\2\2\27")
buf.write("\2\27\30\3\2\2\2\30\31\3\2\2\2\31\32\7\2\2\3\32\3\3\2") buf.write("\25\3\2\2\2\27\30\3\2\2\2\30\31\3\2\2\2\31\32\7\2\2\3")
buf.write("\2\2\33 \5\6\4\2\34\35\7\3\2\2\35\37\5\6\4\2\36\34\3\2") buf.write("\32\3\3\2\2\2\33 \5\6\4\2\34\35\7\3\2\2\35\37\5\6\4\2")
buf.write("\2\2\37\"\3\2\2\2 \36\3\2\2\2 !\3\2\2\2!$\3\2\2\2\" \3") buf.write("\36\34\3\2\2\2\37\"\3\2\2\2 \36\3\2\2\2 !\3\2\2\2!$\3")
buf.write("\2\2\2#%\7*\2\2$#\3\2\2\2$%\3\2\2\2%(\3\2\2\2&(\7*\2\2") buf.write("\2\2\2\" \3\2\2\2#%\7+\2\2$#\3\2\2\2$%\3\2\2\2%(\3\2\2")
buf.write("\'\33\3\2\2\2\'&\3\2\2\2(\5\3\2\2\2),\7\4\2\2*-\5\16\b") buf.write("\2&(\7+\2\2\'\33\3\2\2\2\'&\3\2\2\2(\5\3\2\2\2),\7\4\2")
buf.write("\2+-\7%\2\2,*\3\2\2\2,+\3\2\2\2-/\3\2\2\2.\60\5\n\6\2") buf.write("\2*-\5\16\b\2+-\7&\2\2,*\3\2\2\2,+\3\2\2\2-/\3\2\2\2.")
buf.write("/.\3\2\2\2/\60\3\2\2\2\60\u00de\3\2\2\2\61\64\7\4\2\2") buf.write("\60\5\n\6\2/.\3\2\2\2/\60\3\2\2\2\60\u00e0\3\2\2\2\61")
buf.write("\62\65\5\16\b\2\63\65\7%\2\2\64\62\3\2\2\2\64\63\3\2\2") buf.write("\64\7\4\2\2\62\65\5\16\b\2\63\65\7&\2\2\64\62\3\2\2\2")
buf.write("\2\65\66\3\2\2\2\66\67\7\5\2\2\679\5\22\n\28:\5\n\6\2") buf.write("\64\63\3\2\2\2\65\66\3\2\2\2\66\67\7\5\2\2\679\5\22\n")
buf.write("98\3\2\2\29:\3\2\2\2:\u00de\3\2\2\2;>\7\6\2\2<?\5\16\b") buf.write("\28:\5\n\6\298\3\2\2\29:\3\2\2\2:\u00e0\3\2\2\2;>\7\6")
buf.write("\2=?\7%\2\2><\3\2\2\2>=\3\2\2\2?A\3\2\2\2@B\5\n\6\2A@") buf.write("\2\2<?\5\16\b\2=?\7&\2\2><\3\2\2\2>=\3\2\2\2?A\3\2\2\2")
buf.write("\3\2\2\2AB\3\2\2\2B\u00de\3\2\2\2CF\7\7\2\2DG\5\16\b\2") buf.write("@B\5\n\6\2A@\3\2\2\2AB\3\2\2\2B\u00e0\3\2\2\2CF\7\7\2")
buf.write("EG\7%\2\2FD\3\2\2\2FE\3\2\2\2GI\3\2\2\2HJ\5\n\6\2IH\3") buf.write("\2DG\5\16\b\2EG\7&\2\2FD\3\2\2\2FE\3\2\2\2GI\3\2\2\2H")
buf.write("\2\2\2IJ\3\2\2\2J\u00de\3\2\2\2KN\7\b\2\2LO\5\16\b\2M") buf.write("J\5\n\6\2IH\3\2\2\2IJ\3\2\2\2J\u00e0\3\2\2\2KN\7\b\2\2")
buf.write("O\7%\2\2NL\3\2\2\2NM\3\2\2\2OQ\3\2\2\2PR\5\n\6\2QP\3\2") buf.write("LO\5\16\b\2MO\7&\2\2NL\3\2\2\2NM\3\2\2\2OQ\3\2\2\2PR\5")
buf.write("\2\2QR\3\2\2\2R\u00de\3\2\2\2SU\7\t\2\2TV\5\n\6\2UT\3") buf.write("\n\6\2QP\3\2\2\2QR\3\2\2\2R\u00e0\3\2\2\2SU\7\t\2\2TV")
buf.write("\2\2\2UV\3\2\2\2V\u00de\3\2\2\2WY\7\n\2\2XZ\5\n\6\2YX") buf.write("\5\n\6\2UT\3\2\2\2UV\3\2\2\2V\u00e0\3\2\2\2WY\7\n\2\2")
buf.write("\3\2\2\2YZ\3\2\2\2Z\u00de\3\2\2\2[^\7\13\2\2\\_\5\16\b") buf.write("XZ\5\n\6\2YX\3\2\2\2YZ\3\2\2\2Z\u00e0\3\2\2\2[^\7\13\2")
buf.write("\2]_\7%\2\2^\\\3\2\2\2^]\3\2\2\2_`\3\2\2\2`a\7\5\2\2a") buf.write("\2\\_\5\16\b\2]_\7&\2\2^\\\3\2\2\2^]\3\2\2\2_`\3\2\2\2")
buf.write("c\5\22\n\2bd\5\b\5\2cb\3\2\2\2cd\3\2\2\2df\3\2\2\2eg\5") buf.write("`a\7\5\2\2ac\5\22\n\2bd\5\b\5\2cb\3\2\2\2cd\3\2\2\2df")
buf.write("\n\6\2fe\3\2\2\2fg\3\2\2\2g\u00de\3\2\2\2hi\7\f\2\2ik") buf.write("\3\2\2\2eg\5\n\6\2fe\3\2\2\2fg\3\2\2\2g\u00e0\3\2\2\2")
buf.write("\5\22\n\2jl\5\b\5\2kj\3\2\2\2kl\3\2\2\2ln\3\2\2\2mo\5") buf.write("hi\7\f\2\2ik\5\22\n\2jl\5\b\5\2kj\3\2\2\2kl\3\2\2\2ln")
buf.write("\n\6\2nm\3\2\2\2no\3\2\2\2o\u00de\3\2\2\2pq\7\r\2\2qs") buf.write("\3\2\2\2mo\5\n\6\2nm\3\2\2\2no\3\2\2\2o\u00e0\3\2\2\2")
buf.write("\5\22\n\2rt\5\n\6\2sr\3\2\2\2st\3\2\2\2t\u00de\3\2\2\2") buf.write("pq\7\r\2\2qs\5\22\n\2rt\5\n\6\2sr\3\2\2\2st\3\2\2\2t\u00e0")
buf.write("uv\7\16\2\2vx\5\16\b\2wy\5\n\6\2xw\3\2\2\2xy\3\2\2\2y") buf.write("\3\2\2\2uv\7\16\2\2vx\5\16\b\2wy\5\n\6\2xw\3\2\2\2xy\3")
buf.write("\u00de\3\2\2\2z{\7\16\2\2{|\5\16\b\2|}\7\5\2\2}\177\5") buf.write("\2\2\2y\u00e0\3\2\2\2z{\7\16\2\2{|\5\16\b\2|}\7\5\2\2")
buf.write("\22\n\2~\u0080\5\n\6\2\177~\3\2\2\2\177\u0080\3\2\2\2") buf.write("}\177\5\22\n\2~\u0080\5\n\6\2\177~\3\2\2\2\177\u0080\3")
buf.write("\u0080\u00de\3\2\2\2\u0081\u0082\7\17\2\2\u0082\u0084") buf.write("\2\2\2\u0080\u00e0\3\2\2\2\u0081\u0082\7\17\2\2\u0082")
buf.write("\5\16\b\2\u0083\u0085\5\n\6\2\u0084\u0083\3\2\2\2\u0084") buf.write("\u0084\5\16\b\2\u0083\u0085\5\n\6\2\u0084\u0083\3\2\2")
buf.write("\u0085\3\2\2\2\u0085\u00de\3\2\2\2\u0086\u0087\7\20\2") buf.write("\2\u0084\u0085\3\2\2\2\u0085\u00e0\3\2\2\2\u0086\u0087")
buf.write("\2\u0087\u0089\5\16\b\2\u0088\u008a\5\n\6\2\u0089\u0088") buf.write("\7\20\2\2\u0087\u0089\5\16\b\2\u0088\u008a\5\n\6\2\u0089")
buf.write("\3\2\2\2\u0089\u008a\3\2\2\2\u008a\u00de\3\2\2\2\u008b") buf.write("\u0088\3\2\2\2\u0089\u008a\3\2\2\2\u008a\u00e0\3\2\2\2")
buf.write("\u008c\7\21\2\2\u008c\u008e\5\16\b\2\u008d\u008f\5\n\6") buf.write("\u008b\u008c\7\21\2\2\u008c\u008e\5\16\b\2\u008d\u008f")
buf.write("\2\u008e\u008d\3\2\2\2\u008e\u008f\3\2\2\2\u008f\u00de") buf.write("\5\n\6\2\u008e\u008d\3\2\2\2\u008e\u008f\3\2\2\2\u008f")
buf.write("\3\2\2\2\u0090\u0091\7\22\2\2\u0091\u0093\5\16\b\2\u0092") buf.write("\u00e0\3\2\2\2\u0090\u0091\7\22\2\2\u0091\u0093\5\16\b")
buf.write("\u0094\5\n\6\2\u0093\u0092\3\2\2\2\u0093\u0094\3\2\2\2") buf.write("\2\u0092\u0094\5\n\6\2\u0093\u0092\3\2\2\2\u0093\u0094")
buf.write("\u0094\u00de\3\2\2\2\u0095\u0096\7\23\2\2\u0096\u0098") buf.write("\3\2\2\2\u0094\u00e0\3\2\2\2\u0095\u0096\7\23\2\2\u0096")
buf.write("\5\16\b\2\u0097\u0099\5\n\6\2\u0098\u0097\3\2\2\2\u0098") buf.write("\u0098\5\16\b\2\u0097\u0099\5\n\6\2\u0098\u0097\3\2\2")
buf.write("\u0099\3\2\2\2\u0099\u00de\3\2\2\2\u009a\u009b\7\24\2") buf.write("\2\u0098\u0099\3\2\2\2\u0099\u00e0\3\2\2\2\u009a\u009b")
buf.write("\2\u009b\u009d\5\16\b\2\u009c\u009e\5\n\6\2\u009d\u009c") buf.write("\7\24\2\2\u009b\u009d\5\16\b\2\u009c\u009e\5\n\6\2\u009d")
buf.write("\3\2\2\2\u009d\u009e\3\2\2\2\u009e\u00de\3\2\2\2\u009f") buf.write("\u009c\3\2\2\2\u009d\u009e\3\2\2\2\u009e\u00e0\3\2\2\2")
buf.write("\u00a0\7\25\2\2\u00a0\u00a2\5\16\b\2\u00a1\u00a3\5\n\6") buf.write("\u009f\u00a0\7\25\2\2\u00a0\u00a2\5\16\b\2\u00a1\u00a3")
buf.write("\2\u00a2\u00a1\3\2\2\2\u00a2\u00a3\3\2\2\2\u00a3\u00de") buf.write("\5\n\6\2\u00a2\u00a1\3\2\2\2\u00a2\u00a3\3\2\2\2\u00a3")
buf.write("\3\2\2\2\u00a4\u00a5\7\26\2\2\u00a5\u00a7\5\16\b\2\u00a6") buf.write("\u00e0\3\2\2\2\u00a4\u00a5\7\26\2\2\u00a5\u00a7\5\16\b")
buf.write("\u00a8\5\n\6\2\u00a7\u00a6\3\2\2\2\u00a7\u00a8\3\2\2\2") buf.write("\2\u00a6\u00a8\5\n\6\2\u00a7\u00a6\3\2\2\2\u00a7\u00a8")
buf.write("\u00a8\u00de\3\2\2\2\u00a9\u00aa\7\27\2\2\u00aa\u00ac") buf.write("\3\2\2\2\u00a8\u00e0\3\2\2\2\u00a9\u00aa\7\27\2\2\u00aa")
buf.write("\5\16\b\2\u00ab\u00ad\5\n\6\2\u00ac\u00ab\3\2\2\2\u00ac") buf.write("\u00ac\5\16\b\2\u00ab\u00ad\5\n\6\2\u00ac\u00ab\3\2\2")
buf.write("\u00ad\3\2\2\2\u00ad\u00de\3\2\2\2\u00ae\u00af\7\30\2") buf.write("\2\u00ac\u00ad\3\2\2\2\u00ad\u00e0\3\2\2\2\u00ae\u00af")
buf.write("\2\u00af\u00b1\5\16\b\2\u00b0\u00b2\5\n\6\2\u00b1\u00b0") buf.write("\7\30\2\2\u00af\u00b1\5\16\b\2\u00b0\u00b2\5\n\6\2\u00b1")
buf.write("\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2\u00de\3\2\2\2\u00b3") buf.write("\u00b0\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2\u00e0\3\2\2\2")
buf.write("\u00b4\7\31\2\2\u00b4\u00b6\5\16\b\2\u00b5\u00b7\5\n\6") buf.write("\u00b3\u00b4\7\31\2\2\u00b4\u00b6\5\16\b\2\u00b5\u00b7")
buf.write("\2\u00b6\u00b5\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7\u00de") buf.write("\5\n\6\2\u00b6\u00b5\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7")
buf.write("\3\2\2\2\u00b8\u00b9\7\32\2\2\u00b9\u00bb\5\22\n\2\u00ba") buf.write("\u00e0\3\2\2\2\u00b8\u00b9\7\32\2\2\u00b9\u00bb\5\22\n")
buf.write("\u00bc\5\n\6\2\u00bb\u00ba\3\2\2\2\u00bb\u00bc\3\2\2\2") buf.write("\2\u00ba\u00bc\5\n\6\2\u00bb\u00ba\3\2\2\2\u00bb\u00bc")
buf.write("\u00bc\u00de\3\2\2\2\u00bd\u00be\7\32\2\2\u00be\u00c0") buf.write("\3\2\2\2\u00bc\u00e0\3\2\2\2\u00bd\u00be\7\32\2\2\u00be")
buf.write("\7\33\2\2\u00bf\u00c1\5\n\6\2\u00c0\u00bf\3\2\2\2\u00c0") buf.write("\u00c0\7\33\2\2\u00bf\u00c1\5\n\6\2\u00c0\u00bf\3\2\2")
buf.write("\u00c1\3\2\2\2\u00c1\u00de\3\2\2\2\u00c2\u00c3\7\32\2") buf.write("\2\u00c0\u00c1\3\2\2\2\u00c1\u00e0\3\2\2\2\u00c2\u00c3")
buf.write("\2\u00c3\u00c5\7\34\2\2\u00c4\u00c6\5\n\6\2\u00c5\u00c4") buf.write("\7\32\2\2\u00c3\u00c5\7\34\2\2\u00c4\u00c6\5\n\6\2\u00c5")
buf.write("\3\2\2\2\u00c5\u00c6\3\2\2\2\u00c6\u00de\3\2\2\2\u00c7") buf.write("\u00c4\3\2\2\2\u00c5\u00c6\3\2\2\2\u00c6\u00e0\3\2\2\2")
buf.write("\u00c8\7\35\2\2\u00c8\u00ca\5\22\n\2\u00c9\u00cb\5\n\6") buf.write("\u00c7\u00c8\7\35\2\2\u00c8\u00ca\5\22\n\2\u00c9\u00cb")
buf.write("\2\u00ca\u00c9\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb\u00de") buf.write("\5\n\6\2\u00ca\u00c9\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb")
buf.write("\3\2\2\2\u00cc\u00cd\7\36\2\2\u00cd\u00de\5\n\6\2\u00ce") buf.write("\u00e0\3\2\2\2\u00cc\u00cd\7\36\2\2\u00cd\u00e0\5\n\6")
buf.write("\u00cf\7\37\2\2\u00cf\u00d1\5\16\b\2\u00d0\u00d2\5\n\6") buf.write("\2\u00ce\u00cf\7\37\2\2\u00cf\u00d1\5\16\b\2\u00d0\u00d2")
buf.write("\2\u00d1\u00d0\3\2\2\2\u00d1\u00d2\3\2\2\2\u00d2\u00de") buf.write("\5\n\6\2\u00d1\u00d0\3\2\2\2\u00d1\u00d2\3\2\2\2\u00d2")
buf.write("\3\2\2\2\u00d3\u00d4\7 \2\2\u00d4\u00d6\5\16\b\2\u00d5") buf.write("\u00e0\3\2\2\2\u00d3\u00d4\7 \2\2\u00d4\u00d6\5\16\b\2")
buf.write("\u00d7\5\n\6\2\u00d6\u00d5\3\2\2\2\u00d6\u00d7\3\2\2\2") buf.write("\u00d5\u00d7\5\n\6\2\u00d6\u00d5\3\2\2\2\u00d6\u00d7\3")
buf.write("\u00d7\u00de\3\2\2\2\u00d8\u00d9\7!\2\2\u00d9\u00db\5") buf.write("\2\2\2\u00d7\u00e0\3\2\2\2\u00d8\u00d9\7!\2\2\u00d9\u00db")
buf.write("\16\b\2\u00da\u00dc\5\n\6\2\u00db\u00da\3\2\2\2\u00db") buf.write("\5\16\b\2\u00da\u00dc\5\n\6\2\u00db\u00da\3\2\2\2\u00db")
buf.write("\u00dc\3\2\2\2\u00dc\u00de\3\2\2\2\u00dd)\3\2\2\2\u00dd") buf.write("\u00dc\3\2\2\2\u00dc\u00e0\3\2\2\2\u00dd\u00de\7\"\2\2")
buf.write("\61\3\2\2\2\u00dd;\3\2\2\2\u00ddC\3\2\2\2\u00ddK\3\2\2") buf.write("\u00de\u00e0\5\22\n\2\u00df)\3\2\2\2\u00df\61\3\2\2\2")
buf.write("\2\u00ddS\3\2\2\2\u00ddW\3\2\2\2\u00dd[\3\2\2\2\u00dd") buf.write("\u00df;\3\2\2\2\u00dfC\3\2\2\2\u00dfK\3\2\2\2\u00dfS\3")
buf.write("h\3\2\2\2\u00ddp\3\2\2\2\u00ddu\3\2\2\2\u00ddz\3\2\2\2") buf.write("\2\2\2\u00dfW\3\2\2\2\u00df[\3\2\2\2\u00dfh\3\2\2\2\u00df")
buf.write("\u00dd\u0081\3\2\2\2\u00dd\u0086\3\2\2\2\u00dd\u008b\3") buf.write("p\3\2\2\2\u00dfu\3\2\2\2\u00dfz\3\2\2\2\u00df\u0081\3")
buf.write("\2\2\2\u00dd\u0090\3\2\2\2\u00dd\u0095\3\2\2\2\u00dd\u009a") buf.write("\2\2\2\u00df\u0086\3\2\2\2\u00df\u008b\3\2\2\2\u00df\u0090")
buf.write("\3\2\2\2\u00dd\u009f\3\2\2\2\u00dd\u00a4\3\2\2\2\u00dd") buf.write("\3\2\2\2\u00df\u0095\3\2\2\2\u00df\u009a\3\2\2\2\u00df")
buf.write("\u00a9\3\2\2\2\u00dd\u00ae\3\2\2\2\u00dd\u00b3\3\2\2\2") buf.write("\u009f\3\2\2\2\u00df\u00a4\3\2\2\2\u00df\u00a9\3\2\2\2")
buf.write("\u00dd\u00b8\3\2\2\2\u00dd\u00bd\3\2\2\2\u00dd\u00c2\3") buf.write("\u00df\u00ae\3\2\2\2\u00df\u00b3\3\2\2\2\u00df\u00b8\3")
buf.write("\2\2\2\u00dd\u00c7\3\2\2\2\u00dd\u00cc\3\2\2\2\u00dd\u00ce") buf.write("\2\2\2\u00df\u00bd\3\2\2\2\u00df\u00c2\3\2\2\2\u00df\u00c7")
buf.write("\3\2\2\2\u00dd\u00d3\3\2\2\2\u00dd\u00d8\3\2\2\2\u00de") buf.write("\3\2\2\2\u00df\u00cc\3\2\2\2\u00df\u00ce\3\2\2\2\u00df")
buf.write("\7\3\2\2\2\u00df\u00e0\7&\2\2\u00e0\u00e1\5\22\n\2\u00e1") buf.write("\u00d3\3\2\2\2\u00df\u00d8\3\2\2\2\u00df\u00dd\3\2\2\2")
buf.write("\t\3\2\2\2\u00e2\u00e3\5\f\7\2\u00e3\u00e4\5\22\n\2\u00e4") buf.write("\u00e0\7\3\2\2\2\u00e1\u00e2\7\'\2\2\u00e2\u00e3\5\22")
buf.write("\13\3\2\2\2\u00e5\u00e6\t\2\2\2\u00e6\r\3\2\2\2\u00e7") buf.write("\n\2\u00e3\t\3\2\2\2\u00e4\u00e5\5\f\7\2\u00e5\u00e6\5")
buf.write("\u00ea\5\22\n\2\u00e8\u00ea\5\20\t\2\u00e9\u00e7\3\2\2") buf.write("\22\n\2\u00e6\13\3\2\2\2\u00e7\u00e8\t\2\2\2\u00e8\r\3")
buf.write("\2\u00e9\u00e8\3\2\2\2\u00ea\u00ef\3\2\2\2\u00eb\u00ec") buf.write("\2\2\2\u00e9\u00ec\5\22\n\2\u00ea\u00ec\5\20\t\2\u00eb")
buf.write("\7\"\2\2\u00ec\u00ee\5\16\b\2\u00ed\u00eb\3\2\2\2\u00ee") buf.write("\u00e9\3\2\2\2\u00eb\u00ea\3\2\2\2\u00ec\u00f1\3\2\2\2")
buf.write("\u00f1\3\2\2\2\u00ef\u00ed\3\2\2\2\u00ef\u00f0\3\2\2\2") buf.write("\u00ed\u00ee\7#\2\2\u00ee\u00f0\5\16\b\2\u00ef\u00ed\3")
buf.write("\u00f0\17\3\2\2\2\u00f1\u00ef\3\2\2\2\u00f2\u00f3\5\22") buf.write("\2\2\2\u00f0\u00f3\3\2\2\2\u00f1\u00ef\3\2\2\2\u00f1\u00f2")
buf.write("\n\2\u00f3\u00f4\7$\2\2\u00f4\u00f5\5\22\n\2\u00f5\21") buf.write("\3\2\2\2\u00f2\17\3\2\2\2\u00f3\u00f1\3\2\2\2\u00f4\u00f5")
buf.write("\3\2\2\2\u00f6\u00f7\7#\2\2\u00f7\23\3\2\2\2/\27 $\',") buf.write("\5\22\n\2\u00f5\u00f6\7%\2\2\u00f6\u00f7\5\22\n\2\u00f7")
buf.write("/\649>AFINQUY^cfknsx\177\u0084\u0089\u008e\u0093\u0098") buf.write("\21\3\2\2\2\u00f8\u00f9\7$\2\2\u00f9\23\3\2\2\2/\27 $")
buf.write("\',/\649>AFINQUY^cfknsx\177\u0084\u0089\u008e\u0093\u0098")
buf.write("\u009d\u00a2\u00a7\u00ac\u00b1\u00b6\u00bb\u00c0\u00c5") buf.write("\u009d\u00a2\u00a7\u00ac\u00b1\u00b6\u00bb\u00c0\u00c5")
buf.write("\u00ca\u00d1\u00d6\u00db\u00dd\u00e9\u00ef") buf.write("\u00ca\u00d1\u00d6\u00db\u00df\u00eb\u00f1")
return buf.getvalue() return buf.getvalue()
@ -143,8 +144,9 @@ class CommentMacroParser ( Parser ):
"'RM'", "'RA'", "'RO'", "'FM'", "'FGM'", "'CM'", "'GL'", "'RM'", "'RA'", "'RO'", "'FM'", "'FGM'", "'CM'", "'GL'",
"'HL'", "'AL'", "'RL'", "'GB'", "'HB'", "'AB'", "'RB'", "'HL'", "'AL'", "'RL'", "'GB'", "'HB'", "'AB'", "'RB'",
"'GS'", "'HS'", "'AS'", "'RS'", "'CP'", "'+'", "'-'", "'GS'", "'HS'", "'AS'", "'RS'", "'CP'", "'+'", "'-'",
"'RV'", "'RN'", "'GK'", "'HK'", "'RK'", "','", "<INVALID>", "'RV'", "'RN'", "'GK'", "'HK'", "'RK'", "'WAIT'", "','",
"'>'", "'*'", "'t'", "<INVALID>", "<INVALID>", "'IOP'" ] "<INVALID>", "'>'", "'*'", "'t'", "<INVALID>", "<INVALID>",
"'IOP'" ]
symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
@ -154,9 +156,9 @@ class CommentMacroParser ( Parser ):
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
"<INVALID>", "NUMBER", "THRU", "CURRENT", "TIME", "<INVALID>", "<INVALID>", "NUMBER", "THRU", "CURRENT",
"WHOLEHOG", "DP8K", "IOP", "NEWLINE", "WS", "COMMENT", "TIME", "WHOLEHOG", "DP8K", "IOP", "NEWLINE", "WS",
"LINE_COMMENT" ] "COMMENT", "LINE_COMMENT" ]
RULE_prog = 0 RULE_prog = 0
RULE_statement = 1 RULE_statement = 1
@ -204,17 +206,18 @@ class CommentMacroParser ( Parser ):
T__29=30 T__29=30
T__30=31 T__30=31
T__31=32 T__31=32
NUMBER=33 T__32=33
THRU=34 NUMBER=34
CURRENT=35 THRU=35
TIME=36 CURRENT=36
WHOLEHOG=37 TIME=37
DP8K=38 WHOLEHOG=38
IOP=39 DP8K=39
NEWLINE=40 IOP=40
WS=41 NEWLINE=41
COMMENT=42 WS=42
LINE_COMMENT=43 COMMENT=43
LINE_COMMENT=44
def __init__(self, input:TokenStream, output:TextIO = sys.stdout): def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
super().__init__(input, output) super().__init__(input, output)
@ -270,7 +273,7 @@ class CommentMacroParser ( Parser ):
self.state = 21 self.state = 21
self._errHandler.sync(self) self._errHandler.sync(self)
_la = self._input.LA(1) _la = self._input.LA(1)
if not ((((_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.NEWLINE))) != 0)): if not ((((_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)):
break break
self.state = 23 self.state = 23
@ -322,7 +325,7 @@ class CommentMacroParser ( Parser ):
self.state = 37 self.state = 37
self._errHandler.sync(self) self._errHandler.sync(self)
token = self._input.LA(1) 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]: 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]:
self.enterOuterAlt(localctx, 1) self.enterOuterAlt(localctx, 1)
self.state = 25 self.state = 25
self.macro() self.macro()
@ -1061,6 +1064,25 @@ class CommentMacroParser ( Parser ):
listener.exitMacroHalt(self) listener.exitMacroHalt(self)
class WaitContext(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 enterRule(self, listener:ParseTreeListener):
if hasattr( listener, "enterWait" ):
listener.enterWait(self)
def exitRule(self, listener:ParseTreeListener):
if hasattr( listener, "exitWait" ):
listener.exitWait(self)
def macro(self): def macro(self):
@ -1068,7 +1090,7 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 4, self.RULE_macro) self.enterRule(localctx, 4, self.RULE_macro)
self._la = 0 # Token type self._la = 0 # Token type
try: try:
self.state = 219 self.state = 221
self._errHandler.sync(self) self._errHandler.sync(self)
la_ = self._interp.adaptivePredict(self._input,42,self._ctx) la_ = self._interp.adaptivePredict(self._input,42,self._ctx)
if la_ == 1: if la_ == 1:
@ -1686,6 +1708,15 @@ class CommentMacroParser ( Parser ):
pass pass
elif la_ == 32:
localctx = CommentMacroParser.WaitContext(self, localctx)
self.enterOuterAlt(localctx, 32)
self.state = 219
self.match(CommentMacroParser.T__31)
self.state = 220
self.number()
pass
except RecognitionException as re: except RecognitionException as re:
localctx.exception = re localctx.exception = re
@ -1728,9 +1759,9 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 6, self.RULE_time) self.enterRule(localctx, 6, self.RULE_time)
try: try:
self.enterOuterAlt(localctx, 1) self.enterOuterAlt(localctx, 1)
self.state = 221 self.state = 223
self.match(CommentMacroParser.TIME) self.match(CommentMacroParser.TIME)
self.state = 222 self.state = 224
self.number() self.number()
except RecognitionException as re: except RecognitionException as re:
localctx.exception = re localctx.exception = re
@ -1774,9 +1805,9 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 8, self.RULE_device) self.enterRule(localctx, 8, self.RULE_device)
try: try:
self.enterOuterAlt(localctx, 1) self.enterOuterAlt(localctx, 1)
self.state = 224 self.state = 226
self.nodeType() self.nodeType()
self.state = 225 self.state = 227
self.number() self.number()
except RecognitionException as re: except RecognitionException as re:
localctx.exception = re localctx.exception = re
@ -1822,7 +1853,7 @@ class CommentMacroParser ( Parser ):
self._la = 0 # Token type self._la = 0 # Token type
try: try:
self.enterOuterAlt(localctx, 1) self.enterOuterAlt(localctx, 1)
self.state = 227 self.state = 229
_la = self._input.LA(1) _la = self._input.LA(1)
if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CommentMacroParser.WHOLEHOG) | (1 << CommentMacroParser.DP8K) | (1 << CommentMacroParser.IOP))) != 0)): if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CommentMacroParser.WHOLEHOG) | (1 << CommentMacroParser.DP8K) | (1 << CommentMacroParser.IOP))) != 0)):
self._errHandler.recoverInline(self) self._errHandler.recoverInline(self)
@ -1878,30 +1909,30 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 12, self.RULE_target) self.enterRule(localctx, 12, self.RULE_target)
try: try:
self.enterOuterAlt(localctx, 1) self.enterOuterAlt(localctx, 1)
self.state = 231 self.state = 233
self._errHandler.sync(self) self._errHandler.sync(self)
la_ = self._interp.adaptivePredict(self._input,43,self._ctx) la_ = self._interp.adaptivePredict(self._input,43,self._ctx)
if la_ == 1: if la_ == 1:
self.state = 229 self.state = 231
self.number() self.number()
pass pass
elif la_ == 2: elif la_ == 2:
self.state = 230 self.state = 232
self.span() self.span()
pass pass
self.state = 237 self.state = 239
self._errHandler.sync(self) self._errHandler.sync(self)
_alt = self._interp.adaptivePredict(self._input,44,self._ctx) _alt = self._interp.adaptivePredict(self._input,44,self._ctx)
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
if _alt==1: if _alt==1:
self.state = 233 self.state = 235
self.match(CommentMacroParser.T__31) self.match(CommentMacroParser.T__32)
self.state = 234 self.state = 236
self.target() self.target()
self.state = 239 self.state = 241
self._errHandler.sync(self) self._errHandler.sync(self)
_alt = self._interp.adaptivePredict(self._input,44,self._ctx) _alt = self._interp.adaptivePredict(self._input,44,self._ctx)
@ -1951,11 +1982,11 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 14, self.RULE_span) self.enterRule(localctx, 14, self.RULE_span)
try: try:
self.enterOuterAlt(localctx, 1) self.enterOuterAlt(localctx, 1)
self.state = 240
localctx.n1 = self.number()
self.state = 241
self.match(CommentMacroParser.THRU)
self.state = 242 self.state = 242
localctx.n1 = self.number()
self.state = 243
self.match(CommentMacroParser.THRU)
self.state = 244
localctx.n2 = self.number() localctx.n2 = self.number()
except RecognitionException as re: except RecognitionException as re:
localctx.exception = re localctx.exception = re
@ -1994,7 +2025,7 @@ class CommentMacroParser ( Parser ):
self.enterRule(localctx, 16, self.RULE_number) self.enterRule(localctx, 16, self.RULE_number)
try: try:
self.enterOuterAlt(localctx, 1) self.enterOuterAlt(localctx, 1)
self.state = 244 self.state = 246
self.match(CommentMacroParser.NUMBER) self.match(CommentMacroParser.NUMBER)
except RecognitionException as re: except RecognitionException as re:
localctx.exception = re localctx.exception = re

View File

@ -89,6 +89,9 @@ class OscCommentMacroListener(CommentMacroListener):
def __init__(self, servers): def __init__(self, servers):
self.osc = HogDevice(servers) self.osc = HogDevice(servers)
def exitWait(self, ctx: CommentMacroParser.WaitContext):
sleep(ctx.number().value)
def enterStatement(self, ctx: CommentMacroParser.StatementContext): def enterStatement(self, ctx: CommentMacroParser.StatementContext):
# print the lisp tree of this macro # print the lisp tree of this macro
lisp_tree_str = ctx.toStringTree(recog=ctx.parser) lisp_tree_str = ctx.toStringTree(recog=ctx.parser)

View File

@ -64,6 +64,7 @@ that are implimented in python.
| ranges | 1>4 | Yes, integers only | | ranges | 1>4 | Yes, integers only |
| multiple macros | GM1:GL3 | Yes | | multiple macros | GM1:GL3 | Yes |
| network devices | h4 | Yes, H devices only | | network devices | h4 | Yes, H devices only |
| wait times | WAIT1 | BaconScript only; Continue script after n seconds.
Benefiting from the LL(*) parser provided by ANTLR, `multiple targets` and Benefiting from the LL(*) parser provided by ANTLR, `multiple targets` and
`ranges` may be combined ad infinitum. This is a known deviation from the `ranges` may be combined ad infinitum. This is a known deviation from the

View File

@ -1,6 +1,7 @@
GM* GM*
GM1:AM2:HM3 GM1:AM2:HM3
RM* RM*
WAIT1
RA RA
FM1/50 FM1/50
FGM20 FGM20