I have started looking at this. It would be nice to know exactly which statements are causing you problems. So far I have added a bunch of module item attributes, but the attributes handling that already exists for @ needs to be reworked in conjunction with the statements to avoid shift/reduce conflicts in bison.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I came across this bug because of an attribute on the case statement but have long since patched that file. I just filed this as informative to help improve things. :) (i.e. none are causing me problems now).
I also took a quick look (I was going to just submit a patch for this and the multi-attribute thing and had some of it working, but didn't have time to finish it up). I believe all of the rules for "statement" in parse.y should allow an attribute, including the null statement. I was therefore thinking of trying to just add a recursive rule to statement or statement_or_null that added "attribute_instance statement" to be a statement. Where attribute_instance is similar to attribute_list_opt but without the null option. This could also fix the multiple attribute list bug as well I think. The right recursion wouldn't be ideal, but I don't see it causing stack problems.
I got far enough to notice the attribute handling in the @ rules but not far enough to figure out how to rework them.
The relevant section of the grammar is A.6.4.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's a bit more complicated than you think. There are some shift/reduce issues related to multiple optional items that both can have an attribute. When an attribute is found the parser doesn't know who should get it. I need some time when I can think on this clearly, because the solutions for these kind of problems are tricky and are best not tackled late at night.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm giving this up for now since I need to stay focused on either quick bug fixes or the vlog95 converter. I have a patch that adds attribute support for a few more statements and I can pass it on to anyone who is interested in looking at this. It has had no testing. I'll likely come back to this once the vlog95 converter is finished.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Attributes attached a generate region (i.e. with an explicit generate keyword), while not explicitly allowed in 1364-2005 or 1800-200{5,9}, are allowed in 1364-2001, so should also be allowed in Icarus, at least for -g2001.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have started looking at this. It would be nice to know exactly which statements are causing you problems. So far I have added a bunch of module item attributes, but the attributes handling that already exists for @ needs to be reworked in conjunction with the statements to avoid shift/reduce conflicts in bison.
I came across this bug because of an attribute on the case statement but have long since patched that file. I just filed this as informative to help improve things. :) (i.e. none are causing me problems now).
I also took a quick look (I was going to just submit a patch for this and the multi-attribute thing and had some of it working, but didn't have time to finish it up). I believe all of the rules for "statement" in parse.y should allow an attribute, including the null statement. I was therefore thinking of trying to just add a recursive rule to statement or statement_or_null that added "attribute_instance statement" to be a statement. Where attribute_instance is similar to attribute_list_opt but without the null option. This could also fix the multiple attribute list bug as well I think. The right recursion wouldn't be ideal, but I don't see it causing stack problems.
I got far enough to notice the attribute handling in the @ rules but not far enough to figure out how to rework them.
The relevant section of the grammar is A.6.4.
It's a bit more complicated than you think. There are some shift/reduce issues related to multiple optional items that both can have an attribute. When an attribute is found the parser doesn't know who should get it. I need some time when I can think on this clearly, because the solutions for these kind of problems are tricky and are best not tackled late at night.
I'm giving this up for now since I need to stay focused on either quick bug fixes or the vlog95 converter. I have a patch that adds attribute support for a few more statements and I can pass it on to anyone who is interested in looking at this. It has had no testing. I'll likely come back to this once the vlog95 converter is finished.
Attributes attached a generate region (i.e. with an explicit generate keyword), while not explicitly allowed in 1364-2005 or 1800-200{5,9}, are allowed in 1364-2001, so should also be allowed in Icarus, at least for -g2001.