{"action":"created","issue":{"url":"https://api.github.com/repos/ttsiodras/asn1scc/issues/113","repository_url":"https://api.github.com/repos/ttsiodras/asn1scc","labels_url":"https://api.github.com/repos/ttsiodras/asn1scc/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/ttsiodras/asn1scc/issues/113/comments","events_url":"https://api.github.com/repos/ttsiodras/asn1scc/issues/113/events","html_url":"https://github.com/ttsiodras/asn1scc/issues/113","id":268340352,"number":113,"title":"Incorrect interaction between OPTIONAL and size determinant","user":{"login":"Lurkerpas","id":17752977,"avatar_url":"https://avatars0.githubusercontent.com/u/17752977?v=4","gravatar_id":"","url":"https://api.github.com/users/Lurkerpas","html_url":"https://github.com/Lurkerpas","followers_url":"https://api.github.com/users/Lurkerpas/followers","following_url":"https://api.github.com/users/Lurkerpas/following{/other_user}","gists_url":"https://api.github.com/users/Lurkerpas/gists{/gist_id}","starred_url":"https://api.github.com/users/Lurkerpas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lurkerpas/subscriptions","organizations_url":"https://api.github.com/users/Lurkerpas/orgs","repos_url":"https://api.github.com/users/Lurkerpas/repos","events_url":"https://api.github.com/users/Lurkerpas/events{/privacy}","received_events_url":"https://api.github.com/users/Lurkerpas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-25T10:10:09Z","updated_at":"2018-05-26T07:01:54Z","closed_at":"2018-05-26T07:01:54Z","author_association":"NONE","body":"Given ASN.1:\r\n```\r\nTESTMODULE DEFINITIONS AUTOMATIC TAGS ::= BEGIN\r\n\r\nGenericCommand ::= SEQUENCE {\r\n  commandArgument INTEGER OPTIONAL,\r\n  instructions SEQUENCE(SIZE(1..100)) OF INTEGER\r\n}\r\n\r\nCommand ::= GenericCommand (WITH COMPONENTS {commandArgument PRESENT})\r\n\r\nEND\r\n```\r\nand ACN:\r\n```\r\nTESTMODULE DEFINITIONS ::= BEGIN\r\n\r\nGenericCommand [] {\r\n  commandArgument [],\r\n  n INTEGER[],\r\n  instructions [size n]\r\n}\r\n\r\nEND\r\n```\r\nwhen compiling the code to generate HTML ICD, the following error message is produced by asn1scc:\r\nFile:testmodule.acn, line:5, the ACN inserted field 'n' is not reference by any other field (e.g. as length determinant or presence determinant etc)\r\n\r\nIn fact, \"n\" is used as a size determinant for field \"instruction\". I believe that this behaviour is incorrect. "},"comment":{"url":"https://api.github.com/repos/ttsiodras/asn1scc/issues/comments/392242095","html_url":"https://github.com/ttsiodras/asn1scc/issues/113#issuecomment-392242095","issue_url":"https://api.github.com/repos/ttsiodras/asn1scc/issues/113","id":392242095,"user":{"login":"gmamais","id":11031787,"avatar_url":"https://avatars3.githubusercontent.com/u/11031787?v=4","gravatar_id":"","url":"https://api.github.com/users/gmamais","html_url":"https://github.com/gmamais","followers_url":"https://api.github.com/users/gmamais/followers","following_url":"https://api.github.com/users/gmamais/following{/other_user}","gists_url":"https://api.github.com/users/gmamais/gists{/gist_id}","starred_url":"https://api.github.com/users/gmamais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmamais/subscriptions","organizations_url":"https://api.github.com/users/gmamais/orgs","repos_url":"https://api.github.com/users/gmamais/repos","events_url":"https://api.github.com/users/gmamais/events{/privacy}","received_events_url":"https://api.github.com/users/gmamais/received_events","type":"User","site_admin":false},"created_at":"2018-05-26T07:01:54Z","updated_at":"2018-05-26T07:01:54Z","author_association":"COLLABORATOR","body":"This bug, among many others, has been fixed in the V4 of the ASN1 compiler which is available here\r\nhttps://github.com/ttsiodras/asn1scc/tree/ASN1SCC_V4\r\n\r\nPlease note that there is a slight change in ACN compare to V3. It is now mandatory for ACN inserted fields to specify the encoding and size attributes. In your case, the ACN grammar must be modified as follows\r\n`GenericCommand [] {\r\n  commandArgument [],\r\n  n INTEGER[**encoding pos-int, size 8**],\r\n  instructions [size n]\r\n}\r\n`\r\n\r\n\r\n"}}
{"actor":{"display_login":"gmamais"}}