aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/verilog
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2020-05-21 11:00:36 -0700
committerGitHub <noreply@github.com>2020-05-21 11:00:36 -0700
commit574812d9a54881784b104c71ba56a2e6ed14d39f (patch)
treea0c659648a7a541602d9b68db5910c9586d5c7fb /frontends/verilog
parent637650597b27a2e2f5407fc128ffd21d7a0b3016 (diff)
parent38e858af8d5f61677d9686c022c864857f729d58 (diff)
downloadyosys-574812d9a54881784b104c71ba56a2e6ed14d39f.tar.gz
yosys-574812d9a54881784b104c71ba56a2e6ed14d39f.tar.bz2
yosys-574812d9a54881784b104c71ba56a2e6ed14d39f.zip
Merge pull request #2057 from YosysHQ/eddie/fix_task_attr
verilog: support attributes before (not after) task identifier (but 13 s/r conflicts)
Diffstat (limited to 'frontends/verilog')
-rw-r--r--frontends/verilog/verilog_parser.y20
1 files changed, 9 insertions, 11 deletions
diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y
index f250d7685..d39b72547 100644
--- a/frontends/verilog/verilog_parser.y
+++ b/frontends/verilog/verilog_parser.y
@@ -2228,24 +2228,24 @@ simple_behavioral_stmt:
behavioral_stmt:
defattr | assert | wire_decl | param_decl | localparam_decl | typedef_decl |
non_opt_delay behavioral_stmt |
- simple_behavioral_stmt ';' | ';' |
- hierarchical_id attr {
+ attr simple_behavioral_stmt ';' | ';' |
+ attr hierarchical_id {
AstNode *node = new AstNode(AST_TCALL);
- node->str = *$1;
- delete $1;
+ node->str = *$2;
+ delete $2;
ast_stack.back()->children.push_back(node);
ast_stack.push_back(node);
- append_attr(node, $2);
+ append_attr(node, $1);
} opt_arg_list ';'{
ast_stack.pop_back();
} |
- TOK_MSG_TASKS attr {
+ attr TOK_MSG_TASKS {
AstNode *node = new AstNode(AST_TCALL);
- node->str = *$1;
- delete $1;
+ node->str = *$2;
+ delete $2;
ast_stack.back()->children.push_back(node);
ast_stack.push_back(node);
- append_attr(node, $2);
+ append_attr(node, $1);
} opt_arg_list ';'{
ast_stack.pop_back();
} |
@@ -2342,8 +2342,6 @@ behavioral_stmt:
ast_stack.pop_back();
};
- ;
-
unique_case_attr:
/* empty */ {
$$ = false;