Skip to content

Commit

Permalink
verilog: Improve support of virtual functions and tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
vhda committed Mar 6, 2015
1 parent ee66264 commit 4d539df
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 1 deletion.
1 change: 1 addition & 0 deletions Units/verilog-sv-qualifiers.d/args.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--extra=+q
70 changes: 70 additions & 0 deletions Units/verilog-sv-qualifiers.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
ext_func input.sv /^extern function ext_func (x, y);$/;" f
ext_func.x input.sv /^extern function ext_func (x, y);$/;" p function:ext_func
ext_func.y input.sv /^extern function ext_func (x, y);$/;" p function:ext_func
ext_local_func input.sv /^extern local function ext_local_func (x, y);$/;" f
ext_local_func.x input.sv /^extern local function ext_local_func (x, y);$/;" p function:ext_local_func
ext_local_func.y input.sv /^extern local function ext_local_func (x, y);$/;" p function:ext_local_func
ext_local_task input.sv /^extern local task ext_local_task (x, y);$/;" t
ext_local_task.x input.sv /^extern local task ext_local_task (x, y);$/;" p task:ext_local_task
ext_local_task.y input.sv /^extern local task ext_local_task (x, y);$/;" p task:ext_local_task
ext_protected_func input.sv /^extern protected function ext_protected_func (x, y);$/;" f
ext_protected_func.x input.sv /^extern protected function ext_protected_func (x, y);$/;" p function:ext_protected_func
ext_protected_func.y input.sv /^extern protected function ext_protected_func (x, y);$/;" p function:ext_protected_func
ext_protected_task input.sv /^extern protected task ext_protected_task (x, y);$/;" t
ext_protected_task.x input.sv /^extern protected task ext_protected_task (x, y);$/;" p task:ext_protected_task
ext_protected_task.y input.sv /^extern protected task ext_protected_task (x, y);$/;" p task:ext_protected_task
ext_pure_virt_func input.sv /^extern pure virtual function ext_pure_virt_func (x);$/;" f
ext_pure_virt_func.x input.sv /^extern pure virtual function ext_pure_virt_func (x);$/;" p function:ext_pure_virt_func
ext_pure_virt_task input.sv /^extern pure virtual task ext_pure_virt_task (x);$/;" t
ext_pure_virt_task.x input.sv /^extern pure virtual task ext_pure_virt_task (x);$/;" p task:ext_pure_virt_task
ext_static_func input.sv /^extern static function ext_static_func (x, y);$/;" f
ext_static_func.x input.sv /^extern static function ext_static_func (x, y);$/;" p function:ext_static_func
ext_static_func.y input.sv /^extern static function ext_static_func (x, y);$/;" p function:ext_static_func
ext_static_task input.sv /^extern static task ext_static_task (x, y);$/;" t
ext_static_task.x input.sv /^extern static task ext_static_task (x, y);$/;" p task:ext_static_task
ext_static_task.y input.sv /^extern static task ext_static_task (x, y);$/;" p task:ext_static_task
ext_task input.sv /^extern task ext_task (x, y);$/;" t
ext_task.x input.sv /^extern task ext_task (x, y);$/;" p task:ext_task
ext_task.y input.sv /^extern task ext_task (x, y);$/;" p task:ext_task
pure_virt_func input.sv /^pure virtual function pure_virt_func (x);$/;" f
pure_virt_func.x input.sv /^pure virtual function pure_virt_func (x);$/;" p function:pure_virt_func
pure_virt_local_func input.sv /^pure virtual local function pure_virt_local_func (x);$/;" f
pure_virt_local_func.x input.sv /^pure virtual local function pure_virt_local_func (x);$/;" p function:pure_virt_local_func
pure_virt_local_task input.sv /^pure virtual local task pure_virt_local_task (x);$/;" t
pure_virt_local_task.x input.sv /^pure virtual local task pure_virt_local_task (x);$/;" p task:pure_virt_local_task
pure_virt_protected_func input.sv /^pure virtual protected function pure_virt_protected_func (x);$/;" f
pure_virt_protected_func.x input.sv /^pure virtual protected function pure_virt_protected_func (x);$/;" p function:pure_virt_protected_func
pure_virt_protected_task input.sv /^pure virtual protected task pure_virt_protected_task (x);$/;" t
pure_virt_protected_task.x input.sv /^pure virtual protected task pure_virt_protected_task (x);$/;" p task:pure_virt_protected_task
pure_virt_static_func input.sv /^pure virtual static function pure_virt_static_func (x);$/;" f
pure_virt_static_func.x input.sv /^pure virtual static function pure_virt_static_func (x);$/;" p function:pure_virt_static_func
pure_virt_static_task input.sv /^pure virtual static task pure_virt_static_task (x);$/;" t
pure_virt_static_task.x input.sv /^pure virtual static task pure_virt_static_task (x);$/;" p task:pure_virt_static_task
pure_virt_task input.sv /^pure virtual task pure_virt_task (x);$/;" t
pure_virt_task.x input.sv /^pure virtual task pure_virt_task (x);$/;" p task:pure_virt_task
x input.sv /^extern function ext_func (x, y);$/;" p function:ext_func
x input.sv /^extern local function ext_local_func (x, y);$/;" p function:ext_local_func
x input.sv /^extern local task ext_local_task (x, y);$/;" p task:ext_local_task
x input.sv /^extern protected function ext_protected_func (x, y);$/;" p function:ext_protected_func
x input.sv /^extern protected task ext_protected_task (x, y);$/;" p task:ext_protected_task
x input.sv /^extern pure virtual function ext_pure_virt_func (x);$/;" p function:ext_pure_virt_func
x input.sv /^extern pure virtual task ext_pure_virt_task (x);$/;" p task:ext_pure_virt_task
x input.sv /^extern static function ext_static_func (x, y);$/;" p function:ext_static_func
x input.sv /^extern static task ext_static_task (x, y);$/;" p task:ext_static_task
x input.sv /^extern task ext_task (x, y);$/;" p task:ext_task
x input.sv /^pure virtual function pure_virt_func (x);$/;" p function:pure_virt_func
x input.sv /^pure virtual local function pure_virt_local_func (x);$/;" p function:pure_virt_local_func
x input.sv /^pure virtual local task pure_virt_local_task (x);$/;" p task:pure_virt_local_task
x input.sv /^pure virtual protected function pure_virt_protected_func (x);$/;" p function:pure_virt_protected_func
x input.sv /^pure virtual protected task pure_virt_protected_task (x);$/;" p task:pure_virt_protected_task
x input.sv /^pure virtual static function pure_virt_static_func (x);$/;" p function:pure_virt_static_func
x input.sv /^pure virtual static task pure_virt_static_task (x);$/;" p task:pure_virt_static_task
x input.sv /^pure virtual task pure_virt_task (x);$/;" p task:pure_virt_task
y input.sv /^extern function ext_func (x, y);$/;" p function:ext_func
y input.sv /^extern local function ext_local_func (x, y);$/;" p function:ext_local_func
y input.sv /^extern local task ext_local_task (x, y);$/;" p task:ext_local_task
y input.sv /^extern protected function ext_protected_func (x, y);$/;" p function:ext_protected_func
y input.sv /^extern protected task ext_protected_task (x, y);$/;" p task:ext_protected_task
y input.sv /^extern static function ext_static_func (x, y);$/;" p function:ext_static_func
y input.sv /^extern static task ext_static_task (x, y);$/;" p task:ext_static_task
y input.sv /^extern task ext_task (x, y);$/;" p task:ext_task
36 changes: 36 additions & 0 deletions Units/verilog-sv-qualifiers.d/input.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
extern function ext_func (x, y);

extern static function ext_static_func (x, y);

extern protected function ext_protected_func (x, y);

extern local function ext_local_func (x, y);

extern pure virtual function ext_pure_virt_func (x);

pure virtual function pure_virt_func (x);

pure virtual static function pure_virt_static_func (x);

pure virtual protected function pure_virt_protected_func (x);

pure virtual local function pure_virt_local_func (x);


extern task ext_task (x, y);

extern static task ext_static_task (x, y);

extern protected task ext_protected_task (x, y);

extern local task ext_local_task (x, y);

extern pure virtual task ext_pure_virt_task (x);

pure virtual task pure_virt_task (x);

pure virtual static task pure_virt_static_task (x);

pure virtual protected task pure_virt_protected_task (x);

pure virtual local task pure_virt_local_task (x);
3 changes: 2 additions & 1 deletion verilog.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ static short hasSimplePortList (tokenInfo const* token)

static short isSingleStatement (tokenInfo const* token)
{
if (strcmp (vStringValue (token->name), "extern") == 0 )
if (strcmp (vStringValue (token->name), "extern") == 0 ||
strcmp (vStringValue (token->name), "virtual") == 0 )
{
return TRUE;
} else {
Expand Down

0 comments on commit 4d539df

Please sign in to comment.