{"action":"opened","issue":{"url":"https://api.github.com/repos/BNFC/bnfc/issues/125","labels_url":"https://api.github.com/repos/BNFC/bnfc/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/BNFC/bnfc/issues/125/comments","events_url":"https://api.github.com/repos/BNFC/bnfc/issues/125/events","html_url":"https://github.com/BNFC/bnfc/issues/125","id":56664492,"number":125,"title":"Invalid C++ is generated","user":{"login":"lovasoa","id":552629,"avatar_url":"https://avatars.githubusercontent.com/u/552629?v=3","gravatar_id":"","url":"https://api.github.com/users/lovasoa","html_url":"https://github.com/lovasoa","followers_url":"https://api.github.com/users/lovasoa/followers","following_url":"https://api.github.com/users/lovasoa/following{/other_user}","gists_url":"https://api.github.com/users/lovasoa/gists{/gist_id}","starred_url":"https://api.github.com/users/lovasoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lovasoa/subscriptions","organizations_url":"https://api.github.com/users/lovasoa/orgs","repos_url":"https://api.github.com/users/lovasoa/repos","events_url":"https://api.github.com/users/lovasoa/events{/privacy}","received_events_url":"https://api.github.com/users/lovasoa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-05T12:34:22Z","updated_at":"2015-02-05T12:34:22Z","closed_at":null,"body":"I have the following grammar:\r\n```\r\ncomment \"(*\" \"*)\" ;\r\n\r\nProg.        Program   ::= [HeaderElem] [BodyElem] [FooterElem] ;\r\n\r\nDefaultRate.   HeaderElem ::=  \"directive\" \"default_rate\" Number;\r\nStochasticity. HeaderElem ::=  \"directive\" \"stochasticity_absorption\" Integer;\r\nSample.        HeaderElem ::=  \"directive\" \"sample\" Number;\r\nseparator HeaderElem \"\";\r\n\r\nInitState.     FooterElem ::= \"initial_state\" [Process];\r\nseparator FooterElem \"\";\r\n\r\nSortDef.     BodyElem  ::= \"process\" ProcessName Integer ;\r\n\r\nGenDyn.      BodyElem  ::= \"GRN\" \"(\" \"[\" [GRNAction] \"]\" \")\" ;\r\n\r\nCoop.        BodyElem ::= \"COOPERATIVITY\" \"(\"\r\n                              \"[\" [CoopName] \"]\" \"->\" Transition\r\n                              \",\"\r\n                              \"[\" [CoopCondition] \"]\" \")\" ;\r\n\r\nActionElem. BodyElem  ::= Action Rate ;\r\n\r\nKnockDown.  BodyElem ::= \"KNOCKDOWN\" \"(\" Process \")\" ;\r\n\r\nRemove.     BodyElem ::= \"RM\" \"(\" \"{\" [Action] \"}\" \")\" ;\r\n\r\nCoopNameDef. CoopName ::= ProcessName ;\r\nseparator CoopName \";\" ;\r\n\r\nCoopConditionDef. CoopCondition ::= \"[\" [CoopCondState] \"]\";\r\nseparator CoopCondition \";\" ;\r\nCoopCondStateDef. CoopCondState ::= Integer;\r\nseparator CoopCondState \";\" ;\r\n\r\n\r\nterminator BodyElem \"\" ;\r\n\r\nProcessDef.        Process      ::= ProcessName Integer ;\r\nActionDef.         Action       ::= Process \"->\" Transition ;\r\nProcessTransition. Transition   ::= ProcessName Integer Integer ;\r\n\r\nseparator Action  \",\" ;\r\nseparator Process \",\" ;\r\n\r\nGRNActionDef.GRNAction ::= ProcessName Integer \"->\" Sign ProcessName ;\r\nseparator GRNAction \";\" ;\r\n\r\nNoRate.         Rate  ::= ;\r\nInfRate.        Rate  ::= \"@\" \"Inf\" ;\r\nFiniteRate.     Rate  ::= \"@\" Number ;\r\nStochasticRate. Rate  ::= \"@\" Number \"~\" Integer ;\r\n\r\nSimpleInt.      Number ::= Integer ;\r\nFloatNum.       Number ::= Float ;\r\nInf.            Number ::= \"Inf\" ;\r\n\r\ntoken ProcessName ((letter | '_') (letter | '_' | '\\'')*) ;\r\ntoken Float  (digit+ '.' digit*) ;\r\ntoken Sign   ('+' | '-') ;\r\n```\r\n(For the [pint .ph language](http://loicpauleve.name/pint/doc/syntax.html))\r\n\r\nI compile it with :\r\n```\r\nbnfc -m -cpp grammar.cf && make\r\n```\r\n\r\nAnd I get : \r\n```\r\ng++ -g -c Printer.C\r\nPrinter.C: In member function ‘virtual void PrintAbsyn::visitGRNActionDef(GRNActionDef*)’:\r\nPrinter.C:437:28: error: base operand of ‘->’ has non-pointer type ‘ProcessName {aka std::basic_string<char>}’\r\n   _i_ = 0; p->processname_1->accept(this);\r\n```\r\n"}}