diff --git a/assets/grammars/definitions.g b/assets/grammars/definitions.g index 02f896f..5a0dd7a 100644 --- a/assets/grammars/definitions.g +++ b/assets/grammars/definitions.g @@ -2,7 +2,7 @@ start: import_statement* (object|interface)+ import_statement: "import" PATH -object: description? "object" name options? super? "{" uid method* "}" +object: description? "object" name options? super? "{" uid cname? method* "}" interface: description? "interface" name options? "{" uid interface_param* "}" @@ -12,6 +12,8 @@ expose: "expose" type uid: "uid" UID +cname: "cname" IDENTIFIER + super: ":" name function: description? "function" name options? ("{" param* "}")? diff --git a/definitions/objects/process.def b/definitions/objects/process.def index 0b6db39..ac7848f 100644 --- a/definitions/objects/process.def +++ b/definitions/objects/process.def @@ -17,18 +17,10 @@ object process : kobject { param result int32 # The result to retrun to the parent process } - # Start the given process running. Note that the entrypoint - # address must be specified in the address space of the new - # process. - method start { - param entrypoint address # The address of the main thread entrypoint - param handles object kobject [list] # A list of parent handles to send to the child process - } - # Give the given process a handle that points to the same # object as the specified handle. method give_handle { - param sender object kobject # A handle in the caller process to send - param receiver object kobject [out optional] # The handle as the recipient will see it + param target object kobject [handle] # A handle in the caller process to send + param received object kobject [out optional] # The handle as the recipient will see it } } diff --git a/definitions/objects/vma.def b/definitions/objects/vma.def index 68e24aa..36ae4d1 100644 --- a/definitions/objects/vma.def +++ b/definitions/objects/vma.def @@ -2,6 +2,7 @@ import "objects/process.def" object vma : kobject { uid d6a12b63b3ed3937 + cname vm_area method create [constructor] { param size size diff --git a/scripts/definitions/parser.py b/scripts/definitions/parser.py index d4e711d..5eaf680 100644 --- a/scripts/definitions/parser.py +++ b/scripts/definitions/parser.py @@ -2894,10 +2894,10 @@ class Indenter(PostLex): import pickle, zlib, base64 DATA = ( -{'parser': {'lexer_conf': {'terminals': [{'@': 0}, {'@': 1}, {'@': 2}, {'@': 3}, {'@': 4}, {'@': 5}, {'@': 6}, {'@': 7}, {'@': 8}, {'@': 9}, {'@': 10}, {'@': 11}, {'@': 12}, {'@': 13}, {'@': 14}, {'@': 15}, {'@': 16}, {'@': 17}, {'@': 18}, {'@': 19}], 'ignore': ['WS'], 'g_regex_flags': 0, 'use_bytes': False, 'lexer_type': 'contextual', '__type__': 'LexerConf'}, 'parser_conf': {'rules': [{'@': 20}, {'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}], 'start': ['start'], 'parser_type': 'lalr', '__type__': 'ParserConf'}, 'parser': {'tokens': {0: 'FUNCTION', 1: 'PARAM', 2: 'RBRACE', 3: 'COMMENT', 4: 'EXPOSE', 5: 'METHOD', 6: 'description', 7: '__description_plus_6', 8: 'method', 9: 'LBRACE', 10: 'COLON', 11: 'super', 12: 'LSQB', 13: 'options', 14: '$END', 15: 'OBJECT', 16: 'INTERFACE', 17: '__options_plus_5', 18: 'OPTION', 19: 'IDENTIFIER', 20: '__object_star_2', 21: 'function', 22: '__interface_star_3', 23: 'expose', 24: 'interface_param', 25: 'name', 26: '__function_star_4', 27: 'param', 28: 'interface', 29: 'object', 30: 'RSQB', 31: '__ANON_0', 32: 'uid', 33: 'UID', 34: 'PRIMITIVE', 35: 'type', 36: 'object_name', 37: 'IMPORT', 38: '__start_plus_1', 39: '__start_star_0', 40: 'import_statement', 41: 'start', 42: 'PATH'}, 'states': {0: {0: (0, 74)}, 1: {1: (1, {'@': 78}), 2: (1, {'@': 78})}, 2: {0: (1, {'@': 47}), 3: (1, {'@': 47}), 2: (1, {'@': 47}), 4: (1, {'@': 47})}, 3: {5: (0, 78), 6: (0, 43), 7: (0, 106), 3: (0, 145), 2: (0, 117), 8: (0, 27)}, 4: {9: (0, 99), 10: (0, 55), 11: (0, 24), 12: (0, 8), 13: (0, 21)}, 5: {14: (1, {'@': 90}), 3: (1, {'@': 90}), 15: (1, {'@': 90}), 16: (1, {'@': 90})}, 6: {14: (1, {'@': 26}), 3: (1, {'@': 26}), 15: (1, {'@': 26}), 16: (1, {'@': 26})}, 7: {1: (1, {'@': 76}), 2: (1, {'@': 76})}, 8: {17: (0, 166), 18: (0, 136), 19: (0, 148)}, 9: {13: (0, 146), 9: (0, 19), 12: (0, 8), 0: (1, {'@': 63}), 3: (1, {'@': 63}), 2: (1, {'@': 63}), 4: (1, {'@': 63})}, 10: {5: (0, 78), 6: (0, 43), 20: (0, 3), 8: (0, 29), 7: (0, 106), 3: (0, 145), 2: (0, 45)}, 11: {6: (0, 0), 21: (0, 17), 0: (0, 40), 2: (0, 130), 22: (0, 133), 23: (0, 2), 7: (0, 106), 3: (0, 145), 24: (0, 77), 4: (0, 70)}, 12: {19: (0, 132), 25: (0, 126)}, 13: {0: (1, {'@': 53}), 3: (1, {'@': 53}), 2: (1, {'@': 53}), 4: (1, {'@': 53})}, 14: {0: (1, {'@': 56}), 3: (1, {'@': 56}), 2: (1, {'@': 56}), 4: (1, {'@': 56})}, 15: {14: (1, {'@': 31}), 3: (1, {'@': 31}), 15: (1, {'@': 31}), 16: (1, {'@': 31})}, 16: {0: (1, {'@': 59}), 3: (1, {'@': 59}), 2: (1, {'@': 59}), 4: (1, {'@': 59})}, 17: {0: (1, {'@': 48}), 3: (1, {'@': 48}), 2: (1, {'@': 48}), 4: (1, {'@': 48})}, 18: {25: (0, 85), 19: (0, 132)}, 19: {2: (0, 113), 26: (0, 137), 27: (0, 36), 1: (0, 12)}, 20: {14: (1, {'@': 23}), 3: (1, {'@': 23}), 15: (1, {'@': 23}), 16: (1, {'@': 23})}, 21: {9: (0, 103), 11: (0, 100), 10: (0, 55)}, 22: {14: (1, {'@': 41}), 3: (1, {'@': 41}), 15: (1, {'@': 41}), 16: (1, {'@': 41})}, 23: {3: (1, {'@': 74}), 2: (1, {'@': 74}), 5: (1, {'@': 74})}, 24: {9: (0, 92)}, 25: {3: (1, {'@': 103}), 5: (1, {'@': 103}), 0: (1, {'@': 103}), 15: (1, {'@': 103}), 16: (1, {'@': 103}), 1: (1, {'@': 103}), 2: (1, {'@': 103})}, 26: {14: (1, {'@': 37}), 3: (1, {'@': 37}), 15: (1, {'@': 37}), 16: (1, {'@': 37})}, 27: {3: (1, {'@': 93}), 2: (1, {'@': 93}), 5: (1, {'@': 93})}, 28: {3: (1, {'@': 68}), 2: (1, {'@': 68}), 5: (1, {'@': 68})}, 29: {3: (1, {'@': 92}), 2: (1, {'@': 92}), 5: (1, {'@': 92})}, 30: {13: (0, 98), 9: (0, 91), 10: (0, 55), 11: (0, 51), 12: (0, 8)}, 31: {16: (0, 147), 15: (0, 68), 6: (0, 80), 7: (0, 106), 28: (0, 38), 3: (0, 145), 29: (0, 5), 14: (1, {'@': 20})}, 32: {6: (0, 0), 21: (0, 17), 0: (0, 40), 24: (0, 119), 23: (0, 2), 7: (0, 106), 3: (0, 145), 4: (0, 70), 2: (0, 160)}, 33: {14: (1, {'@': 27}), 3: (1, {'@': 27}), 15: (1, {'@': 27}), 16: (1, {'@': 27})}, 34: {2: (0, 131), 27: (0, 149), 1: (0, 12)}, 35: {19: (0, 132), 25: (0, 159)}, 36: {1: (1, {'@': 96}), 2: (1, {'@': 96})}, 37: {1: (0, 12), 26: (0, 44), 27: (0, 36), 2: (0, 16)}, 38: {14: (1, {'@': 91}), 3: (1, {'@': 91}), 15: (1, {'@': 91}), 16: (1, {'@': 91})}, 39: {30: (1, {'@': 101}), 19: (1, {'@': 101}), 18: (1, {'@': 101})}, 40: {25: (0, 9), 19: (0, 132)}, 41: {6: (0, 0), 21: (0, 17), 0: (0, 40), 23: (0, 2), 7: (0, 106), 3: (0, 145), 24: (0, 77), 4: (0, 70), 22: (0, 56), 2: (0, 101)}, 42: {5: (0, 78), 6: (0, 43), 2: (0, 116), 20: (0, 127), 8: (0, 29), 7: (0, 106), 3: (0, 145)}, 43: {5: (0, 18)}, 44: {1: (0, 12), 27: (0, 149), 2: (0, 46)}, 45: {14: (1, {'@': 30}), 3: (1, {'@': 30}), 15: (1, {'@': 30}), 16: (1, {'@': 30})}, 46: {0: (1, {'@': 58}), 3: (1, {'@': 58}), 2: (1, {'@': 58}), 4: (1, {'@': 58})}, 47: {31: (0, 65), 32: (0, 41)}, 48: {5: (0, 78), 6: (0, 43), 7: (0, 106), 3: (0, 145), 2: (0, 26), 8: (0, 27)}, 49: {26: (0, 34), 27: (0, 36), 1: (0, 12), 2: (0, 28)}, 50: {7: (0, 106), 6: (0, 1), 3: (0, 145), 12: (0, 8), 13: (0, 59), 1: (1, {'@': 79}), 2: (1, {'@': 79})}, 51: {9: (0, 112)}, 52: {2: (0, 83), 27: (0, 149), 1: (0, 12)}, 53: {14: (1, {'@': 39}), 3: (1, {'@': 39}), 15: (1, {'@': 39}), 16: (1, {'@': 39})}, 54: {14: (1, {'@': 38}), 3: (1, {'@': 38}), 15: (1, {'@': 38}), 16: (1, {'@': 38})}, 55: {19: (0, 132), 25: (0, 60)}, 56: {6: (0, 0), 21: (0, 17), 2: (0, 53), 0: (0, 40), 24: (0, 119), 23: (0, 2), 7: (0, 106), 3: (0, 145), 4: (0, 70)}, 57: {14: (1, {'@': 36}), 3: (1, {'@': 36}), 15: (1, {'@': 36}), 16: (1, {'@': 36})}, 58: {3: (1, {'@': 70}), 2: (1, {'@': 70}), 5: (1, {'@': 70})}, 59: {7: (0, 106), 6: (0, 7), 3: (0, 145), 1: (1, {'@': 77}), 2: (1, {'@': 77})}, 60: {9: (1, {'@': 51})}, 61: {12: (0, 8), 13: (0, 124), 9: (0, 165), 3: (1, {'@': 75}), 2: (1, {'@': 75}), 5: (1, {'@': 75})}, 62: {9: (0, 102), 12: (0, 8), 13: (0, 81)}, 63: {14: (1, {'@': 34}), 3: (1, {'@': 34}), 15: (1, {'@': 34}), 16: (1, {'@': 34})}, 64: {0: (1, {'@': 52}), 3: (1, {'@': 52}), 2: (1, {'@': 52}), 4: (1, {'@': 52})}, 65: {33: (0, 69)}, 66: {2: (0, 151), 27: (0, 36), 26: (0, 121), 1: (0, 12)}, 67: {9: (0, 105)}, 68: {25: (0, 30), 19: (0, 132)}, 69: {0: (1, {'@': 50}), 3: (1, {'@': 50}), 2: (1, {'@': 50}), 4: (1, {'@': 50}), 5: (1, {'@': 50})}, 70: {15: (0, 35), 34: (0, 154), 35: (0, 139), 36: (0, 157)}, 71: {2: (0, 90), 27: (0, 149), 1: (0, 12)}, 72: {5: (0, 78), 6: (0, 43), 2: (0, 75), 7: (0, 106), 3: (0, 145), 8: (0, 27)}, 73: {31: (0, 65), 32: (0, 42)}, 74: {25: (0, 115), 19: (0, 132)}, 75: {14: (1, {'@': 35}), 3: (1, {'@': 35}), 15: (1, {'@': 35}), 16: (1, {'@': 35})}, 76: {32: (0, 109), 31: (0, 65)}, 77: {0: (1, {'@': 94}), 3: (1, {'@': 94}), 2: (1, {'@': 94}), 4: (1, {'@': 94})}, 78: {25: (0, 61), 19: (0, 132)}, 79: {5: (0, 78), 6: (0, 43), 8: (0, 29), 20: (0, 142), 7: (0, 106), 3: (0, 145), 2: (0, 6)}, 80: {15: (0, 150), 16: (0, 164)}, 81: {9: (0, 47)}, 82: {27: (0, 149), 2: (0, 64), 1: (0, 12)}, 83: {0: (1, {'@': 55}), 3: (1, {'@': 55}), 2: (1, {'@': 55}), 4: (1, {'@': 55})}, 84: {37: (1, {'@': 87}), 3: (1, {'@': 87}), 15: (1, {'@': 87}), 16: (1, {'@': 87})}, 85: {13: (0, 97), 9: (0, 49), 12: (0, 8), 3: (1, {'@': 69}), 2: (1, {'@': 69}), 5: (1, {'@': 69})}, 86: {15: (0, 68), 6: (0, 80), 16: (0, 147), 29: (0, 168), 38: (0, 138), 37: (0, 111), 28: (0, 144), 39: (0, 129), 7: (0, 106), 3: (0, 145), 40: (0, 134), 41: (0, 122)}, 87: {27: (0, 149), 2: (0, 141), 1: (0, 12)}, 88: {13: (0, 67), 9: (0, 76), 12: (0, 8)}, 89: {5: (0, 78), 6: (0, 43), 2: (0, 120), 7: (0, 106), 3: (0, 145), 8: (0, 27)}, 90: {3: (1, {'@': 64}), 2: (1, {'@': 64}), 5: (1, {'@': 64})}, 91: {31: (0, 65), 32: (0, 162)}, 92: {31: (0, 65), 32: (0, 93)}, 93: {5: (0, 78), 6: (0, 43), 2: (0, 110), 8: (0, 29), 7: (0, 106), 20: (0, 169), 3: (0, 145)}, 94: {3: (1, {'@': 65}), 2: (1, {'@': 65}), 5: (1, {'@': 65})}, 95: {20: (0, 89), 5: (0, 78), 6: (0, 43), 8: (0, 29), 2: (0, 63), 7: (0, 106), 3: (0, 145)}, 96: {30: (1, {'@': 100}), 19: (1, {'@': 100}), 18: (1, {'@': 100})}, 97: {9: (0, 135), 3: (1, {'@': 66}), 2: (1, {'@': 66}), 5: (1, {'@': 66})}, 98: {9: (0, 156), 11: (0, 158), 10: (0, 55)}, 99: {31: (0, 65), 32: (0, 10)}, 100: {9: (0, 73)}, 101: {14: (1, {'@': 40}), 3: (1, {'@': 40}), 15: (1, {'@': 40}), 16: (1, {'@': 40})}, 102: {32: (0, 11), 31: (0, 65)}, 103: {31: (0, 65), 32: (0, 79)}, 104: {5: (0, 78), 6: (0, 43), 20: (0, 161), 8: (0, 29), 7: (0, 106), 2: (0, 152), 3: (0, 145)}, 105: {32: (0, 167), 31: (0, 65)}, 106: {3: (0, 25), 5: (1, {'@': 85}), 0: (1, {'@': 85}), 15: (1, {'@': 85}), 16: (1, {'@': 85}), 1: (1, {'@': 85}), 2: (1, {'@': 85})}, 107: {2: (0, 14), 27: (0, 36), 26: (0, 52), 1: (0, 12)}, 108: {9: (1, {'@': 84}), 10: (1, {'@': 84}), 3: (1, {'@': 84}), 4: (1, {'@': 84}), 0: (1, {'@': 84}), 2: (1, {'@': 84}), 1: (1, {'@': 84}), 5: (1, {'@': 84})}, 109: {6: (0, 0), 21: (0, 17), 0: (0, 40), 23: (0, 2), 7: (0, 106), 22: (0, 32), 3: (0, 145), 24: (0, 77), 4: (0, 70), 2: (0, 153)}, 110: {14: (1, {'@': 28}), 3: (1, {'@': 28}), 15: (1, {'@': 28}), 16: (1, {'@': 28})}, 111: {42: (0, 143)}, 112: {31: (0, 65), 32: (0, 163)}, 113: {0: (1, {'@': 62}), 3: (1, {'@': 62}), 2: (1, {'@': 62}), 4: (1, {'@': 62})}, 114: {14: (1, {'@': 44}), 3: (1, {'@': 44}), 15: (1, {'@': 44}), 16: (1, {'@': 44})}, 115: {9: (0, 107), 13: (0, 118), 12: (0, 8), 0: (1, {'@': 57}), 3: (1, {'@': 57}), 2: (1, {'@': 57}), 4: (1, {'@': 57})}, 116: {14: (1, {'@': 24}), 3: (1, {'@': 24}), 15: (1, {'@': 24}), 16: (1, {'@': 24})}, 117: {14: (1, {'@': 29}), 3: (1, {'@': 29}), 15: (1, {'@': 29}), 16: (1, {'@': 29})}, 118: {9: (0, 123), 0: (1, {'@': 54}), 3: (1, {'@': 54}), 2: (1, {'@': 54}), 4: (1, {'@': 54})}, 119: {0: (1, {'@': 95}), 3: (1, {'@': 95}), 2: (1, {'@': 95}), 4: (1, {'@': 95})}, 120: {14: (1, {'@': 33}), 3: (1, {'@': 33}), 15: (1, {'@': 33}), 16: (1, {'@': 33})}, 121: {2: (0, 58), 27: (0, 149), 1: (0, 12)}, 122: {}, 123: {26: (0, 82), 27: (0, 36), 2: (0, 13), 1: (0, 12)}, 124: {9: (0, 66), 3: (1, {'@': 72}), 2: (1, {'@': 72}), 5: (1, {'@': 72})}, 125: {14: (1, {'@': 25}), 3: (1, {'@': 25}), 15: (1, {'@': 25}), 16: (1, {'@': 25})}, 126: {34: (0, 154), 35: (0, 50), 36: (0, 157), 15: (0, 35)}, 127: {5: (0, 78), 6: (0, 43), 7: (0, 106), 2: (0, 20), 3: (0, 145), 8: (0, 27)}, 128: {0: (1, {'@': 61}), 3: (1, {'@': 61}), 2: (1, {'@': 61}), 4: (1, {'@': 61})}, 129: {15: (0, 68), 6: (0, 80), 16: (0, 147), 29: (0, 168), 38: (0, 31), 40: (0, 84), 37: (0, 111), 28: (0, 144), 7: (0, 106), 3: (0, 145)}, 130: {14: (1, {'@': 42}), 3: (1, {'@': 42}), 15: (1, {'@': 42}), 16: (1, {'@': 42})}, 131: {3: (1, {'@': 67}), 2: (1, {'@': 67}), 5: (1, {'@': 67})}, 132: {15: (1, {'@': 83}), 34: (1, {'@': 83}), 9: (1, {'@': 83}), 12: (1, {'@': 83}), 3: (1, {'@': 83}), 2: (1, {'@': 83}), 5: (1, {'@': 83}), 4: (1, {'@': 83}), 0: (1, {'@': 83}), 1: (1, {'@': 83}), 10: (1, {'@': 83})}, 133: {6: (0, 0), 21: (0, 17), 0: (0, 40), 24: (0, 119), 23: (0, 2), 7: (0, 106), 2: (0, 22), 3: (0, 145), 4: (0, 70)}, 134: {37: (1, {'@': 86}), 3: (1, {'@': 86}), 15: (1, {'@': 86}), 16: (1, {'@': 86})}, 135: {2: (0, 94), 27: (0, 36), 26: (0, 71), 1: (0, 12)}, 136: {30: (1, {'@': 98}), 19: (1, {'@': 98}), 18: (1, {'@': 98})}, 137: {2: (0, 128), 27: (0, 149), 1: (0, 12)}, 138: {16: (0, 147), 15: (0, 68), 6: (0, 80), 7: (0, 106), 28: (0, 38), 3: (0, 145), 29: (0, 5), 14: (1, {'@': 21})}, 139: {0: (1, {'@': 49}), 3: (1, {'@': 49}), 2: (1, {'@': 49}), 4: (1, {'@': 49})}, 140: {6: (0, 0), 21: (0, 17), 0: (0, 40), 24: (0, 119), 2: (0, 155), 23: (0, 2), 7: (0, 106), 3: (0, 145), 4: (0, 70)}, 141: {3: (1, {'@': 73}), 2: (1, {'@': 73}), 5: (1, {'@': 73})}, 142: {5: (0, 78), 6: (0, 43), 7: (0, 106), 3: (0, 145), 2: (0, 125), 8: (0, 27)}, 143: {37: (1, {'@': 22}), 3: (1, {'@': 22}), 15: (1, {'@': 22}), 16: (1, {'@': 22})}, 144: {14: (1, {'@': 89}), 3: (1, {'@': 89}), 15: (1, {'@': 89}), 16: (1, {'@': 89})}, 145: {3: (1, {'@': 102}), 5: (1, {'@': 102}), 0: (1, {'@': 102}), 15: (1, {'@': 102}), 16: (1, {'@': 102}), 1: (1, {'@': 102}), 2: (1, {'@': 102})}, 146: {9: (0, 37), 0: (1, {'@': 60}), 3: (1, {'@': 60}), 2: (1, {'@': 60}), 4: (1, {'@': 60})}, 147: {25: (0, 88), 19: (0, 132)}, 148: {30: (1, {'@': 99}), 19: (1, {'@': 99}), 18: (1, {'@': 99})}, 149: {1: (1, {'@': 97}), 2: (1, {'@': 97})}, 150: {25: (0, 4), 19: (0, 132)}, 151: {3: (1, {'@': 71}), 2: (1, {'@': 71}), 5: (1, {'@': 71})}, 152: {14: (1, {'@': 32}), 3: (1, {'@': 32}), 15: (1, {'@': 32}), 16: (1, {'@': 32})}, 153: {14: (1, {'@': 46}), 3: (1, {'@': 46}), 15: (1, {'@': 46}), 16: (1, {'@': 46})}, 154: {3: (1, {'@': 80}), 4: (1, {'@': 80}), 0: (1, {'@': 80}), 2: (1, {'@': 80}), 12: (1, {'@': 80}), 1: (1, {'@': 80})}, 155: {14: (1, {'@': 43}), 3: (1, {'@': 43}), 15: (1, {'@': 43}), 16: (1, {'@': 43})}, 156: {32: (0, 95), 31: (0, 65)}, 157: {3: (1, {'@': 81}), 4: (1, {'@': 81}), 0: (1, {'@': 81}), 2: (1, {'@': 81}), 12: (1, {'@': 81}), 1: (1, {'@': 81})}, 158: {9: (0, 170)}, 159: {0: (1, {'@': 82}), 3: (1, {'@': 82}), 2: (1, {'@': 82}), 4: (1, {'@': 82}), 12: (1, {'@': 82}), 1: (1, {'@': 82})}, 160: {14: (1, {'@': 45}), 3: (1, {'@': 45}), 15: (1, {'@': 45}), 16: (1, {'@': 45})}, 161: {5: (0, 78), 6: (0, 43), 7: (0, 106), 3: (0, 145), 2: (0, 15), 8: (0, 27)}, 162: {5: (0, 78), 6: (0, 43), 2: (0, 54), 20: (0, 48), 8: (0, 29), 7: (0, 106), 3: (0, 145)}, 163: {5: (0, 78), 6: (0, 43), 8: (0, 29), 7: (0, 106), 20: (0, 72), 3: (0, 145), 2: (0, 57)}, 164: {19: (0, 132), 25: (0, 62)}, 165: {2: (0, 23), 27: (0, 36), 26: (0, 87), 1: (0, 12)}, 166: {30: (0, 108), 18: (0, 96), 19: (0, 39)}, 167: {6: (0, 0), 21: (0, 17), 0: (0, 40), 23: (0, 2), 7: (0, 106), 3: (0, 145), 24: (0, 77), 4: (0, 70), 2: (0, 114), 22: (0, 140)}, 168: {14: (1, {'@': 88}), 3: (1, {'@': 88}), 15: (1, {'@': 88}), 16: (1, {'@': 88})}, 169: {5: (0, 78), 6: (0, 43), 7: (0, 106), 3: (0, 145), 2: (0, 33), 8: (0, 27)}, 170: {32: (0, 104), 31: (0, 65)}}, 'start_states': {'start': 86}, 'end_states': {'start': 122}}, 'options': {'debug': False, 'keep_all_tokens': False, 'tree_class': None, 'cache': False, 'postlex': None, 'parser': 'lalr', 'lexer': 'contextual', 'transformer': None, 'start': ['start'], 'priority': 'normal', 'ambiguity': 'auto', 'regex': False, 'propagate_positions': False, 'lexer_callbacks': {}, 'maybe_placeholders': False, 'edit_terminals': None, 'g_regex_flags': 0, 'use_bytes': False, 'import_paths': [], 'source_path': None}, '__type__': 'ParsingFrontend'}, 'rules': [{'@': 20}, {'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}], 'options': {'debug': False, 'keep_all_tokens': False, 'tree_class': None, 'cache': False, 'postlex': None, 'parser': 'lalr', 'lexer': 'contextual', 'transformer': None, 'start': ['start'], 'priority': 'normal', 'ambiguity': 'auto', 'regex': False, 'propagate_positions': False, 'lexer_callbacks': {}, 'maybe_placeholders': False, 'edit_terminals': None, 'g_regex_flags': 0, 'use_bytes': False, 'import_paths': [], 'source_path': None}, '__type__': 'Lark'} +{'parser': {'lexer_conf': {'terminals': [{'@': 0}, {'@': 1}, {'@': 2}, {'@': 3}, {'@': 4}, {'@': 5}, {'@': 6}, {'@': 7}, {'@': 8}, {'@': 9}, {'@': 10}, {'@': 11}, {'@': 12}, {'@': 13}, {'@': 14}, {'@': 15}, {'@': 16}, {'@': 17}, {'@': 18}, {'@': 19}, {'@': 20}], 'ignore': ['WS'], 'g_regex_flags': 0, 'use_bytes': False, 'lexer_type': 'contextual', '__type__': 'LexerConf'}, 'parser_conf': {'rules': [{'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}, {'@': 104}, {'@': 105}, {'@': 106}, {'@': 107}, {'@': 108}, {'@': 109}, {'@': 110}, {'@': 111}, {'@': 112}, {'@': 113}, {'@': 114}, {'@': 115}, {'@': 116}, {'@': 117}, {'@': 118}, {'@': 119}, {'@': 120}, {'@': 121}], 'start': ['start'], 'parser_type': 'lalr', '__type__': 'ParserConf'}, 'parser': {'tokens': {0: 'INTERFACE', 1: '$END', 2: 'COMMENT', 3: 'OBJECT', 4: '__description_plus_6', 5: 'METHOD', 6: 'description', 7: 'method', 8: 'RBRACE', 9: 'name', 10: 'IDENTIFIER', 11: 'LBRACE', 12: 'LSQB', 13: 'options', 14: 'EXPOSE', 15: 'FUNCTION', 16: 'expose', 17: 'interface_param', 18: 'function', 19: 'PARAM', 20: 'PRIMITIVE', 21: 'type', 22: 'object_name', 23: '__object_star_2', 24: 'cname', 25: 'CNAME', 26: '__function_star_4', 27: 'param', 28: '__interface_star_3', 29: 'IMPORT', 30: 'OPTION', 31: 'RSQB', 32: 'uid', 33: '__ANON_0', 34: '__options_plus_5', 35: 'UID', 36: 'super', 37: 'COLON', 38: 'object', 39: 'interface', 40: 'PATH', 41: '__start_plus_1', 42: '__start_star_0', 43: 'start', 44: 'import_statement'}, 'states': {0: {0: (1, {'@': 55}), 1: (1, {'@': 55}), 2: (1, {'@': 55}), 3: (1, {'@': 55})}, 1: {4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35), 8: (0, 82)}, 2: {4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35), 8: (0, 153)}, 3: {9: (0, 18), 10: (0, 165)}, 4: {5: (1, {'@': 110}), 8: (1, {'@': 110}), 2: (1, {'@': 110})}, 5: {0: (1, {'@': 60}), 1: (1, {'@': 60}), 2: (1, {'@': 60}), 3: (1, {'@': 60})}, 6: {0: (1, {'@': 29}), 1: (1, {'@': 29}), 2: (1, {'@': 29}), 3: (1, {'@': 29})}, 7: {0: (1, {'@': 45}), 1: (1, {'@': 45}), 2: (1, {'@': 45}), 3: (1, {'@': 45})}, 8: {11: (0, 110), 12: (0, 140), 13: (0, 10), 14: (1, {'@': 75}), 15: (1, {'@': 75}), 8: (1, {'@': 75}), 2: (1, {'@': 75})}, 9: {9: (0, 92), 10: (0, 165)}, 10: {11: (0, 57), 14: (1, {'@': 72}), 15: (1, {'@': 72}), 8: (1, {'@': 72}), 2: (1, {'@': 72})}, 11: {4: (0, 94), 16: (0, 95), 6: (0, 68), 17: (0, 75), 15: (0, 34), 2: (0, 197), 8: (0, 105), 18: (0, 81), 14: (0, 16)}, 12: {0: (1, {'@': 30}), 1: (1, {'@': 30}), 2: (1, {'@': 30}), 3: (1, {'@': 30})}, 13: {4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35), 8: (0, 58)}, 14: {15: (1, {'@': 99}), 8: (1, {'@': 99}), 2: (1, {'@': 99}), 14: (1, {'@': 99}), 12: (1, {'@': 99}), 19: (1, {'@': 99})}, 15: {11: (0, 122), 14: (1, {'@': 78}), 15: (1, {'@': 78}), 8: (1, {'@': 78}), 2: (1, {'@': 78})}, 16: {20: (0, 76), 21: (0, 96), 22: (0, 14), 3: (0, 111)}, 17: {8: (0, 65), 4: (0, 94), 16: (0, 95), 6: (0, 68), 17: (0, 75), 15: (0, 34), 2: (0, 197), 18: (0, 81), 14: (0, 16)}, 18: {12: (0, 140), 11: (0, 25), 13: (0, 85), 5: (1, {'@': 93}), 8: (1, {'@': 93}), 2: (1, {'@': 93})}, 19: {4: (0, 94), 16: (0, 95), 6: (0, 68), 8: (0, 88), 17: (0, 75), 15: (0, 34), 2: (0, 197), 18: (0, 81), 14: (0, 16)}, 20: {4: (0, 94), 23: (0, 98), 5: (0, 3), 8: (0, 21), 6: (0, 104), 24: (0, 114), 2: (0, 197), 25: (0, 90), 7: (0, 4)}, 21: {0: (1, {'@': 51}), 1: (1, {'@': 51}), 2: (1, {'@': 51}), 3: (1, {'@': 51})}, 22: {0: (1, {'@': 36}), 1: (1, {'@': 36}), 2: (1, {'@': 36}), 3: (1, {'@': 36})}, 23: {4: (0, 94), 8: (0, 87), 23: (0, 42), 5: (0, 3), 24: (0, 37), 6: (0, 104), 2: (0, 197), 25: (0, 90), 7: (0, 4)}, 24: {4: (0, 94), 23: (0, 135), 5: (0, 3), 6: (0, 104), 2: (0, 197), 8: (0, 167), 7: (0, 4)}, 25: {19: (0, 120), 26: (0, 50), 8: (0, 66), 27: (0, 108)}, 26: {0: (1, {'@': 26}), 1: (1, {'@': 26}), 2: (1, {'@': 26}), 3: (1, {'@': 26})}, 27: {4: (0, 94), 23: (0, 2), 5: (0, 3), 6: (0, 104), 2: (0, 197), 25: (0, 90), 24: (0, 24), 7: (0, 4), 8: (0, 43)}, 28: {8: (0, 36), 4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35)}, 29: {0: (1, {'@': 59}), 1: (1, {'@': 59}), 2: (1, {'@': 59}), 3: (1, {'@': 59})}, 30: {8: (0, 152), 4: (0, 94), 16: (0, 95), 6: (0, 68), 15: (0, 34), 2: (0, 197), 17: (0, 101), 18: (0, 81), 14: (0, 16), 28: (0, 19)}, 31: {0: (1, {'@': 40}), 1: (1, {'@': 40}), 2: (1, {'@': 40}), 3: (1, {'@': 40})}, 32: {5: (1, {'@': 91}), 8: (1, {'@': 91}), 2: (1, {'@': 91})}, 33: {14: (1, {'@': 76}), 15: (1, {'@': 76}), 8: (1, {'@': 76}), 2: (1, {'@': 76})}, 34: {9: (0, 64), 10: (0, 165)}, 35: {5: (1, {'@': 111}), 8: (1, {'@': 111}), 2: (1, {'@': 111})}, 36: {0: (1, {'@': 48}), 1: (1, {'@': 48}), 2: (1, {'@': 48}), 3: (1, {'@': 48})}, 37: {4: (0, 94), 23: (0, 56), 5: (0, 3), 6: (0, 104), 2: (0, 197), 8: (0, 7), 7: (0, 4)}, 38: {19: (0, 120), 8: (0, 84), 27: (0, 61)}, 39: {0: (1, {'@': 46}), 1: (1, {'@': 46}), 2: (1, {'@': 46}), 3: (1, {'@': 46})}, 40: {0: (1, {'@': 32}), 1: (1, {'@': 32}), 2: (1, {'@': 32}), 3: (1, {'@': 32})}, 41: {11: (0, 176)}, 42: {4: (0, 94), 8: (0, 39), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35)}, 43: {0: (1, {'@': 43}), 1: (1, {'@': 43}), 2: (1, {'@': 43}), 3: (1, {'@': 43})}, 44: {8: (0, 109), 4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35)}, 45: {19: (0, 120), 27: (0, 61), 8: (0, 121)}, 46: {0: (1, {'@': 28}), 1: (1, {'@': 28}), 2: (1, {'@': 28}), 3: (1, {'@': 28})}, 47: {0: (1, {'@': 53}), 1: (1, {'@': 53}), 2: (1, {'@': 53}), 3: (1, {'@': 53})}, 48: {4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35), 8: (0, 12)}, 49: {4: (0, 94), 24: (0, 115), 23: (0, 48), 5: (0, 3), 6: (0, 104), 2: (0, 197), 25: (0, 90), 7: (0, 4), 8: (0, 55)}, 50: {19: (0, 120), 27: (0, 61), 8: (0, 32)}, 51: {4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35), 8: (0, 89)}, 52: {0: (1, {'@': 25}), 1: (1, {'@': 25}), 2: (1, {'@': 25}), 3: (1, {'@': 25})}, 53: {5: (1, {'@': 89}), 8: (1, {'@': 89}), 2: (1, {'@': 89})}, 54: {0: (1, {'@': 63}), 1: (1, {'@': 63}), 2: (1, {'@': 63}), 3: (1, {'@': 63})}, 55: {0: (1, {'@': 31}), 1: (1, {'@': 31}), 2: (1, {'@': 31}), 3: (1, {'@': 31})}, 56: {4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35), 8: (0, 179)}, 57: {26: (0, 127), 19: (0, 120), 27: (0, 108), 8: (0, 132)}, 58: {0: (1, {'@': 54}), 1: (1, {'@': 54}), 2: (1, {'@': 54}), 3: (1, {'@': 54})}, 59: {0: (1, {'@': 49}), 1: (1, {'@': 49}), 2: (1, {'@': 49}), 3: (1, {'@': 49})}, 60: {14: (1, {'@': 80}), 15: (1, {'@': 80}), 8: (1, {'@': 80}), 2: (1, {'@': 80})}, 61: {8: (1, {'@': 115}), 19: (1, {'@': 115})}, 62: {19: (0, 120), 27: (0, 108), 26: (0, 45), 8: (0, 53)}, 63: {4: (0, 94), 23: (0, 204), 5: (0, 3), 6: (0, 104), 24: (0, 198), 2: (0, 197), 8: (0, 196), 25: (0, 90), 7: (0, 4)}, 64: {12: (0, 140), 13: (0, 15), 11: (0, 106), 14: (1, {'@': 81}), 15: (1, {'@': 81}), 8: (1, {'@': 81}), 2: (1, {'@': 81})}, 65: {0: (1, {'@': 62}), 1: (1, {'@': 62}), 2: (1, {'@': 62}), 3: (1, {'@': 62})}, 66: {5: (1, {'@': 92}), 8: (1, {'@': 92}), 2: (1, {'@': 92})}, 67: {8: (0, 47), 4: (0, 94), 23: (0, 51), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 4)}, 68: {15: (0, 91)}, 69: {21: (0, 107), 20: (0, 76), 22: (0, 14), 3: (0, 111)}, 70: {5: (1, {'@': 68}), 8: (1, {'@': 68}), 2: (1, {'@': 68})}, 71: {4: (0, 94), 16: (0, 95), 6: (0, 68), 17: (0, 75), 15: (0, 34), 2: (0, 197), 18: (0, 81), 8: (0, 5), 14: (0, 16)}, 72: {19: (0, 120), 27: (0, 108), 26: (0, 80), 8: (0, 86)}, 73: {0: (1, {'@': 107}), 1: (1, {'@': 107}), 2: (1, {'@': 107}), 3: (1, {'@': 107})}, 74: {4: (0, 94), 16: (0, 95), 6: (0, 68), 15: (0, 34), 2: (0, 197), 28: (0, 71), 17: (0, 101), 18: (0, 81), 8: (0, 103), 14: (0, 16)}, 75: {14: (1, {'@': 113}), 15: (1, {'@': 113}), 8: (1, {'@': 113}), 2: (1, {'@': 113})}, 76: {15: (1, {'@': 98}), 8: (1, {'@': 98}), 2: (1, {'@': 98}), 14: (1, {'@': 98}), 12: (1, {'@': 98}), 19: (1, {'@': 98})}, 77: {4: (0, 94), 23: (0, 202), 5: (0, 3), 6: (0, 104), 2: (0, 197), 8: (0, 143), 7: (0, 4)}, 78: {8: (0, 124), 19: (0, 120), 27: (0, 61)}, 79: {4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35), 8: (0, 46)}, 80: {8: (0, 174), 19: (0, 120), 27: (0, 61)}, 81: {14: (1, {'@': 65}), 15: (1, {'@': 65}), 8: (1, {'@': 65}), 2: (1, {'@': 65})}, 82: {0: (1, {'@': 38}), 1: (1, {'@': 38}), 2: (1, {'@': 38}), 3: (1, {'@': 38})}, 83: {11: (0, 130), 5: (1, {'@': 84}), 8: (1, {'@': 84}), 2: (1, {'@': 84})}, 84: {14: (1, {'@': 79}), 15: (1, {'@': 79}), 8: (1, {'@': 79}), 2: (1, {'@': 79})}, 85: {11: (0, 62), 5: (1, {'@': 90}), 8: (1, {'@': 90}), 2: (1, {'@': 90})}, 86: {5: (1, {'@': 86}), 8: (1, {'@': 86}), 2: (1, {'@': 86})}, 87: {0: (1, {'@': 47}), 1: (1, {'@': 47}), 2: (1, {'@': 47}), 3: (1, {'@': 47})}, 88: {0: (1, {'@': 56}), 1: (1, {'@': 56}), 2: (1, {'@': 56}), 3: (1, {'@': 56})}, 89: {0: (1, {'@': 52}), 1: (1, {'@': 52}), 2: (1, {'@': 52}), 3: (1, {'@': 52})}, 90: {10: (0, 70)}, 91: {9: (0, 8), 10: (0, 165)}, 92: {13: (0, 83), 12: (0, 140), 11: (0, 72), 5: (1, {'@': 87}), 8: (1, {'@': 87}), 2: (1, {'@': 87})}, 93: {14: (1, {'@': 74}), 15: (1, {'@': 74}), 8: (1, {'@': 74}), 2: (1, {'@': 74})}, 94: {2: (0, 172), 5: (1, {'@': 103}), 15: (1, {'@': 103}), 8: (1, {'@': 103}), 19: (1, {'@': 103}), 3: (1, {'@': 103}), 0: (1, {'@': 103})}, 95: {14: (1, {'@': 64}), 15: (1, {'@': 64}), 8: (1, {'@': 64}), 2: (1, {'@': 64})}, 96: {14: (1, {'@': 66}), 15: (1, {'@': 66}), 8: (1, {'@': 66}), 2: (1, {'@': 66})}, 97: {19: (0, 120), 27: (0, 61), 8: (0, 33)}, 98: {4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35), 8: (0, 162)}, 99: {3: (0, 150), 0: (0, 158)}, 100: {14: (1, {'@': 100}), 15: (1, {'@': 100}), 8: (1, {'@': 100}), 2: (1, {'@': 100}), 12: (1, {'@': 100}), 19: (1, {'@': 100})}, 101: {14: (1, {'@': 112}), 15: (1, {'@': 112}), 8: (1, {'@': 112}), 2: (1, {'@': 112})}, 102: {14: (1, {'@': 77}), 15: (1, {'@': 77}), 8: (1, {'@': 77}), 2: (1, {'@': 77})}, 103: {0: (1, {'@': 61}), 1: (1, {'@': 61}), 2: (1, {'@': 61}), 3: (1, {'@': 61})}, 104: {5: (0, 9)}, 105: {0: (1, {'@': 58}), 1: (1, {'@': 58}), 2: (1, {'@': 58}), 3: (1, {'@': 58})}, 106: {19: (0, 120), 27: (0, 108), 26: (0, 38), 8: (0, 60)}, 107: {12: (0, 140), 4: (0, 94), 6: (0, 139), 13: (0, 144), 2: (0, 197), 8: (1, {'@': 97}), 19: (1, {'@': 97})}, 108: {8: (1, {'@': 114}), 19: (1, {'@': 114})}, 109: {0: (1, {'@': 24}), 1: (1, {'@': 24}), 2: (1, {'@': 24}), 3: (1, {'@': 24})}, 110: {19: (0, 120), 27: (0, 108), 26: (0, 78), 8: (0, 93)}, 111: {9: (0, 100), 10: (0, 165)}, 112: {8: (1, {'@': 94}), 19: (1, {'@': 94})}, 113: {0: (1, {'@': 39}), 1: (1, {'@': 39}), 2: (1, {'@': 39}), 3: (1, {'@': 39})}, 114: {4: (0, 94), 23: (0, 28), 5: (0, 3), 6: (0, 104), 2: (0, 197), 8: (0, 59), 7: (0, 4)}, 115: {4: (0, 94), 23: (0, 79), 5: (0, 3), 6: (0, 104), 2: (0, 197), 8: (0, 6), 7: (0, 4)}, 116: {5: (1, {'@': 83}), 8: (1, {'@': 83}), 2: (1, {'@': 83})}, 117: {0: (1, {'@': 27}), 1: (1, {'@': 27}), 2: (1, {'@': 27}), 3: (1, {'@': 27})}, 118: {19: (0, 120), 8: (0, 128), 27: (0, 61)}, 119: {0: (1, {'@': 104}), 29: (1, {'@': 104}), 2: (1, {'@': 104}), 3: (1, {'@': 104})}, 120: {10: (0, 165), 9: (0, 69)}, 121: {5: (1, {'@': 88}), 8: (1, {'@': 88}), 2: (1, {'@': 88})}, 122: {19: (0, 120), 27: (0, 108), 26: (0, 97), 8: (0, 102)}, 123: {10: (1, {'@': 117}), 30: (1, {'@': 117}), 31: (1, {'@': 117})}, 124: {14: (1, {'@': 73}), 15: (1, {'@': 73}), 8: (1, {'@': 73}), 2: (1, {'@': 73})}, 125: {0: (1, {'@': 23}), 29: (1, {'@': 23}), 2: (1, {'@': 23}), 3: (1, {'@': 23})}, 126: {0: (1, {'@': 108}), 1: (1, {'@': 108}), 2: (1, {'@': 108}), 3: (1, {'@': 108})}, 127: {19: (0, 120), 8: (0, 148), 27: (0, 61)}, 128: {5: (1, {'@': 82}), 8: (1, {'@': 82}), 2: (1, {'@': 82})}, 129: {12: (0, 140), 11: (0, 142), 13: (0, 181)}, 130: {19: (0, 120), 8: (0, 116), 27: (0, 108), 26: (0, 118)}, 131: {32: (0, 27), 33: (0, 141)}, 132: {14: (1, {'@': 71}), 15: (1, {'@': 71}), 8: (1, {'@': 71}), 2: (1, {'@': 71})}, 133: {5: (1, {'@': 67}), 8: (1, {'@': 67}), 25: (1, {'@': 67}), 2: (1, {'@': 67}), 14: (1, {'@': 67}), 15: (1, {'@': 67})}, 134: {10: (1, {'@': 118}), 30: (1, {'@': 118}), 31: (1, {'@': 118})}, 135: {4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35), 8: (0, 31)}, 136: {10: (1, {'@': 116}), 30: (1, {'@': 116}), 31: (1, {'@': 116})}, 137: {4: (0, 94), 28: (0, 11), 16: (0, 95), 6: (0, 68), 15: (0, 34), 2: (0, 197), 17: (0, 101), 18: (0, 81), 8: (0, 29), 14: (0, 16)}, 138: {32: (0, 30), 33: (0, 141)}, 139: {8: (1, {'@': 96}), 19: (1, {'@': 96})}, 140: {34: (0, 168), 30: (0, 136), 10: (0, 123)}, 141: {35: (0, 133)}, 142: {32: (0, 137), 33: (0, 141)}, 143: {0: (1, {'@': 37}), 1: (1, {'@': 37}), 2: (1, {'@': 37}), 3: (1, {'@': 37})}, 144: {6: (0, 112), 4: (0, 94), 2: (0, 197), 8: (1, {'@': 95}), 19: (1, {'@': 95})}, 145: {4: (0, 94), 23: (0, 1), 5: (0, 3), 6: (0, 104), 2: (0, 197), 24: (0, 77), 25: (0, 90), 8: (0, 113), 7: (0, 4)}, 146: {32: (0, 63), 33: (0, 141)}, 147: {13: (0, 191), 11: (0, 154), 36: (0, 185), 12: (0, 140), 37: (0, 151)}, 148: {14: (1, {'@': 70}), 15: (1, {'@': 70}), 8: (1, {'@': 70}), 2: (1, {'@': 70})}, 149: {}, 150: {9: (0, 147), 10: (0, 165)}, 151: {10: (0, 165), 9: (0, 190)}, 152: {0: (1, {'@': 57}), 1: (1, {'@': 57}), 2: (1, {'@': 57}), 3: (1, {'@': 57})}, 153: {0: (1, {'@': 42}), 1: (1, {'@': 42}), 2: (1, {'@': 42}), 3: (1, {'@': 42})}, 154: {32: (0, 145), 33: (0, 141)}, 155: {32: (0, 20), 33: (0, 141)}, 156: {32: (0, 74), 33: (0, 141)}, 157: {13: (0, 166), 12: (0, 140), 11: (0, 186)}, 158: {9: (0, 129), 10: (0, 165)}, 159: {38: (0, 126), 6: (0, 99), 4: (0, 94), 2: (0, 197), 3: (0, 164), 0: (0, 203), 39: (0, 188), 1: (1, {'@': 21})}, 160: {0: (1, {'@': 106}), 1: (1, {'@': 106}), 2: (1, {'@': 106}), 3: (1, {'@': 106})}, 161: {11: (1, {'@': 102}), 15: (1, {'@': 102}), 8: (1, {'@': 102}), 2: (1, {'@': 102}), 14: (1, {'@': 102}), 5: (1, {'@': 102}), 19: (1, {'@': 102}), 37: (1, {'@': 102})}, 162: {0: (1, {'@': 50}), 1: (1, {'@': 50}), 2: (1, {'@': 50}), 3: (1, {'@': 50})}, 163: {4: (0, 94), 5: (0, 3), 8: (0, 26), 6: (0, 104), 2: (0, 197), 7: (0, 35)}, 164: {9: (0, 173), 10: (0, 165)}, 165: {5: (1, {'@': 101}), 11: (1, {'@': 101}), 12: (1, {'@': 101}), 2: (1, {'@': 101}), 8: (1, {'@': 101}), 15: (1, {'@': 101}), 14: (1, {'@': 101}), 19: (1, {'@': 101}), 20: (1, {'@': 101}), 3: (1, {'@': 101}), 37: (1, {'@': 101})}, 166: {11: (0, 156)}, 167: {0: (1, {'@': 41}), 1: (1, {'@': 41}), 2: (1, {'@': 41}), 3: (1, {'@': 41})}, 168: {10: (0, 195), 31: (0, 161), 30: (0, 134)}, 169: {8: (0, 52), 4: (0, 94), 23: (0, 44), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 4)}, 170: {40: (0, 125)}, 171: {11: (0, 183), 37: (0, 151), 36: (0, 192)}, 172: {5: (1, {'@': 121}), 2: (1, {'@': 121}), 15: (1, {'@': 121}), 8: (1, {'@': 121}), 19: (1, {'@': 121}), 0: (1, {'@': 121}), 3: (1, {'@': 121})}, 173: {13: (0, 171), 36: (0, 201), 11: (0, 177), 12: (0, 140), 37: (0, 151)}, 174: {5: (1, {'@': 85}), 8: (1, {'@': 85}), 2: (1, {'@': 85})}, 175: {6: (0, 99), 4: (0, 94), 39: (0, 73), 2: (0, 197), 41: (0, 180), 29: (0, 170), 3: (0, 164), 42: (0, 193), 38: (0, 160), 0: (0, 203), 43: (0, 149), 44: (0, 119)}, 176: {32: (0, 178), 33: (0, 141)}, 177: {32: (0, 194), 33: (0, 141)}, 178: {8: (0, 117), 4: (0, 94), 23: (0, 163), 5: (0, 3), 6: (0, 104), 2: (0, 197), 24: (0, 169), 25: (0, 90), 7: (0, 4)}, 179: {0: (1, {'@': 44}), 1: (1, {'@': 44}), 2: (1, {'@': 44}), 3: (1, {'@': 44})}, 180: {38: (0, 126), 6: (0, 99), 4: (0, 94), 2: (0, 197), 3: (0, 164), 0: (0, 203), 39: (0, 188), 1: (1, {'@': 22})}, 181: {11: (0, 138)}, 182: {0: (1, {'@': 33}), 1: (1, {'@': 33}), 2: (1, {'@': 33}), 3: (1, {'@': 33})}, 183: {32: (0, 23), 33: (0, 141)}, 184: {32: (0, 49), 33: (0, 141)}, 185: {11: (0, 146)}, 186: {32: (0, 200), 33: (0, 141)}, 187: {4: (0, 94), 5: (0, 3), 8: (0, 40), 6: (0, 104), 2: (0, 197), 7: (0, 35)}, 188: {0: (1, {'@': 109}), 1: (1, {'@': 109}), 2: (1, {'@': 109}), 3: (1, {'@': 109})}, 189: {0: (1, {'@': 105}), 29: (1, {'@': 105}), 2: (1, {'@': 105}), 3: (1, {'@': 105})}, 190: {11: (1, {'@': 69})}, 191: {11: (0, 184), 36: (0, 41), 37: (0, 151)}, 192: {11: (0, 131)}, 193: {6: (0, 99), 4: (0, 94), 39: (0, 73), 41: (0, 159), 2: (0, 197), 3: (0, 164), 29: (0, 170), 38: (0, 160), 0: (0, 203), 44: (0, 189)}, 194: {4: (0, 94), 23: (0, 13), 5: (0, 3), 6: (0, 104), 2: (0, 197), 24: (0, 67), 25: (0, 90), 7: (0, 4), 8: (0, 0)}, 195: {10: (1, {'@': 119}), 30: (1, {'@': 119}), 31: (1, {'@': 119})}, 196: {0: (1, {'@': 35}), 1: (1, {'@': 35}), 2: (1, {'@': 35}), 3: (1, {'@': 35})}, 197: {5: (1, {'@': 120}), 2: (1, {'@': 120}), 15: (1, {'@': 120}), 8: (1, {'@': 120}), 19: (1, {'@': 120}), 0: (1, {'@': 120}), 3: (1, {'@': 120})}, 198: {4: (0, 94), 23: (0, 187), 5: (0, 3), 6: (0, 104), 2: (0, 197), 8: (0, 182), 7: (0, 4)}, 199: {0: (1, {'@': 34}), 1: (1, {'@': 34}), 2: (1, {'@': 34}), 3: (1, {'@': 34})}, 200: {4: (0, 94), 16: (0, 95), 6: (0, 68), 15: (0, 34), 2: (0, 197), 8: (0, 54), 17: (0, 101), 18: (0, 81), 28: (0, 17), 14: (0, 16)}, 201: {11: (0, 155)}, 202: {4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35), 8: (0, 22)}, 203: {10: (0, 165), 9: (0, 157)}, 204: {4: (0, 94), 5: (0, 3), 6: (0, 104), 2: (0, 197), 7: (0, 35), 8: (0, 199)}}, 'start_states': {'start': 175}, 'end_states': {'start': 149}}, 'options': {'debug': False, 'keep_all_tokens': False, 'tree_class': None, 'cache': False, 'postlex': None, 'parser': 'lalr', 'lexer': 'contextual', 'transformer': None, 'start': ['start'], 'priority': 'normal', 'ambiguity': 'auto', 'regex': False, 'propagate_positions': False, 'lexer_callbacks': {}, 'maybe_placeholders': False, 'edit_terminals': None, 'g_regex_flags': 0, 'use_bytes': False, 'import_paths': [], 'source_path': None}, '__type__': 'ParsingFrontend'}, 'rules': [{'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}, {'@': 104}, {'@': 105}, {'@': 106}, {'@': 107}, {'@': 108}, {'@': 109}, {'@': 110}, {'@': 111}, {'@': 112}, {'@': 113}, {'@': 114}, {'@': 115}, {'@': 116}, {'@': 117}, {'@': 118}, {'@': 119}, {'@': 120}, {'@': 121}], 'options': {'debug': False, 'keep_all_tokens': False, 'tree_class': None, 'cache': False, 'postlex': None, 'parser': 'lalr', 'lexer': 'contextual', 'transformer': None, 'start': ['start'], 'priority': 'normal', 'ambiguity': 'auto', 'regex': False, 'propagate_positions': False, 'lexer_callbacks': {}, 'maybe_placeholders': False, 'edit_terminals': None, 'g_regex_flags': 0, 'use_bytes': False, 'import_paths': [], 'source_path': None}, '__type__': 'Lark'} ) MEMO = ( -{0: {'name': 'IDENTIFIER', 'pattern': {'value': '(?:(?:[A-Z]|[a-z])|_)(?:(?:(?:[A-Z]|[a-z])|[0-9]|_))*', 'flags': [], '_width': [1, 4294967295], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 1: {'name': 'WS', 'pattern': {'value': '(?:[ \t\x0c\r\n])+', 'flags': [], '_width': [1, 4294967295], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 2: {'name': 'PRIMITIVE', 'pattern': {'value': '(?:address|string|buffer|u?int(8|16|32|64)?|size)', 'flags': [], '_width': [3, 7], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 3: {'name': 'UID', 'pattern': {'value': '[0-9a-fA-F]{16}', 'flags': [], '_width': [16, 16], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 4: {'name': 'OPTION', 'pattern': {'value': '(?:(?:[A-Z]|[a-z])|_)(?:(?:(?:[A-Z]|[a-z])|[0-9]|_))*:(?:(?:[A-Z]|[a-z])|_)(?:(?:(?:[A-Z]|[a-z])|[0-9]|_))*', 'flags': [], '_width': [3, 4294967295], '__type__': 'PatternRE'}, 'priority': 2, '__type__': 'TerminalDef'}, 5: {'name': 'COMMENT', 'pattern': {'value': '#.*', 'flags': [], '_width': [1, 4294967295], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 6: {'name': 'PATH', 'pattern': {'value': '"[^"]*"', 'flags': [], '_width': [2, 4294967295], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 7: {'name': 'IMPORT', 'pattern': {'value': 'import', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 8: {'name': 'OBJECT', 'pattern': {'value': 'object', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 9: {'name': 'LBRACE', 'pattern': {'value': '{', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 10: {'name': 'RBRACE', 'pattern': {'value': '}', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 11: {'name': 'INTERFACE', 'pattern': {'value': 'interface', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 12: {'name': 'EXPOSE', 'pattern': {'value': 'expose', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 13: {'name': '__ANON_0', 'pattern': {'value': 'uid', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 14: {'name': 'COLON', 'pattern': {'value': ':', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 15: {'name': 'FUNCTION', 'pattern': {'value': 'function', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 16: {'name': 'METHOD', 'pattern': {'value': 'method', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 17: {'name': 'PARAM', 'pattern': {'value': 'param', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 18: {'name': 'LSQB', 'pattern': {'value': '[', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 19: {'name': 'RSQB', 'pattern': {'value': ']', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 20: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__start_star_0', '__type__': 'NonTerminal'}, {'name': '__start_plus_1', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 21: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__start_plus_1', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 22: {'origin': {'name': 'import_statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IMPORT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'PATH', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 23: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 24: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 25: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 26: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 27: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 28: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 5, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 29: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 6, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 30: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 7, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 31: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 8, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 32: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 9, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 33: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 10, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 34: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 11, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 35: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 12, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 36: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 13, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 37: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 14, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 38: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 15, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 39: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__interface_star_3', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 40: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 41: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__interface_star_3', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 42: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 43: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__interface_star_3', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 44: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 5, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 45: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__interface_star_3', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 6, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 46: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 7, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 47: {'origin': {'name': 'interface_param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expose', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 48: {'origin': {'name': 'interface_param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'function', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 49: {'origin': {'name': 'expose', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EXPOSE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'type', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 50: {'origin': {'name': 'uid', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__ANON_0', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'UID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 51: {'origin': {'name': 'super', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'COLON', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 52: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 53: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 54: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 55: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 56: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 57: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 5, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 58: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 6, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 59: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 7, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 60: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}], 'order': 8, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 61: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 9, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 62: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 10, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 63: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 11, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 64: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 65: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 66: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 67: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 68: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 69: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 5, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 70: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 6, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 71: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 7, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 72: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}], 'order': 8, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 73: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 9, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 74: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 10, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 75: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 11, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 76: {'origin': {'name': 'param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PARAM', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'type', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'description', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 77: {'origin': {'name': 'param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PARAM', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'type', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 78: {'origin': {'name': 'param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PARAM', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'type', '__type__': 'NonTerminal'}, {'name': 'description', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 79: {'origin': {'name': 'param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PARAM', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'type', '__type__': 'NonTerminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 80: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PRIMITIVE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 81: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'object_name', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 82: {'origin': {'name': 'object_name', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 83: {'origin': {'name': 'name', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IDENTIFIER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 84: {'origin': {'name': 'options', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LSQB', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__options_plus_5', '__type__': 'NonTerminal'}, {'name': 'RSQB', 'filter_out': True, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 85: {'origin': {'name': 'description', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__description_plus_6', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 86: {'origin': {'name': '__start_star_0', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'import_statement', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 87: {'origin': {'name': '__start_star_0', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__start_star_0', '__type__': 'NonTerminal'}, {'name': 'import_statement', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 88: {'origin': {'name': '__start_plus_1', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'object', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 89: {'origin': {'name': '__start_plus_1', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'interface', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 90: {'origin': {'name': '__start_plus_1', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__start_plus_1', '__type__': 'NonTerminal'}, {'name': 'object', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 91: {'origin': {'name': '__start_plus_1', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__start_plus_1', '__type__': 'NonTerminal'}, {'name': 'interface', '__type__': 'NonTerminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 92: {'origin': {'name': '__object_star_2', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'method', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 93: {'origin': {'name': '__object_star_2', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'method', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 94: {'origin': {'name': '__interface_star_3', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'interface_param', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 95: {'origin': {'name': '__interface_star_3', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__interface_star_3', '__type__': 'NonTerminal'}, {'name': 'interface_param', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 96: {'origin': {'name': '__function_star_4', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'param', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 97: {'origin': {'name': '__function_star_4', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'param', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 98: {'origin': {'name': '__options_plus_5', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OPTION', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 99: {'origin': {'name': '__options_plus_5', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IDENTIFIER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 100: {'origin': {'name': '__options_plus_5', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__options_plus_5', '__type__': 'NonTerminal'}, {'name': 'OPTION', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 101: {'origin': {'name': '__options_plus_5', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__options_plus_5', '__type__': 'NonTerminal'}, {'name': 'IDENTIFIER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 102: {'origin': {'name': '__description_plus_6', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'COMMENT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 103: {'origin': {'name': '__description_plus_6', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__description_plus_6', '__type__': 'NonTerminal'}, {'name': 'COMMENT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}} +{0: {'name': 'IDENTIFIER', 'pattern': {'value': '(?:(?:[A-Z]|[a-z])|_)(?:(?:(?:[A-Z]|[a-z])|[0-9]|_))*', 'flags': [], '_width': [1, 4294967295], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 1: {'name': 'WS', 'pattern': {'value': '(?:[ \t\x0c\r\n])+', 'flags': [], '_width': [1, 4294967295], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 2: {'name': 'PRIMITIVE', 'pattern': {'value': '(?:address|string|buffer|u?int(8|16|32|64)?|size)', 'flags': [], '_width': [3, 7], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 3: {'name': 'UID', 'pattern': {'value': '[0-9a-fA-F]{16}', 'flags': [], '_width': [16, 16], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 4: {'name': 'OPTION', 'pattern': {'value': '(?:(?:[A-Z]|[a-z])|_)(?:(?:(?:[A-Z]|[a-z])|[0-9]|_))*:(?:(?:[A-Z]|[a-z])|_)(?:(?:(?:[A-Z]|[a-z])|[0-9]|_))*', 'flags': [], '_width': [3, 4294967295], '__type__': 'PatternRE'}, 'priority': 2, '__type__': 'TerminalDef'}, 5: {'name': 'COMMENT', 'pattern': {'value': '#.*', 'flags': [], '_width': [1, 4294967295], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 6: {'name': 'PATH', 'pattern': {'value': '"[^"]*"', 'flags': [], '_width': [2, 4294967295], '__type__': 'PatternRE'}, 'priority': 1, '__type__': 'TerminalDef'}, 7: {'name': 'IMPORT', 'pattern': {'value': 'import', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 8: {'name': 'OBJECT', 'pattern': {'value': 'object', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 9: {'name': 'LBRACE', 'pattern': {'value': '{', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 10: {'name': 'RBRACE', 'pattern': {'value': '}', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 11: {'name': 'INTERFACE', 'pattern': {'value': 'interface', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 12: {'name': 'EXPOSE', 'pattern': {'value': 'expose', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 13: {'name': '__ANON_0', 'pattern': {'value': 'uid', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 14: {'name': 'CNAME', 'pattern': {'value': 'cname', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 15: {'name': 'COLON', 'pattern': {'value': ':', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 16: {'name': 'FUNCTION', 'pattern': {'value': 'function', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 17: {'name': 'METHOD', 'pattern': {'value': 'method', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 18: {'name': 'PARAM', 'pattern': {'value': 'param', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 19: {'name': 'LSQB', 'pattern': {'value': '[', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 20: {'name': 'RSQB', 'pattern': {'value': ']', 'flags': [], '__type__': 'PatternStr'}, 'priority': 1, '__type__': 'TerminalDef'}, 21: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__start_star_0', '__type__': 'NonTerminal'}, {'name': '__start_plus_1', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 22: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__start_plus_1', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 23: {'origin': {'name': 'import_statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IMPORT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'PATH', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 24: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 25: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 26: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 27: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 28: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 29: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 5, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 30: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 6, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 31: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 7, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 32: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 8, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 33: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 9, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 34: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 10, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 35: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 11, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 36: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 12, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 37: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 13, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 38: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 14, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 39: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 15, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 40: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 16, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 41: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 17, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 42: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 18, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 43: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 19, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 44: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 20, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 45: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 21, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 46: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 22, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 47: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 23, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 48: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 24, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 49: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 25, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 50: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 26, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 51: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'super', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 27, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 52: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 28, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 53: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'cname', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 29, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 54: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 30, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 55: {'origin': {'name': 'object', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 31, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 56: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__interface_star_3', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 57: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 58: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__interface_star_3', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 59: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 60: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__interface_star_3', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 61: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 5, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 62: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': '__interface_star_3', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 6, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 63: {'origin': {'name': 'interface', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTERFACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'uid', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 7, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 64: {'origin': {'name': 'interface_param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expose', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 65: {'origin': {'name': 'interface_param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'function', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 66: {'origin': {'name': 'expose', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EXPOSE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'type', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 67: {'origin': {'name': 'uid', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__ANON_0', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'UID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 68: {'origin': {'name': 'cname', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CNAME', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'IDENTIFIER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 69: {'origin': {'name': 'super', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'COLON', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 70: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 71: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 72: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 73: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 74: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 75: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 5, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 76: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 6, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 77: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 7, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 78: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}], 'order': 8, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 79: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 9, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 80: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 10, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 81: {'origin': {'name': 'function', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 11, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 82: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 83: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 84: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 85: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 86: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 87: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'description', '__type__': 'NonTerminal'}, {'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 5, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 88: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 6, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 89: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 7, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 90: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}], 'order': 8, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 91: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 9, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 92: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'LBRACE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'RBRACE', 'filter_out': True, '__type__': 'Terminal'}], 'order': 10, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 93: {'origin': {'name': 'method', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'METHOD', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 11, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 94: {'origin': {'name': 'param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PARAM', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'type', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}, {'name': 'description', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 95: {'origin': {'name': 'param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PARAM', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'type', '__type__': 'NonTerminal'}, {'name': 'options', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 96: {'origin': {'name': 'param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PARAM', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'type', '__type__': 'NonTerminal'}, {'name': 'description', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 97: {'origin': {'name': 'param', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PARAM', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}, {'name': 'type', '__type__': 'NonTerminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 98: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PRIMITIVE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 99: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'object_name', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 100: {'origin': {'name': 'object_name', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OBJECT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'name', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 101: {'origin': {'name': 'name', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IDENTIFIER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 102: {'origin': {'name': 'options', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LSQB', 'filter_out': True, '__type__': 'Terminal'}, {'name': '__options_plus_5', '__type__': 'NonTerminal'}, {'name': 'RSQB', 'filter_out': True, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 103: {'origin': {'name': 'description', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__description_plus_6', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 104: {'origin': {'name': '__start_star_0', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'import_statement', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 105: {'origin': {'name': '__start_star_0', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__start_star_0', '__type__': 'NonTerminal'}, {'name': 'import_statement', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 106: {'origin': {'name': '__start_plus_1', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'object', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 107: {'origin': {'name': '__start_plus_1', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'interface', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 108: {'origin': {'name': '__start_plus_1', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__start_plus_1', '__type__': 'NonTerminal'}, {'name': 'object', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 109: {'origin': {'name': '__start_plus_1', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__start_plus_1', '__type__': 'NonTerminal'}, {'name': 'interface', '__type__': 'NonTerminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 110: {'origin': {'name': '__object_star_2', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'method', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 111: {'origin': {'name': '__object_star_2', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__object_star_2', '__type__': 'NonTerminal'}, {'name': 'method', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 112: {'origin': {'name': '__interface_star_3', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'interface_param', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 113: {'origin': {'name': '__interface_star_3', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__interface_star_3', '__type__': 'NonTerminal'}, {'name': 'interface_param', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 114: {'origin': {'name': '__function_star_4', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'param', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 115: {'origin': {'name': '__function_star_4', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__function_star_4', '__type__': 'NonTerminal'}, {'name': 'param', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 116: {'origin': {'name': '__options_plus_5', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OPTION', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 117: {'origin': {'name': '__options_plus_5', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IDENTIFIER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 118: {'origin': {'name': '__options_plus_5', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__options_plus_5', '__type__': 'NonTerminal'}, {'name': 'OPTION', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 119: {'origin': {'name': '__options_plus_5', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__options_plus_5', '__type__': 'NonTerminal'}, {'name': 'IDENTIFIER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 120: {'origin': {'name': '__description_plus_6', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'COMMENT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 121: {'origin': {'name': '__description_plus_6', '__type__': 'NonTerminal'}, 'expansion': [{'name': '__description_plus_6', '__type__': 'NonTerminal'}, {'name': 'COMMENT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}} ) Shift = 0 Reduce = 1 diff --git a/scripts/definitions/transformer.py b/scripts/definitions/transformer.py index d181682..f2746a0 100644 --- a/scripts/definitions/transformer.py +++ b/scripts/definitions/transformer.py @@ -1,11 +1,12 @@ from .parser import Transformer, v_args def get_opts(args): - from .types import Description, Options, Type, UID + from .types import CName, Description, Options, Type, UID kinds = { Description: "desc", Options: "opts", + CName: "cname", UID: "uid", Type: "typename", } @@ -89,6 +90,11 @@ class DefTransformer(Transformer): def uid(self, s): return s + @v_args(inline=True) + def cname(self, s): + from .types import CName + return CName(s) + @v_args(inline=True) def name(self, s): return s diff --git a/scripts/definitions/types/__init__.py b/scripts/definitions/types/__init__.py index 5b76bca..c898314 100644 --- a/scripts/definitions/types/__init__.py +++ b/scripts/definitions/types/__init__.py @@ -2,6 +2,7 @@ def _indent(x): from textwrap import indent return indent(str(x), ' ') +class CName(str): pass class Description(str): pass class Import(str): pass diff --git a/scripts/definitions/types/interface.py b/scripts/definitions/types/interface.py index db95975..3de0d18 100644 --- a/scripts/definitions/types/interface.py +++ b/scripts/definitions/types/interface.py @@ -30,7 +30,8 @@ class Interface: parts.extend(map(_indent, self.functions)) return "\n".join(parts) - def __methods(self): + @property + def methods(self): mm = [(i, None, self.functions[i]) for i in range(len(self.functions))] base = len(mm) @@ -39,5 +40,3 @@ class Interface: base += len(o.methods) return mm - - methods = property(__methods) diff --git a/scripts/definitions/types/object.py b/scripts/definitions/types/object.py index 7f1dd45..079c3a1 100644 --- a/scripts/definitions/types/object.py +++ b/scripts/definitions/types/object.py @@ -2,13 +2,14 @@ from . import _indent from . import Options class Object: - def __init__(self, name, uid, typename=None, opts=Options(), desc="", children=tuple()): + def __init__(self, name, uid, typename=None, opts=Options(), desc="", children=tuple(), cname=None): self.name = name self.uid = uid self.options = opts self.desc = desc self.super = typename self.methods = children + self.cname = cname or name from . import ObjectRef self.__ref = ObjectRef(name) diff --git a/scripts/definitions/types/objref.py b/scripts/definitions/types/objref.py index c12573e..0e5dda7 100644 --- a/scripts/definitions/types/objref.py +++ b/scripts/definitions/types/objref.py @@ -20,11 +20,10 @@ class ObjectRef(Type): if "list" in options: two = "size_t" + one = f"{one} *" + if out: - one = f"const {one} *" two += " *" - else: - one = f"{one} *" return ((one, ""), (two, "_count")) else: @@ -33,7 +32,13 @@ class ObjectRef(Type): return ((one, ""),) def cxx_names(self, options): - return self.c_names(options) + if not self.needs_object(options): + return self.c_names(options) + return ((f"obj::{self.name} *", ""),) + + def needs_object(self, options): + return not bool({"out", "inout", "list", "handle"}.intersection(options)) + @classmethod def connect(cls, objects): diff --git a/scripts/definitions/types/type.py b/scripts/definitions/types/type.py index a337e8f..e219425 100644 --- a/scripts/definitions/types/type.py +++ b/scripts/definitions/types/type.py @@ -11,3 +11,5 @@ class Type: def cxx_names(self, options): raise NotImplemented("Call to base Type.c_names") + def needs_object(self, options): + return False diff --git a/src/kernel/cpu.cpp b/src/kernel/cpu.cpp index a6badf4..513d241 100644 --- a/src/kernel/cpu.cpp +++ b/src/kernel/cpu.cpp @@ -73,10 +73,10 @@ cpu_init(cpu_data *cpu, bool bsp) } // Set the initial process as the kernel "process" - extern process &g_kernel_process; + extern obj::process &g_kernel_process; cpu->process = &g_kernel_process; - thread *idle = thread::create_idle_thread( + obj::thread *idle = obj::thread::create_idle_thread( g_kernel_process, scheduler::max_priority, cpu->rsp0); diff --git a/src/kernel/cpu.h b/src/kernel/cpu.h index 065af11..a63785d 100644 --- a/src/kernel/cpu.h +++ b/src/kernel/cpu.h @@ -5,11 +5,14 @@ class GDT; class IDT; class lapic; -class process; struct TCB; -class thread; class TSS; +namespace obj { + class process; + class thread; +} + struct cpu_state { uint64_t r15, r14, r13, r12, r11, r10, r9, r8; @@ -47,8 +50,8 @@ struct cpu_data uintptr_t rsp3; uint64_t rflags3; TCB *tcb; - thread *thread; - process *process; + obj::thread *thread; + obj::process *process; IDT *idt; TSS *tss; GDT *gdt; diff --git a/src/kernel/device_manager.cpp b/src/kernel/device_manager.cpp index 0195c2b..54a8821 100644 --- a/src/kernel/device_manager.cpp +++ b/src/kernel/device_manager.cpp @@ -14,7 +14,7 @@ #include "objects/endpoint.h" -static endpoint * const ignore_endpoint = reinterpret_cast(-1ull); +static obj::endpoint * const ignore_endpoint = reinterpret_cast(-1ull); static const char expected_signature[] = "RSD PTR "; @@ -380,7 +380,7 @@ device_manager::dispatch_irq(unsigned irq) if (irq >= m_irqs.count()) return false; - endpoint *e = m_irqs[irq]; + obj::endpoint *e = m_irqs[irq]; if (!e || e == ignore_endpoint) return e == ignore_endpoint; @@ -389,7 +389,7 @@ device_manager::dispatch_irq(unsigned irq) } bool -device_manager::bind_irq(unsigned irq, endpoint *target) +device_manager::bind_irq(unsigned irq, obj::endpoint *target) { // TODO: grow if under max size if (irq >= m_irqs.count()) @@ -400,7 +400,7 @@ device_manager::bind_irq(unsigned irq, endpoint *target) } void -device_manager::unbind_irqs(endpoint *target) +device_manager::unbind_irqs(obj::endpoint *target) { const size_t count = m_irqs.count(); for (size_t i = 0; i < count; ++i) { diff --git a/src/kernel/device_manager.h b/src/kernel/device_manager.h index a658eb1..c6c6778 100644 --- a/src/kernel/device_manager.h +++ b/src/kernel/device_manager.h @@ -10,7 +10,10 @@ struct acpi_table_header; class block_device; -class endpoint; + +namespace obj { + class endpoint; +} using irq_callback = void (*)(void *); @@ -43,11 +46,11 @@ public: /// \arg irq The IRQ number to bind /// \arg target The endpoint to recieve messages when the IRQ is signalled /// \returns True on success - bool bind_irq(unsigned irq, endpoint *target); + bool bind_irq(unsigned irq, obj::endpoint *target); /// Remove IRQ bindings for an endpoint /// \arg target The endpoint to remove - void unbind_irqs(endpoint *target); + void unbind_irqs(obj::endpoint *target); /// Allocate an MSI IRQ for a device /// \arg name Name of the interrupt, for display to user @@ -161,7 +164,7 @@ private: util::vector m_pci; util::vector m_devices; - util::vector m_irqs; + util::vector m_irqs; util::vector m_blockdevs; diff --git a/src/kernel/interrupts.cpp b/src/kernel/interrupts.cpp index defc231..9c57d4b 100644 --- a/src/kernel/interrupts.cpp +++ b/src/kernel/interrupts.cpp @@ -125,7 +125,7 @@ isr_handler(cpu_state *regs) static_cast(regs->errorcode); vm_space &space = user - ? process::current().space() + ? obj::process::current().space() : vm_space::kernel_space(); if (cr2 && space.handle_fault(cr2, ft)) diff --git a/src/kernel/logger.cpp b/src/kernel/logger.cpp index 562d27f..cdf9f27 100644 --- a/src/kernel/logger.cpp +++ b/src/kernel/logger.cpp @@ -86,7 +86,7 @@ logger::output(level severity, logs area, const char *fmt, va_list args) memcpy(out, buffer, n); m_buffer.commit(n); - system &sys = system::get(); + obj::system &sys = obj::system::get(); sys.assert_signal(j6_signal_system_has_log); } diff --git a/src/kernel/main.cpp b/src/kernel/main.cpp index 4f18ec0..05b36b2 100644 --- a/src/kernel/main.cpp +++ b/src/kernel/main.cpp @@ -153,10 +153,11 @@ start_aps(lapic &apic, const util::vector &ids, void *kpml4) { using mem::frame_size; using mem::kernel_stack_pages; + using obj::vm_flags; extern size_t ap_startup_code_size; - extern process &g_kernel_process; - extern vm_area_guarded &g_kernel_stacks; + extern obj::process &g_kernel_process; + extern obj::vm_area_guarded &g_kernel_stacks; clock &clk = clock::get(); @@ -173,7 +174,7 @@ start_aps(lapic &apic, const util::vector &ids, void *kpml4) // Copy the startup code somwhere the real mode trampoline can run uintptr_t addr = 0x8000; // TODO: find a valid address, rewrite addresses uint8_t vector = addr >> 12; - vm_area *vma = new vm_area_fixed(addr, 0x1000, vm_flags::write); + obj::vm_area *vma = new obj::vm_area_fixed(addr, 0x1000, vm_flags::write); vm_space::kernel_space().add(addr, vma); memcpy( reinterpret_cast(addr), diff --git a/src/kernel/memory_bootstrap.cpp b/src/kernel/memory_bootstrap.cpp index a80b8db..c448f35 100644 --- a/src/kernel/memory_bootstrap.cpp +++ b/src/kernel/memory_bootstrap.cpp @@ -22,6 +22,8 @@ using bootproto::allocation_register; using bootproto::section_flags; +using obj::vm_flags; + extern "C" void initialize_main_thread(); extern "C" uintptr_t initialize_main_user_stack(); @@ -34,13 +36,13 @@ heap_allocator &g_kernel_heap = __g_kernel_heap_storage.value; static util::no_construct __g_frame_allocator_storage; frame_allocator &g_frame_allocator = __g_frame_allocator_storage.value; -static util::no_construct __g_kernel_heap_area_storage; -vm_area_untracked &g_kernel_heap_area = __g_kernel_heap_area_storage.value; +static util::no_construct __g_kernel_heap_area_storage; +obj::vm_area_untracked &g_kernel_heap_area = __g_kernel_heap_area_storage.value; -static util::no_construct __g_kernel_stacks_storage; -vm_area_guarded &g_kernel_stacks = __g_kernel_stacks_storage.value; +static util::no_construct __g_kernel_stacks_storage; +obj::vm_area_guarded &g_kernel_stacks = __g_kernel_stacks_storage.value; -vm_area_guarded g_kernel_buffers { +obj::vm_area_guarded g_kernel_buffers { mem::buffers_offset, mem::kernel_buffer_pages, mem::buffers_size, @@ -81,15 +83,15 @@ memory_initialize_pre_ctors(bootproto::args &kargs) reg = reg->next; } - process *kp = process::create_kernel_process(kpml4); + obj::process *kp = obj::process::create_kernel_process(kpml4); vm_space &vm = kp->space(); - vm_area *heap = new (&g_kernel_heap_area) - vm_area_untracked(mem::heap_size, vm_flags::write); + obj::vm_area *heap = new (&g_kernel_heap_area) + obj::vm_area_untracked(mem::heap_size, vm_flags::write); vm.add(mem::heap_offset, heap); - vm_area *stacks = new (&g_kernel_stacks) vm_area_guarded { + obj::vm_area *stacks = new (&g_kernel_stacks) obj::vm_area_guarded { mem::stacks_offset, mem::kernel_stack_pages, mem::stacks_size, @@ -171,8 +173,8 @@ log_mtrrs() void load_init_server(bootproto::program &program, uintptr_t modules_address) { - process *p = new process; - p->add_handle(&system::get()); + obj::process *p = new obj::process; + p->add_handle(&obj::system::get(), obj::system::init_caps); vm_space &space = p->space(); for (const auto § : program.sections) { @@ -180,15 +182,15 @@ load_init_server(bootproto::program &program, uintptr_t modules_address) ((sect.type && section_flags::execute) ? vm_flags::exec : vm_flags::none) | ((sect.type && section_flags::write) ? vm_flags::write : vm_flags::none); - vm_area *vma = new vm_area_fixed(sect.phys_addr, sect.size, flags); + obj::vm_area *vma = new obj::vm_area_fixed(sect.phys_addr, sect.size, flags); space.add(sect.virt_addr, vma); } uint64_t iopl = (3ull << 12); - thread *main = p->create_thread(); + obj::thread *main = p->create_thread(); main->add_thunk_user(program.entrypoint, 0, iopl); - main->set_state(thread::state::ready); + main->set_state(obj::thread::state::ready); // Hacky: No process exists to have created a stack for init; it needs to create // its own stack. We take advantage of that to use rsp to pass it the init modules diff --git a/src/kernel/objects/channel.cpp b/src/kernel/objects/channel.cpp index a5bb72e..b413ad0 100644 --- a/src/kernel/objects/channel.cpp +++ b/src/kernel/objects/channel.cpp @@ -5,7 +5,9 @@ #include "objects/channel.h" #include "objects/vm_area.h" -extern vm_area_guarded g_kernel_buffers; +extern obj::vm_area_guarded g_kernel_buffers; + +namespace obj { constexpr size_t buffer_bytes = mem::kernel_buffer_pages * mem::frame_size; @@ -89,3 +91,5 @@ channel::on_no_handles() kobject::on_no_handles(); delete this; } + +} // namespace obj diff --git a/src/kernel/objects/channel.h b/src/kernel/objects/channel.h index 8c4001d..d2d44aa 100644 --- a/src/kernel/objects/channel.h +++ b/src/kernel/objects/channel.h @@ -7,11 +7,16 @@ #include "objects/kobject.h" +namespace obj { + /// Channels are bi-directional means of sending messages class channel : public kobject { public: + /// Capabilities on a newly constructed channel handle + constexpr static j6_cap_t creation_caps = 0; + channel(); virtual ~channel(); @@ -48,3 +53,5 @@ private: uintptr_t m_data; util::bip_buffer m_buffer; }; + +} // namespace obj diff --git a/src/kernel/objects/endpoint.cpp b/src/kernel/objects/endpoint.cpp index c0ba42b..9b37697 100644 --- a/src/kernel/objects/endpoint.cpp +++ b/src/kernel/objects/endpoint.cpp @@ -5,6 +5,8 @@ #include "objects/thread.h" #include "vm_space.h" +namespace obj { + endpoint::endpoint() : kobject {kobject::type::endpoint} {} @@ -135,3 +137,5 @@ endpoint::do_message_copy(const endpoint::thread_data &sender, endpoint::thread_ return j6_status_ok; } + +} // namespace obj diff --git a/src/kernel/objects/endpoint.h b/src/kernel/objects/endpoint.h index b7de868..6d47430 100644 --- a/src/kernel/objects/endpoint.h +++ b/src/kernel/objects/endpoint.h @@ -7,11 +7,16 @@ #include "objects/kobject.h" +namespace obj { + /// Endpoints are objects that enable synchronous message-passing IPC class endpoint : public kobject { public: + /// Capabilities on a newly constructed endpoint handle + constexpr static j6_cap_t creation_caps = 0; + endpoint(); virtual ~endpoint(); @@ -69,3 +74,5 @@ private: util::vector m_blocked; }; + +} // namespace obj diff --git a/src/kernel/objects/event.h b/src/kernel/objects/event.h index 1544e1c..584e3cc 100644 --- a/src/kernel/objects/event.h +++ b/src/kernel/objects/event.h @@ -4,12 +4,19 @@ #include "objects/kobject.h" +namespace obj { + class event : public kobject { public: + /// Capabilities on a newly constructed event handle + constexpr static j6_cap_t creation_caps = 0; + event() : kobject(type::event) {} static constexpr kobject::type type = kobject::type::event; }; + +} // namespace obj diff --git a/src/kernel/objects/handle.h b/src/kernel/objects/handle.h new file mode 100644 index 0000000..46c7d4c --- /dev/null +++ b/src/kernel/objects/handle.h @@ -0,0 +1,82 @@ +#pragma once +/// \file handle.h +/// Definition of kobject handles + +#include +#include "objects/kobject.h" + +namespace obj { + +struct handle +{ + inline handle(j6_handle_t in_id, kobject *in_object, j6_cap_t in_caps) : + id {in_id}, object {in_object}, caps {in_caps} { + if (object) object->handle_retain(); + } + + inline handle(const handle &other) : + id {other.id}, object {other.object}, caps {other.caps} { + if (object) object->handle_retain(); + } + + inline handle(handle &&other) : + id {other.id}, object {other.object}, caps {other.caps} { + other.id = 0; + other.caps = 0; + other.object = nullptr; + } + + inline handle & operator=(const handle &other) { + if (object) object->handle_release(); + id = other.id; caps = other.caps; object = other.object; + if (object) object->handle_retain(); + return *this; + } + + inline handle & operator=(handle &&other) { + if (object) object->handle_release(); + id = other.id; caps = other.caps; object = other.object; + other.id = other.caps = 0; other.object = nullptr; + return *this; + } + + inline ~handle() { + if (object) object->handle_release(); + } + + inline bool has_cap(j6_cap_t test) const { + return (caps & test) == test; + } + + inline kobject::type type() const { + return object->get_type(); + } + + inline int compare(const handle &o) { + return id > o.id ? 1 : id < o.id ? -1 : 0; + } + + template + inline T * as() { + if (type() != T::type) return nullptr; + return reinterpret_cast(object); + } + + template + inline const T * as() const { + if (type() != T::type) return nullptr; + return reinterpret_cast(object); + } + + template <> + inline kobject * as() { return object; } + + template <> + inline const kobject * as() const { return object; } + + j6_handle_t id; + j6_cap_t caps; + kobject *object; +}; + +} // namespace obj diff --git a/src/kernel/objects/kobject.cpp b/src/kernel/objects/kobject.cpp index fc111f8..32e64c1 100644 --- a/src/kernel/objects/kobject.cpp +++ b/src/kernel/objects/kobject.cpp @@ -6,7 +6,8 @@ #include "objects/kobject.h" #include "objects/thread.h" -// TODO: per-cpu this? +namespace obj { + static j6_koid_t next_koids [static_cast(kobject::type::max)] = { 0 }; kobject::kobject(type t, j6_signal_t signals) : @@ -26,7 +27,8 @@ kobject::koid_generate(type t) { kassert(t < type::max, "Object type out of bounds"); uint64_t type_int = static_cast(t); - return (type_int << 48) | next_koids[type_int]++; + uint64_t id = __atomic_fetch_add(&next_koids[type_int], 1, __ATOMIC_SEQ_CST); + return (type_int << 48) | id; } kobject::type @@ -74,3 +76,5 @@ kobject::on_no_handles() { assert_signal(j6_signal_no_handles); } + +} // namespace obj diff --git a/src/kernel/objects/kobject.h b/src/kernel/objects/kobject.h index 6dc4eed..1ab9bfa 100644 --- a/src/kernel/objects/kobject.h +++ b/src/kernel/objects/kobject.h @@ -7,6 +7,8 @@ #include #include +namespace obj { + class thread; /// Base type for all user-interactable kernel objects @@ -98,3 +100,5 @@ private: protected: util::vector m_blocked_threads; }; + +} // namespace obj diff --git a/src/kernel/objects/process.cpp b/src/kernel/objects/process.cpp index 5203103..c3b1262 100644 --- a/src/kernel/objects/process.cpp +++ b/src/kernel/objects/process.cpp @@ -7,19 +7,22 @@ #include "objects/vm_area.h" #include "scheduler.h" + // This object is initialized _before_ global constructors are called, // so we don't want it to have a global constructor at all, lest it // overwrite the previous initialization. -static util::no_construct __g_kernel_process_storage; -process &g_kernel_process = __g_kernel_process_storage.value; +static util::no_construct __g_kernel_process_storage; +obj::process &g_kernel_process = __g_kernel_process_storage.value; +namespace obj { + process::process() : kobject {kobject::type::process}, m_next_handle {1}, m_state {state::running} { - j6_handle_t self = add_handle(this); + j6_handle_t self = add_handle(this, process::self_caps); kassert(self == self_handle(), "Process self-handle is not 1"); } @@ -34,8 +37,6 @@ process::process(page_table *kpml4) : process::~process() { - for (auto &it : m_handles) - if (it.val) it.val->handle_release(); } process & process::current() { return *current_cpu().process; } @@ -123,27 +124,27 @@ process::thread_exited(thread *th) } j6_handle_t -process::add_handle(kobject *obj) +process::add_handle(kobject *obj, j6_cap_t caps) { if (!obj) return j6_handle_invalid; - obj->handle_retain(); - j6_handle_t handle = m_next_handle++; - m_handles.insert(handle, obj); - return handle; + j6_handle_t id = m_next_handle++; + m_handles.insert(id, {id, obj, caps}); + + return id; } bool -process::remove_handle(j6_handle_t handle) +process::remove_handle(j6_handle_t id) { - kobject *obj = m_handles.find(handle); - if (obj) obj->handle_release(); - return m_handles.erase(handle); + return m_handles.erase(id); } -kobject * -process::lookup_handle(j6_handle_t handle) +handle * +process::lookup_handle(j6_handle_t id) { - return m_handles.find(handle); + return m_handles.find(id); } + +} // namespace obj diff --git a/src/kernel/objects/process.h b/src/kernel/objects/process.h index 406f4e1..1b6fb37 100644 --- a/src/kernel/objects/process.h +++ b/src/kernel/objects/process.h @@ -5,14 +5,23 @@ #include #include +#include "objects/handle.h" #include "objects/kobject.h" #include "page_table.h" #include "vm_space.h" +namespace obj { + class process : public kobject { public: + /// Capabilities on a newly constructed process handle + constexpr static j6_cap_t creation_caps = 0; + + /// Capabilities on a process to itself + constexpr static j6_cap_t self_caps = 0; + /// Top of memory area where thread stacks are allocated constexpr static uintptr_t stacks_top = 0x0000800000000000; @@ -51,8 +60,9 @@ public: /// Start tracking an object with a handle. /// \args obj The object this handle refers to + /// \args caps The capabilities on this handle /// \returns The new handle for this object - j6_handle_t add_handle(kobject *obj); + j6_handle_t add_handle(kobject *obj, j6_cap_t caps); /// Stop tracking an object with a handle. /// \args handle The handle that refers to the object @@ -61,8 +71,8 @@ public: /// Lookup an object for a handle /// \args handle The handle to the object - /// \returns Pointer to the object, or null if not found - kobject * lookup_handle(j6_handle_t handle); + /// \returns Pointer to the handle struct, or null if not found + handle * lookup_handle(j6_handle_t handle); /// Inform the process of an exited thread /// \args th The thread which has exited @@ -90,9 +100,12 @@ private: vm_space m_space; util::vector m_threads; - util::map m_handles; + j6_handle_t m_next_handle; + util::map m_handles; enum class state : uint8_t { running, exited }; state m_state; }; + +} // namespace obj diff --git a/src/kernel/objects/system.cpp b/src/kernel/objects/system.cpp index 54c09f2..cc900d1 100644 --- a/src/kernel/objects/system.cpp +++ b/src/kernel/objects/system.cpp @@ -1,3 +1,7 @@ #include "objects/system.h" +namespace obj { + system system::s_instance; + +} // namespace obj diff --git a/src/kernel/objects/system.h b/src/kernel/objects/system.h index b68cb89..21e7d76 100644 --- a/src/kernel/objects/system.h +++ b/src/kernel/objects/system.h @@ -4,11 +4,16 @@ #include "objects/kobject.h" +namespace obj { + class system : public kobject { public: - static constexpr kobject::type type = kobject::type::event; + /// Capabilities on system given to init + constexpr static j6_cap_t init_caps = 0; + + static constexpr kobject::type type = kobject::type::system; inline static system & get() { return s_instance; } @@ -16,3 +21,5 @@ private: static system s_instance; system() : kobject(type::system) {} }; + +} // namespace obj diff --git a/src/kernel/objects/thread.cpp b/src/kernel/objects/thread.cpp index f60954b..df16cf7 100644 --- a/src/kernel/objects/thread.cpp +++ b/src/kernel/objects/thread.cpp @@ -10,9 +10,12 @@ #include "scheduler.h" extern "C" void kernel_to_user_trampoline(); -static constexpr j6_signal_t thread_default_signals = 0; +extern obj::vm_area_guarded &g_kernel_stacks; -extern vm_area_guarded &g_kernel_stacks; + +namespace obj { + +static constexpr j6_signal_t thread_default_signals = 0; thread::thread(process &parent, uint8_t pri, uintptr_t rsp0) : kobject(kobject::type::thread, thread_default_signals), @@ -32,7 +35,7 @@ thread::thread(process &parent, uint8_t pri, uintptr_t rsp0) : m_tcb.rsp0 = rsp0; m_creator = current_cpu().thread; - m_self_handle = parent.add_handle(this); + m_self_handle = parent.add_handle(this, thread::parent_caps); } thread::~thread() @@ -246,3 +249,5 @@ thread::create_idle_thread(process &kernel, uint8_t pri, uintptr_t rsp0) idle->set_state(state::ready); return idle; } + +} // namespace obj diff --git a/src/kernel/objects/thread.h b/src/kernel/objects/thread.h index 0a1d785..22675d2 100644 --- a/src/kernel/objects/thread.h +++ b/src/kernel/objects/thread.h @@ -9,7 +9,10 @@ #include "objects/kobject.h" struct page_table; -class process; + +namespace obj { + class thread; +} struct TCB { @@ -22,7 +25,7 @@ struct TCB uintptr_t pml4; // End of area used by asembly - thread* thread; + obj::thread* thread; uint8_t priority; // note: 3 bytes padding @@ -38,6 +41,9 @@ struct TCB using tcb_list = util::linked_list; using tcb_node = tcb_list::item_type; + +namespace obj { + enum class wait_type : uint8_t { none = 0x00, @@ -47,10 +53,17 @@ enum class wait_type : uint8_t }; is_bitfield(wait_type); +class process; + class thread : public kobject { public: + /// Capabilities on a newly constructed thread handle + constexpr static j6_cap_t creation_caps = 0; + + /// Capabilities the parent process gets on new thread handles + constexpr static j6_cap_t parent_caps = 0; enum class state : uint8_t { ready = 0x01, @@ -203,3 +216,5 @@ private: j6_handle_t m_self_handle; }; + +} // namespace obj diff --git a/src/kernel/objects/vm_area.cpp b/src/kernel/objects/vm_area.cpp index d8bd1a2..dfe48ec 100644 --- a/src/kernel/objects/vm_area.cpp +++ b/src/kernel/objects/vm_area.cpp @@ -6,6 +6,8 @@ #include "page_tree.h" #include "vm_space.h" +namespace obj { + using mem::frame_size; vm_area::vm_area(size_t size, vm_flags flags) : @@ -184,3 +186,5 @@ vm_area_guarded::get_page(uintptr_t offset, uintptr_t &phys) return vm_area_open::get_page(offset, phys); } + +} // namespace obj diff --git a/src/kernel/objects/vm_area.h b/src/kernel/objects/vm_area.h index ae97699..102300e 100644 --- a/src/kernel/objects/vm_area.h +++ b/src/kernel/objects/vm_area.h @@ -14,6 +14,9 @@ class page_tree; class vm_space; + +namespace obj { + enum class vm_flags : uint32_t { #define VM_FLAG(name, v) name = v, @@ -22,6 +25,7 @@ enum class vm_flags : uint32_t driver_mask = 0x000fffff, ///< flags allowed via syscall for drivers user_mask = 0x0000ffff, ///< flags allowed via syscall for non-drivers }; +is_bitfield(vm_flags); /// Virtual memory areas allow control over memory allocation @@ -29,6 +33,9 @@ class vm_area : public kobject { public: + /// Capabilities on a newly constructed vma handle + constexpr static j6_cap_t creation_caps = 0; + static constexpr kobject::type type = kobject::type::vma; /// Constructor. @@ -170,5 +177,4 @@ private: uintptr_t m_next; }; - -is_bitfield(vm_flags); +} // namespace obj diff --git a/src/kernel/scheduler.cpp b/src/kernel/scheduler.cpp index c74d1be..d0657c8 100644 --- a/src/kernel/scheduler.cpp +++ b/src/kernel/scheduler.cpp @@ -20,6 +20,8 @@ #include "objects/vm_area.h" #include "scheduler.h" +using obj::process; +using obj::thread; extern "C" void task_switch(TCB *tcb); scheduler *scheduler::s_instance = nullptr; diff --git a/src/kernel/scheduler.h b/src/kernel/scheduler.h index cfc78a6..eb3877d 100644 --- a/src/kernel/scheduler.h +++ b/src/kernel/scheduler.h @@ -12,10 +12,13 @@ namespace args { struct cpu_data; class lapic; -class process; struct page_table; struct run_queue; +namespace obj { + class process; + class thread; +} /// The task scheduler class scheduler @@ -47,7 +50,7 @@ public: /// Create a new process from a program image in memory. /// \arg program The descriptor of the pogram in memory /// \returns The main thread of the loaded process - thread * load_process(kernel::args::program &program); + obj::thread * load_process(kernel::args::program &program); /// Create a new kernel task /// \arg proc Function to run as a kernel task @@ -77,7 +80,7 @@ public: static scheduler & get() { return *s_instance; } private: - friend class process; + friend class obj::process; static constexpr uint64_t promote_frequency = 10; static constexpr uint64_t steal_frequency = 10; @@ -89,7 +92,7 @@ private: uint32_t m_next_pid; uint32_t m_tick_count; - process *m_kernel_process; + obj::process *m_kernel_process; util::vector m_run_queues; diff --git a/src/kernel/syscall.cpp.cog b/src/kernel/syscall.cpp.cog index 70b07f2..663be99 100644 --- a/src/kernel/syscall.cpp.cog +++ b/src/kernel/syscall.cpp.cog @@ -41,9 +41,9 @@ namespace syscalls args = [] if method.constructor: - args.append("j6_handle_t *handle") + args.append("j6_handle_t *self") elif not method.static: - args.append("j6_handle_t handle") + args.append("j6_handle_t self") for param in method.params: for type, suffix in param.type.c_names(param.options): diff --git a/src/kernel/syscall_verify.cpp.cog b/src/kernel/syscall_verify.cpp.cog index ae89402..a54258d 100644 --- a/src/kernel/syscall_verify.cpp.cog +++ b/src/kernel/syscall_verify.cpp.cog @@ -4,6 +4,21 @@ #include #include #include +#include + +#include "syscalls/helpers.h" + +/*[[[cog code generation +from definitions.context import Context + +ctx = Context(definitions_path) +ctx.parse("syscalls.def") +syscalls = ctx.interfaces["syscalls"] + +for obj in syscalls.exposes: + cog.outl(f'#include "objects/{obj.object.cname}.h"') +]]]*/ +//[[[end]]] namespace { template @@ -16,13 +31,9 @@ namespace { namespace syscalls { +using util::buffer; + /*[[[cog code generation -from definitions.context import Context - -ctx = Context(definitions_path) -ctx.parse("syscalls.def") -syscalls = ctx.interfaces["syscalls"] - cbool = {True: "true", False: "false"} for id, scope, method in syscalls.methods: @@ -33,21 +44,40 @@ for id, scope, method in syscalls.methods: args = [] argdefs = [] + cxxargdefs = [] refparams = [] + handles = [] if method.constructor: - argdefs.append("j6_handle_t *handle") - args.append("handle") - refparams.append(("handle", False)) + argdefs.append("j6_handle_t *self") + cxxargdefs.append("j6_handle_t *self") + args.append("self") + refparams.append(("self", False)) + elif not method.static: - argdefs.append("j6_handle_t handle") - args.append("handle") + argdefs.append("j6_handle_t self") + cxxargdefs.append(f"obj::{scope.cname} *self") + args.append("self_obj") + handles.append((f"obj::{scope.cname} *", "self", "self_obj")) for param in method.params: + needs_obj = param.type.needs_object(param.options) + for type, suffix in param.type.c_names(param.options): arg = f"{param.name}{suffix}" argdefs.append(f"{type} {arg}") - args.append(arg) + + for type, suffix in param.type.cxx_names(param.options): + arg = f"{param.name}{suffix}" + cxxargdefs.append(f"{type} {arg}") + + if needs_obj: + oarg = f"{arg}_obj" + handles.append((type, arg, oarg)) + args.append(oarg) + else: + args.append(arg) + if param.refparam: subs = param.type.c_names(param.options) @@ -56,7 +86,7 @@ for id, scope, method in syscalls.methods: for sub in subs[1:]: refparams.append((param.name + sub[1], param.optional)) - cog.outl(f"""extern j6_status_t {name} ({", ".join(argdefs)});""") + cog.outl(f"""j6_status_t {name} ({", ".join(cxxargdefs)});""") cog.outl(f"""j6_status_t _syscall_verify_{name} ({", ".join(argdefs)}) {{""") for pname, optional in refparams: @@ -64,7 +94,17 @@ for id, scope, method in syscalls.methods: cog.outl( " return j6_err_invalid_arg;") cog.outl() - cog.outl(f""" return syscalls::{name}({", ".join(args)});""") + for type, inarg, outarg in handles: + if type.endswith('*'): + type = type[:-1].strip() + + cog.outl(f" obj::handle *{inarg}_handle = get_handle({inarg});") + cog.outl(f" if (!{inarg}_handle) return j6_err_invalid_arg;") + cog.outl(f" {type} *{outarg} = {inarg}_handle->as();") + cog.outl(f" if (!{outarg}) return j6_err_invalid_arg;") + cog.outl() + + cog.outl(f""" return {name}({", ".join(args)});""") cog.outl("}") cog.outl("\n") ]]]*/ diff --git a/src/kernel/syscalls/channel.cpp b/src/kernel/syscalls/channel.cpp index 44bcc5a..a8e0555 100644 --- a/src/kernel/syscalls/channel.cpp +++ b/src/kernel/syscalls/channel.cpp @@ -4,29 +4,27 @@ #include "objects/channel.h" #include "syscalls/helpers.h" +using namespace obj; + namespace syscalls { j6_status_t -channel_create(j6_handle_t *handle) +channel_create(j6_handle_t *self) { - construct_handle(handle); + construct_handle(self); return j6_status_ok; } j6_status_t -channel_send(j6_handle_t handle, size_t *len, void *data) +channel_send(channel *self, size_t *len, void *data) { - channel *c = get_handle(handle); - if (!c) return j6_err_invalid_arg; - return c->enqueue(len, data); + return self->enqueue(len, data); } j6_status_t -channel_receive(j6_handle_t handle, size_t *len, void *data) +channel_receive(channel *self, size_t *len, void *data) { - channel *c = get_handle(handle); - if (!c) return j6_err_invalid_arg; - return c->dequeue(len, data); + return self->dequeue(len, data); } } // namespace syscalls diff --git a/src/kernel/syscalls/endpoint.cpp b/src/kernel/syscalls/endpoint.cpp index 135b702..9882da7 100644 --- a/src/kernel/syscalls/endpoint.cpp +++ b/src/kernel/syscalls/endpoint.cpp @@ -5,62 +5,61 @@ #include "objects/endpoint.h" #include "syscalls/helpers.h" +using namespace obj; + namespace syscalls { j6_status_t -endpoint_create(j6_handle_t *handle) +endpoint_create(j6_handle_t *self) { - construct_handle(handle); + construct_handle(self); return j6_status_ok; } j6_status_t -endpoint_send(j6_handle_t handle, uint64_t tag, const void * data, size_t data_len) +endpoint_send(endpoint *self, uint64_t tag, const void * data, size_t data_len) { if (tag & j6_tag_system_flag) return j6_err_invalid_arg; - endpoint *e = get_handle(handle); - if (!e) return j6_err_invalid_arg; - - return e->send(tag, data, data_len); + return self->send(tag, data, data_len); } j6_status_t -endpoint_receive(j6_handle_t handle, uint64_t * tag, void * data, size_t * data_len, uint64_t timeout) +endpoint_receive(endpoint *self, uint64_t * tag, void * data, size_t * data_len, uint64_t timeout) { // Data is marked optional, but we need the length, and if length > 0, // data is not optional. if (!data_len || (*data_len && !data)) return j6_err_invalid_arg; - endpoint *e = get_handle(handle); - if (!e) return j6_err_invalid_arg; - + // Use local variables instead of the passed-in pointers, since + // they may get filled in when the sender is running, which means + // a different user VM space would be active. j6_tag_t out_tag = j6_tag_invalid; size_t out_len = *data_len; - j6_status_t s = e->receive(&out_tag, data, &out_len, timeout); + j6_status_t s = self->receive(&out_tag, data, &out_len, timeout); *tag = out_tag; *data_len = out_len; return s; } j6_status_t -endpoint_sendrecv(j6_handle_t handle, uint64_t * tag, void * data, size_t * data_len, uint64_t timeout) +endpoint_sendrecv(endpoint *self, uint64_t * tag, void * data, size_t * data_len, uint64_t timeout) { if (*tag & j6_tag_system_flag) return j6_err_invalid_arg; - endpoint *e = get_handle(handle); - if (!e) return j6_err_invalid_arg; - - j6_status_t status = e->send(*tag, data, *data_len); + j6_status_t status = self->send(*tag, data, *data_len); if (status != j6_status_ok) return status; + // Use local variables instead of the passed-in pointers, since + // they may get filled in when the sender is running, which means + // a different user VM space would be active. j6_tag_t out_tag = j6_tag_invalid; size_t out_len = *data_len; - j6_status_t s = e->receive(&out_tag, data, &out_len, timeout); + j6_status_t s = self->receive(&out_tag, data, &out_len, timeout); *tag = out_tag; *data_len = out_len; return s; diff --git a/src/kernel/syscalls/helpers.h b/src/kernel/syscalls/helpers.h index 59b2868..4b67e00 100644 --- a/src/kernel/syscalls/helpers.h +++ b/src/kernel/syscalls/helpers.h @@ -10,38 +10,41 @@ namespace syscalls { template -T * construct_handle(j6_handle_t *handle, Args... args) +T * construct_handle(j6_handle_t *id, Args... args) { - process &p = process::current(); + obj::process &p = obj::process::current(); T *o = new T {args...}; - *handle = p.add_handle(o); + *id = p.add_handle(o, T::creation_caps); return o; } template -T * get_handle(j6_handle_t handle) +obj::handle * get_handle(j6_handle_t id) { - process &p = process::current(); - kobject *o = p.lookup_handle(handle); - if (!o || o->get_type() != T::type) + obj::process &p = obj::process::current(); + obj::handle *h = p.lookup_handle(id); + if (!h || h->type() != T::type) return nullptr; - return static_cast(o); + return h; } template <> -inline kobject * get_handle(j6_handle_t handle) +inline obj::handle * get_handle(j6_handle_t id) { - process &p = process::current(); - return p.lookup_handle(handle); + obj::process &p = obj::process::current(); + return p.lookup_handle(id); } template -T * remove_handle(j6_handle_t handle) +T * remove_handle(j6_handle_t id) { - T *o = get_handle(handle); - if (o) { - process &p = process::current(); - p.remove_handle(handle); + obj::handle *h = get_handle(id); + T *o = nullptr; + + if (h) { + o = h->object; + obj::process &p = obj::process::current(); + p.remove_handle(id); } return o; } diff --git a/src/kernel/syscalls/object.cpp b/src/kernel/syscalls/object.cpp index 0557e4f..e89245c 100644 --- a/src/kernel/syscalls/object.cpp +++ b/src/kernel/syscalls/object.cpp @@ -8,34 +8,28 @@ #include "objects/thread.h" #include "syscalls/helpers.h" +using namespace obj; + namespace syscalls { j6_status_t -kobject_koid(j6_handle_t handle, j6_koid_t *koid) +kobject_koid(kobject *self, j6_koid_t *koid) { - kobject *obj = get_handle(handle); - if (!obj) - return j6_err_invalid_arg; - - *koid = obj->koid(); + *koid = self->koid(); return j6_status_ok; } j6_status_t -kobject_wait(j6_handle_t handle, j6_signal_t mask, j6_signal_t *sigs) +kobject_wait(kobject *self, j6_signal_t mask, j6_signal_t *sigs) { - kobject *obj = get_handle(handle); - if (!obj) - return j6_err_invalid_arg; - - j6_signal_t current = obj->signals(); + j6_signal_t current = self->signals(); if ((current & mask) != 0) { *sigs = current; return j6_status_ok; } thread &th = thread::current(); - obj->add_blocked_thread(&th); + self->add_blocked_thread(&th); th.wait_on_signals(mask); j6_status_t result = th.get_wait_result(); @@ -46,23 +40,24 @@ kobject_wait(j6_handle_t handle, j6_signal_t mask, j6_signal_t *sigs) } j6_status_t -kobject_wait_many(j6_handle_t * handles, size_t handles_count, uint64_t mask, j6_handle_t * handle, uint64_t * signals) +kobject_wait_many(j6_handle_t * handles, size_t handles_count, uint64_t mask, j6_handle_t * woken, uint64_t * signals) { util::vector objects {uint32_t(handles_count)}; for (unsigned i = 0; i < handles_count; ++i) { - j6_handle_t h = handles[i]; - if (h == j6_handle_invalid) + j6_handle_t hid = handles[i]; + if (hid == j6_handle_invalid) continue; - kobject *obj = get_handle(h); - if (!obj) + handle *h = get_handle(hid); + if (!h || !h->object) return j6_err_invalid_arg; + kobject *obj = h->object; j6_signal_t current = obj->signals(); if ((current & mask) != 0) { *signals = current; - *handle = h; + *woken = hid; return j6_status_ok; } @@ -79,43 +74,35 @@ kobject_wait_many(j6_handle_t * handles, size_t handles_count, uint64_t mask, j6 if (result != j6_status_ok) return result; - *handle = j6_handle_invalid; + *woken = j6_handle_invalid; *signals = th.get_wait_data(); j6_koid_t koid = th.get_wait_object(); for (unsigned i = 0; i < handles_count; ++i) { if (koid == objects[i]->koid()) - *handle = handles[i]; + *woken = handles[i]; else objects[i]->remove_blocked_thread(&th); } - kassert(*handle != j6_handle_invalid, + kassert(*woken != j6_handle_invalid, "Somehow woke on a handle that was not waited on"); return j6_status_ok; } j6_status_t -kobject_signal(j6_handle_t handle, j6_signal_t signals) +kobject_signal(kobject *self, j6_signal_t signals) { if ((signals & j6_signal_user_mask) != signals) return j6_err_invalid_arg; - kobject *obj = get_handle(handle); - if (!obj) - return j6_err_invalid_arg; - - obj->assert_signal(signals); + self->assert_signal(signals); return j6_status_ok; } j6_status_t -kobject_close(j6_handle_t handle) +kobject_close(kobject *self) { - kobject *obj = get_handle(handle); - if (!obj) - return j6_err_invalid_arg; - - obj->close(); + self->close(); return j6_status_ok; } diff --git a/src/kernel/syscalls/process.cpp b/src/kernel/syscalls/process.cpp index e48af1c..f9660e9 100644 --- a/src/kernel/syscalls/process.cpp +++ b/src/kernel/syscalls/process.cpp @@ -5,41 +5,25 @@ #include "objects/process.h" #include "syscalls/helpers.h" +using namespace obj; + namespace syscalls { j6_status_t -process_create(j6_handle_t *handle) +process_create(j6_handle_t *self) { - process *child = construct_handle(handle); - log::debug(logs::task, "Process %llx created", child->koid()); + process *p = construct_handle(self); + log::debug(logs::task, "Process %llx created", p->koid()); return j6_status_ok; } j6_status_t -process_start(j6_handle_t handle, uintptr_t entrypoint, j6_handle_t * handles, size_t handles_count) +process_kill(process *self) { process &p = process::current(); - process *c = get_handle(handle); - if (handles_count && !handles) - return j6_err_invalid_arg; - for (size_t i = 0; i < handles_count; ++i) { - kobject *o = p.lookup_handle(handles[i]); - if (o) c->add_handle(o); - } - - return j6_err_nyi; -} - -j6_status_t -process_kill(j6_handle_t handle) -{ - process &p = process::current(); - process *c = get_handle(handle); - if (!c) return j6_err_invalid_arg; - - log::debug(logs::task, "Process %llx killed by process %llx", c->koid(), p.koid()); - c->exit(-1u); + log::debug(logs::task, "Process %llx killed by process %llx", self->koid(), p.koid()); + self->exit(-1u); return j6_status_ok; } @@ -57,16 +41,13 @@ process_exit(int32_t status) } j6_status_t -process_give_handle(j6_handle_t handle, j6_handle_t sender, j6_handle_t *receiver) +process_give_handle(process *self, j6_handle_t target, j6_handle_t *received) { - process *dest = get_handle(handle); - if (!dest) return j6_err_invalid_arg; + handle *target_handle = get_handle(target); + j6_handle_t out = self->add_handle(target_handle->object, target_handle->caps); - kobject *o = get_handle(sender); - j6_handle_t out = dest->add_handle(o); - - if (receiver) - *receiver = out; + if (received) + *received = out; return j6_status_ok; } diff --git a/src/kernel/syscalls/system.cpp b/src/kernel/syscalls/system.cpp index 8d8a3fb..ed4afa3 100644 --- a/src/kernel/syscalls/system.cpp +++ b/src/kernel/syscalls/system.cpp @@ -14,8 +14,12 @@ extern log::logger &g_logger; +using namespace obj; + namespace syscalls { +using system = class ::system; + j6_status_t log(const char *message) { @@ -33,7 +37,7 @@ noop() } j6_status_t -system_get_log(j6_handle_t sys, void *buffer, size_t *buffer_len) +system_get_log(system *self, void *buffer, size_t *buffer_len) { // Buffer is marked optional, but we need the length, and if length > 0, // buffer is not optional. @@ -43,25 +47,22 @@ system_get_log(j6_handle_t sys, void *buffer, size_t *buffer_len) size_t orig_size = *buffer_len; *buffer_len = g_logger.get_entry(buffer, *buffer_len); if (!g_logger.has_log()) - system::get().deassert_signal(j6_signal_system_has_log); + self->deassert_signal(j6_signal_system_has_log); return (*buffer_len > orig_size) ? j6_err_insufficient : j6_status_ok; } j6_status_t -system_bind_irq(j6_handle_t sys, j6_handle_t endp, unsigned irq) +system_bind_irq(system *self, endpoint *endp, unsigned irq) { - endpoint *e = get_handle(endp); - if (!e) return j6_err_invalid_arg; - - if (device_manager::get().bind_irq(irq, e)) + if (device_manager::get().bind_irq(irq, endp)) return j6_status_ok; return j6_err_invalid_arg; } j6_status_t -system_map_phys(j6_handle_t handle, j6_handle_t * area, uintptr_t phys, size_t size, uint32_t flags) +system_map_phys(system *self, j6_handle_t * area, uintptr_t phys, size_t size, uint32_t flags) { // TODO: check to see if frames are already used? How would that collide with // the bootloader's allocated pages already being marked used? @@ -75,7 +76,7 @@ system_map_phys(j6_handle_t handle, j6_handle_t * area, uintptr_t phys, size_t s } j6_status_t -system_request_iopl(j6_handle_t handle, unsigned iopl) +system_request_iopl(system *self, unsigned iopl) { if (iopl != 0 && iopl != 3) return j6_err_invalid_arg; diff --git a/src/kernel/syscalls/thread.cpp b/src/kernel/syscalls/thread.cpp index 7512118..bc75fa2 100644 --- a/src/kernel/syscalls/thread.cpp +++ b/src/kernel/syscalls/thread.cpp @@ -6,25 +6,24 @@ #include "objects/thread.h" #include "syscalls/helpers.h" +using namespace obj; + namespace syscalls { j6_status_t -thread_create(j6_handle_t *handle, j6_handle_t proc, uintptr_t stack_top, uintptr_t entrypoint) +thread_create(j6_handle_t *self, process *proc, uintptr_t stack_top, uintptr_t entrypoint) { thread &parent_th = thread::current(); process &parent_pr = parent_th.parent(); - process *owner = get_handle(proc); - if (!owner) return j6_err_invalid_arg; - - thread *child = owner->create_thread(stack_top); + thread *child = proc->create_thread(stack_top); child->add_thunk_user(entrypoint); - *handle = child->self_handle(); + *self = child->self_handle(); child->clear_state(thread::state::loading); child->set_state(thread::state::ready); log::debug(logs::task, "Thread %llx:%llx spawned new thread %llx:%llx", - parent_pr.koid(), parent_th.koid(), owner->koid(), child->koid()); + parent_pr.koid(), parent_th.koid(), proc->koid(), child->koid()); return j6_status_ok; } @@ -41,14 +40,10 @@ thread_exit(int32_t status) } j6_status_t -thread_kill(j6_handle_t handle) +thread_kill(thread *self) { - thread *th = get_handle(handle); - if (!th) - return j6_err_invalid_arg; - - log::debug(logs::task, "Killing thread %llx", th->koid()); - th->exit(-1); + log::debug(logs::task, "Killing thread %llx", self->koid()); + self->exit(-1); return j6_status_ok; } diff --git a/src/kernel/syscalls/vm_area.cpp b/src/kernel/syscalls/vm_area.cpp index d28ab98..1c42f05 100644 --- a/src/kernel/syscalls/vm_area.cpp +++ b/src/kernel/syscalls/vm_area.cpp @@ -8,58 +8,45 @@ #include "syscalls/helpers.h" #include "vm_space.h" +using namespace obj; + namespace syscalls { j6_status_t -vma_create(j6_handle_t *handle, size_t size, uint32_t flags) +vma_create(j6_handle_t *self, size_t size, uint32_t flags) { vm_flags f = vm_flags::user_mask & flags; - construct_handle(handle, size, f); + construct_handle(self, size, f); return j6_status_ok; } j6_status_t -vma_create_map(j6_handle_t *handle, size_t size, uintptr_t base, uint32_t flags) +vma_create_map(j6_handle_t *self, size_t size, uintptr_t base, uint32_t flags) { vm_flags f = vm_flags::user_mask & flags; - vm_area *a = construct_handle(handle, size, f); + vm_area *a = construct_handle(self, size, f); process::current().space().add(base, a); return j6_status_ok; } j6_status_t -vma_map(j6_handle_t handle, j6_handle_t proc, uintptr_t base) +vma_map(vm_area *self, process *proc, uintptr_t base) { - vm_area *a = get_handle(handle); - if (!a) return j6_err_invalid_arg; - - process *p = get_handle(proc); - if (!p) return j6_err_invalid_arg; - - p->space().add(base, a); + proc->space().add(base, self); return j6_status_ok; } j6_status_t -vma_unmap(j6_handle_t handle, j6_handle_t proc) +vma_unmap(vm_area *self, process *proc) { - vm_area *a = get_handle(handle); - if (!a) return j6_err_invalid_arg; - - process *p = get_handle(proc); - if (!p) return j6_err_invalid_arg; - - p->space().remove(a); + proc->space().remove(self); return j6_status_ok; } j6_status_t -vma_resize(j6_handle_t handle, size_t *size) +vma_resize(vm_area *self, size_t *size) { - vm_area *a = get_handle(handle); - if (!a) return j6_err_invalid_arg; - - *size = a->resize(*size); + *size = self->resize(*size); return j6_status_ok; } diff --git a/src/kernel/tss.cpp b/src/kernel/tss.cpp index 8e404e1..0a9ab65 100644 --- a/src/kernel/tss.cpp +++ b/src/kernel/tss.cpp @@ -44,7 +44,7 @@ TSS::ist_stack(unsigned ist) void TSS::create_ist_stacks(uint8_t ist_entries) { - extern vm_area_guarded &g_kernel_stacks; + extern obj::vm_area_guarded &g_kernel_stacks; using mem::frame_size; using mem::kernel_stack_pages; constexpr size_t stack_bytes = kernel_stack_pages * frame_size; diff --git a/src/kernel/vm_space.cpp b/src/kernel/vm_space.cpp index c39e3a3..bb7843a 100644 --- a/src/kernel/vm_space.cpp +++ b/src/kernel/vm_space.cpp @@ -12,6 +12,8 @@ #include "sysconf.h" #include "vm_space.h" +using obj::vm_flags; + // The initial memory for the array of areas for the kernel space constexpr size_t num_kernel_areas = 8; static uint64_t kernel_areas[num_kernel_areas * 2]; @@ -49,7 +51,7 @@ vm_space::vm_space() : m_pml4->entries[i] = kpml4->entries[i]; // Every vm space has sysconf in it - vm_area *sysc = new vm_area_fixed( + obj::vm_area *sysc = new obj::vm_area_fixed( g_sysconf_phys, sizeof(system_config), vm_flags::none); @@ -74,11 +76,11 @@ vm_space::~vm_space() vm_space & vm_space::kernel_space() { - return process::kernel_process().space(); + return obj::process::kernel_process().space(); } bool -vm_space::add(uintptr_t base, vm_area *area) +vm_space::add(uintptr_t base, obj::vm_area *area) { //TODO: check for collisions m_areas.sorted_insert({base, area}); @@ -88,7 +90,7 @@ vm_space::add(uintptr_t base, vm_area *area) } void -vm_space::remove_area(vm_area *area) +vm_space::remove_area(obj::vm_area *area) { area->remove_from(this); clear(*area, 0, mem::page_count(area->size())); @@ -96,7 +98,7 @@ vm_space::remove_area(vm_area *area) } bool -vm_space::remove(vm_area *area) +vm_space::remove(obj::vm_area *area) { for (auto &a : m_areas) { if (a.area == area) { @@ -109,7 +111,7 @@ vm_space::remove(vm_area *area) } bool -vm_space::can_resize(const vm_area &vma, size_t size) const +vm_space::can_resize(const obj::vm_area &vma, size_t size) const { uintptr_t base = 0; unsigned n = m_areas.count(); @@ -131,7 +133,7 @@ vm_space::can_resize(const vm_area &vma, size_t size) const return end <= space_end; } -vm_area * +obj::vm_area * vm_space::get(uintptr_t addr, uintptr_t *base) { for (auto &a : m_areas) { @@ -145,7 +147,7 @@ vm_space::get(uintptr_t addr, uintptr_t *base) } bool -vm_space::find_vma(const vm_area &vma, uintptr_t &base) const +vm_space::find_vma(const obj::vm_area &vma, uintptr_t &base) const { for (auto &a : m_areas) { if (a.area != &vma) continue; @@ -156,7 +158,7 @@ vm_space::find_vma(const vm_area &vma, uintptr_t &base) const } void -vm_space::copy_from(const vm_space &source, const vm_area &vma) +vm_space::copy_from(const vm_space &source, const obj::vm_area &vma) { uintptr_t to = 0; uintptr_t from = 0; @@ -177,7 +179,7 @@ vm_space::copy_from(const vm_space &source, const vm_area &vma) } void -vm_space::page_in(const vm_area &vma, uintptr_t offset, uintptr_t phys, size_t count) +vm_space::page_in(const obj::vm_area &vma, uintptr_t offset, uintptr_t phys, size_t count) { using mem::frame_size; util::scoped_lock lock {m_lock}; @@ -205,7 +207,7 @@ vm_space::page_in(const vm_area &vma, uintptr_t offset, uintptr_t phys, size_t c } void -vm_space::clear(const vm_area &vma, uintptr_t offset, size_t count, bool free) +vm_space::clear(const obj::vm_area &vma, uintptr_t offset, size_t count, bool free) { using mem::frame_size; util::scoped_lock lock {m_lock}; @@ -245,7 +247,7 @@ vm_space::clear(const vm_area &vma, uintptr_t offset, size_t count, bool free) } uintptr_t -vm_space::lookup(const vm_area &vma, uintptr_t offset) +vm_space::lookup(const obj::vm_area &vma, uintptr_t offset) { uintptr_t base = 0; if (!find_vma(vma, base)) @@ -285,7 +287,7 @@ vm_space::handle_fault(uintptr_t addr, fault_type fault) return false; uintptr_t base = 0; - vm_area *area = get(addr, &base); + obj::vm_area *area = get(addr, &base); if (!area) return false; diff --git a/src/kernel/vm_space.h b/src/kernel/vm_space.h index 4b65cfe..9d81401 100644 --- a/src/kernel/vm_space.h +++ b/src/kernel/vm_space.h @@ -10,9 +10,12 @@ #include "page_table.h" -class process; struct TCB; -class vm_area; + +namespace obj { + class process; + class vm_area; +} /// Tracks a region of virtual memory address space class vm_space @@ -31,18 +34,18 @@ public: /// \arg base The starting address of the area /// \arg area The area to add /// \returns True if the add succeeded - bool add(uintptr_t base, vm_area *area); + bool add(uintptr_t base, obj::vm_area *area); /// Remove a virtual memory area from this address space /// \arg area The area to remove /// \returns True if the area was removed - bool remove(vm_area *area); + bool remove(obj::vm_area *area); /// Get the virtual memory area corresponding to an address /// \arg addr The address to check /// \arg base [out] if not null, receives the base address of the area /// \returns The vm_area, or nullptr if not found - vm_area * get(uintptr_t addr, uintptr_t *base = nullptr); + obj::vm_area * get(uintptr_t addr, uintptr_t *base = nullptr); /// Check if this is the kernel space inline bool is_kernel() const { return m_kernel; } @@ -55,17 +58,17 @@ public: /// \arg offset Offset of the starting virutal address from the VMA base /// \arg phys The starting physical address /// \arg count The number of contiugous physical pages to map - void page_in(const vm_area &area, uintptr_t offset, uintptr_t phys, size_t count); + void page_in(const obj::vm_area &area, uintptr_t offset, uintptr_t phys, size_t count); /// Clear mappings from the given region /// \arg area The VMA these mappings applies to /// \arg offset Offset of the starting virutal address from the VMA base /// \arg count The number of pages worth of mappings to clear /// \arg free If true, free the pages back to the system - void clear(const vm_area &vma, uintptr_t start, size_t count, bool free = false); + void clear(const obj::vm_area &vma, uintptr_t start, size_t count, bool free = false); /// Look up the address of a given VMA's offset - uintptr_t lookup(const vm_area &vma, uintptr_t offset); + uintptr_t lookup(const obj::vm_area &vma, uintptr_t offset); /// Check if this space is the current active space bool active() const; @@ -108,26 +111,26 @@ public: static size_t copy(vm_space &source, vm_space &dest, const void *from, void *to, size_t length); private: - friend class vm_area; + friend class obj::vm_area; /// Find a given VMA in this address space - bool find_vma(const vm_area &vma, uintptr_t &base) const; + bool find_vma(const obj::vm_area &vma, uintptr_t &base) const; /// Check if a VMA can be resized - bool can_resize(const vm_area &vma, size_t size) const; + bool can_resize(const obj::vm_area &vma, size_t size) const; /// Copy a range of mappings from the given address space - void copy_from(const vm_space &source, const vm_area &vma); + void copy_from(const vm_space &source, const obj::vm_area &vma); /// Remove an area's mappings from this space - void remove_area(vm_area *area); + void remove_area(obj::vm_area *area); bool m_kernel; page_table *m_pml4; struct area { uintptr_t base; - vm_area *area; + obj::vm_area *area; int compare(const struct area &o) const; bool operator==(const struct area &o) const; }; diff --git a/src/libraries/j6/include/j6/types.h b/src/libraries/j6/include/j6/types.h index e9bfb0f..ae2204e 100644 --- a/src/libraries/j6/include/j6/types.h +++ b/src/libraries/j6/include/j6/types.h @@ -27,14 +27,13 @@ typedef uint64_t j6_tag_t; #define j6_tag_from_irq(x) ((x) | j6_tag_irq_base) #define j6_tag_to_irq(x) ((x) & ~j6_tag_irq_base) -/// Handles are references and capabilities to other objects. The least -/// significant 32 bits are an identifier, and the most significant 32 -/// bits are a bitmask of capabilities this handle has on that object. -typedef uint64_t j6_handle_t; +/// Handles are references and capabilities to other objects. +typedef uint32_t j6_handle_t; -#define j6_handle_rights_shift 4 -#define j6_handle_id_mask 0xffffffffull -#define j6_handle_invalid 0xffffffffull +#define j6_handle_invalid ((j6_handle_t)-1) + +/// Bitfield for storage of capabilities +typedef uint32_t j6_cap_t; enum j6_object_type { #define OBJECT_TYPE( name, val ) j6_object_type_ ## name = val,