{"action":"opened","issue":{"url":"https://api.github.com/repos/cliffordwolf/yosys/issues/88","labels_url":"https://api.github.com/repos/cliffordwolf/yosys/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/cliffordwolf/yosys/issues/88/comments","events_url":"https://api.github.com/repos/cliffordwolf/yosys/issues/88/events","html_url":"https://github.com/cliffordwolf/yosys/issues/88","id":110102241,"number":88,"title":"Parameter outside module yields syntax error","user":{"login":"troelsfr","id":574350,"avatar_url":"https://avatars.githubusercontent.com/u/574350?v=3","gravatar_id":"","url":"https://api.github.com/users/troelsfr","html_url":"https://github.com/troelsfr","followers_url":"https://api.github.com/users/troelsfr/followers","following_url":"https://api.github.com/users/troelsfr/following{/other_user}","gists_url":"https://api.github.com/users/troelsfr/gists{/gist_id}","starred_url":"https://api.github.com/users/troelsfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troelsfr/subscriptions","organizations_url":"https://api.github.com/users/troelsfr/orgs","repos_url":"https://api.github.com/users/troelsfr/repos","events_url":"https://api.github.com/users/troelsfr/events{/privacy}","received_events_url":"https://api.github.com/users/troelsfr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-06T21:11:54Z","updated_at":"2015-10-06T21:11:54Z","closed_at":null,"body":"Hey,\r\n\r\nI get following error:\r\n\r\n ```/----------------------------------------------------------------------------\\\r\n |                                                                            |\r\n |  yosys -- Yosys Open SYnthesis Suite                                       |\r\n(....)\r\n |                                                                            |\r\n \\----------------------------------------------------------------------------/\r\n\r\n Yosys 0.5+336 (git sha1 e51dcc8, clang 3.4-1ubuntu3 -fPIC -Os)\r\n\r\n\r\nyosys> read_verilog blah.v \r\n1. Executing Verilog-2005 frontend.\r\nParsing Verilog input from `blah.v' to AST representation.\r\nERROR: Parser error in line blah.v:1: syntax error\r\ntfr@tfr-laptop:~/Documents/TestArea/Yosys$ cat blah.v \r\nparameter X = 2;```\r\n\r\nThis is just a minimal example of the problem. The problem occurs when I define a parameter outside of a Verilog module. If inside the module, everything is fine:\r\n\r\n```yosys> read_verilog blah.v\r\n1. Executing Verilog-2005 frontend.\r\nParsing Verilog input from `blah.v' to AST representation.\r\nGenerating RTLIL representation for module `\\top'.\r\nSuccessfully finished Verilog frontend.\r\n\r\nyosys> exit\r\n\r\nEnd of script. Logfile hash: bd98451c1e\r\nCPU: user 0.00s system 0.00s, MEM: 43.50 MB total, 5.19 MB resident\r\nYosys 0.5+336 (git sha1 e51dcc8, clang 3.4-1ubuntu3 -fPIC -Os)\r\nTime spent: 100% 2x read_verilog (0 sec)\r\ntfr@tfr-laptop:~/Documents/TestArea/Yosys$ cat blah.v\r\nmodule top(A);\r\n   input[7:0] A;   \r\n   parameter X = 2;\r\nendmodule // top\r\n```\r\n"}}