![]() |
![]() |
The parser has a number of switches that control the parsing of files. Below is detail on a subset of the switches. For a complete list see the Man Page .
include statements in the code (EXPERIMENTAL).
include statements are keep if the include file is composed solely of pragmas, comments and define statements.
variables are evaluated if their definition is in the same preprocessor zone as their instantiation. Command line switches are in zone by themselves. Each compilation unit (e.g. verilog inpug file) starts a new zone. Included files are part of the zone of the including file. -passthru regions start a new zone. ifdef and
ifndef regions start a new zone if they are dependent upon undefined preprocessor variables or are dependent upon preprocessor variable defined in another zone. One of the side effects of enabling this switch is that define and
include statements can only occur on statement boundries in the source code, otherwise a parsing error will result.define substitution will be performed. To use the label use
ifdef/endif and
ifndef/`endif pairs to flags the regions as shown below: Vrq parses each file creating an Abstract Syntax Tree (AST) for each file. This vector of AST's is passed on through a filter pipeline. Each filter in the pipeline is specified using the -tool <toolname> switch. A filter always takes a vector of AST's as input and optionally outputs a vector of AST's. If a pipeline is specified where the final filter produces AST's, vrq will automatically append the 'dump' tool to the end of the pipeline.
For instance if the following switches are used; -tool filter1 -tool filter2 is specified, vrq will create the following pipeline: Parser -> filter1 -> filter2 -> dump
Some tools are compiled in, others come with the vrq distribution and are compiled as DLLs placed in the plugin dir specified at vrq install time. The search path for plugins may be augmented by using the PLUGIN_DIR environment variable. ie PLUGIN_DIR=path1:path2:path3. Third parties can create their own filters using the vrq API. If these plugins are placed in the plugin search path, vrq will automatically recognize them.
Each AST is tagged by the parser with the input file name it was derived from. Tools may modify these names and trees. Tools may also expand or contract the number of AST in the vector.