{"action":"opened","issue":{"url":"https://api.github.com/repos/p4lang/p4-hlir/issues/6","labels_url":"https://api.github.com/repos/p4lang/p4-hlir/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/p4lang/p4-hlir/issues/6/comments","events_url":"https://api.github.com/repos/p4lang/p4-hlir/issues/6/events","html_url":"https://github.com/p4lang/p4-hlir/issues/6","id":100954652,"number":6,"title":"Parsing of Meter does not reflect the specification ver 1.0.2","user":{"login":"TodoOrTODO","id":3907308,"avatar_url":"https://avatars.githubusercontent.com/u/3907308?v=3","gravatar_id":"","url":"https://api.github.com/users/TodoOrTODO","html_url":"https://github.com/TodoOrTODO","followers_url":"https://api.github.com/users/TodoOrTODO/followers","following_url":"https://api.github.com/users/TodoOrTODO/following{/other_user}","gists_url":"https://api.github.com/users/TodoOrTODO/gists{/gist_id}","starred_url":"https://api.github.com/users/TodoOrTODO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TodoOrTODO/subscriptions","organizations_url":"https://api.github.com/users/TodoOrTODO/orgs","repos_url":"https://api.github.com/users/TodoOrTODO/repos","events_url":"https://api.github.com/users/TodoOrTODO/events{/privacy}","received_events_url":"https://api.github.com/users/TodoOrTODO/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-14T07:44:41Z","updated_at":"2015-08-14T07:44:41Z","closed_at":null,"body":"Dear all,\r\n\r\naccording to the specification, section 7.2. Meters, you have the following BNF for a meter\r\n\r\nmeter_declaration ::=\r\n    meter meter_name {\r\n                type : meter_type ;\r\n                result : field_ref ;\r\n                [ direct_or_static ; ]\r\n                [ instance_count : const_value ; ]\r\n}\r\n\r\nbut then you swap 'result' and 'direct_or_static' order into the parser rule at line 1218 of parser.py\r\n\r\n    def p_meter_declaration(self, p):\r\n        \"\"\" meter_declaration : METER ID LBRACE \\\r\n                                    TYPE COLON meter_type SEMI \\\r\n                                    direct_or_static \\\r\n                                    direct_result \\\r\n                                    instance_count \\\r\n                                RBRACE\r\n\r\nI think this probably is a typo, so I've issued a pull request to fix the order."}}