Skip to content

Commit

Permalink
docs(web),SystemVerilog: add parser-verilog.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
hirooih committed Oct 15, 2020
1 parent 1266c95 commit 0b94697
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions docs/parser-verilog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
.. _verilog:

======================================================================
Verilog/SystemVerilog parser
======================================================================

Introduction
---------------------------------------------------------------------

The Verilog/SystemVerilog parser is used for Verilog or SystemVerilog files.

It assumes the input file is written in the correct grammer. Otherwise output of
ctags is undefined.

Notable New Features
---------------------------------------------------------------------

Some of the notable new features are described below.

parameter
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If the field ``parameter`` is enabled, a tagfield ``parameter:overridden`` is added on a parameter whose
value can be overridden on an instantiated module, interface, or program.

.. code-block:: console
$ ctags ... --fields-Verilog=+{parameter} ...
$ ctags ... --fields-SystemVerilog=+{parameter} ...
On the following source code tagfields ``parameter:overridden`` are added on
parameter ``P*``, not on ``L*``. Note that ``L4`` and ``L6`` is declared by
``parameter`` statement, but tagfields ``parameter:overridden`` are not added,
because they cannot be overridden.

.. code-block:: systemverilog
// compilation unit scope
parameter L1 = 0; // synonym for the localparam
module module_with_parameter_port_list #(P1, P2, localparam L2 = P1+1, L3=P2*2, parameter P3, P4)
( /*port list...*/ );
parameter L4 = "local parameter"; // synonym for the localparam
localparam L5 = "local parameter";
// ...
endmodule
module module_with_empty_parameter_port_list #()
( /*port list...*/ );
parameter L6 = "local parameter"; // synonym for the localparam
localparam L7 = "local parameter";
// ...
endmodule
module module_no_parameter_port_list
( /*port list...*/ );
parameter P5 = "parameter";
localparam L8 = "local parameter";
// ...
endmodule
Incompatible Changes
---------------------------------------------------------------------

The parser is mostly compatible with the old one. There are some minor
incompatible changes which are described below.

TBD

Known Issues
---------------------------------------------------------------------

See https://github.com/universal-ctags/ctags/issues/TBD.

0 comments on commit 0b94697

Please sign in to comment.