{"action":"created","issue":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/443","repository_url":"https://api.github.com/repos/kaitai-io/kaitai_struct","labels_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/443/labels{/name}","comments_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/443/comments","events_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/443/events","html_url":"https://github.com/kaitai-io/kaitai_struct/issues/443","id":326795244,"node_id":"MDU6SXNzdWUzMjY3OTUyNDQ=","number":443,"title":"How to make hash map instance in kaitai struct?","user":{"login":"Meigyoku-Thmn","id":16047808,"node_id":"MDQ6VXNlcjE2MDQ3ODA4","avatar_url":"https://avatars3.githubusercontent.com/u/16047808?v=4","gravatar_id":"","url":"https://api.github.com/users/Meigyoku-Thmn","html_url":"https://github.com/Meigyoku-Thmn","followers_url":"https://api.github.com/users/Meigyoku-Thmn/followers","following_url":"https://api.github.com/users/Meigyoku-Thmn/following{/other_user}","gists_url":"https://api.github.com/users/Meigyoku-Thmn/gists{/gist_id}","starred_url":"https://api.github.com/users/Meigyoku-Thmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Meigyoku-Thmn/subscriptions","organizations_url":"https://api.github.com/users/Meigyoku-Thmn/orgs","repos_url":"https://api.github.com/users/Meigyoku-Thmn/repos","events_url":"https://api.github.com/users/Meigyoku-Thmn/events{/privacy}","received_events_url":"https://api.github.com/users/Meigyoku-Thmn/received_events","type":"User","site_admin":false},"labels":[{"id":329236481,"node_id":"MDU6TGFiZWwzMjkyMzY0ODE=","url":"https://api.github.com/repos/kaitai-io/kaitai_struct/labels/question","name":"question","color":"1d76db","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-27T07:44:38Z","updated_at":"2018-10-21T09:49:51Z","closed_at":"2018-10-21T09:49:51Z","author_association":"NONE","body":"I want to make a byte code parser in kaitai struct. In [the .pyc file format](http://formats.kaitai.io/python_pyc_27/index.html), bytecodes are defined in enum, but to determine number of arguments for each byte code,  the .pyc file format still uses conditional expression.\r\n\r\nSo I think, is there anyway to make a hash map that can define both bytecode name and number of bytecode arguments, something like this (I take the below from .pyc file format, but I want to use it for another format):\r\n```yaml\r\ntype:\r\n  instruction:\r\n      seq:\r\n        - id: op_code # assume this is always correct\r\n          type: u1\r\n        - id: args\r\n          type: argType(op_code)\r\n          repeat: expr\r\n          repeat-expr: op_codes[op_code][1] # the important line is here\r\ninstances:\r\n  op_codes:\r\n    value: # how to realize this?\r\n      0 : ['stop_code', 1]  #[<op_code name>, <op_code_argc>]\r\n      1 : ['pop_top', 2]\r\n      2 : ['rot_two', 3]\r\n      3 : ['rot_three', 4]\r\n```"},"comment":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/comments/431654378","html_url":"https://github.com/kaitai-io/kaitai_struct/issues/443#issuecomment-431654378","issue_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/443","id":431654378,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTY1NDM3OA==","user":{"login":"GreyCat","id":157154,"node_id":"MDQ6VXNlcjE1NzE1NA==","avatar_url":"https://avatars0.githubusercontent.com/u/157154?v=4","gravatar_id":"","url":"https://api.github.com/users/GreyCat","html_url":"https://github.com/GreyCat","followers_url":"https://api.github.com/users/GreyCat/followers","following_url":"https://api.github.com/users/GreyCat/following{/other_user}","gists_url":"https://api.github.com/users/GreyCat/gists{/gist_id}","starred_url":"https://api.github.com/users/GreyCat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreyCat/subscriptions","organizations_url":"https://api.github.com/users/GreyCat/orgs","repos_url":"https://api.github.com/users/GreyCat/repos","events_url":"https://api.github.com/users/GreyCat/events{/privacy}","received_events_url":"https://api.github.com/users/GreyCat/received_events","type":"User","site_admin":false},"created_at":"2018-10-21T09:49:51Z","updated_at":"2018-10-21T09:49:51Z","author_association":"MEMBER","body":"The answer was given, no further discussion ensued, so I guess we're ok to close. Feel free to reopen."}}
{"actor":{"display_login":"GreyCat"}}