Skip to content

Latest commit

 

History

History
153 lines (102 loc) · 6.09 KB

configuring_procedure_call_statement_rules.rst

File metadata and controls

153 lines (102 loc) · 6.09 KB

Configuring Procedure Call Statement Rules

There are rules which will check indent and formatting of constraints as part of a concurrent_procedure_call_statement and procedure_call_statement:

concurrent_procedure_call_statement ::=
    [ label : ] [ postponed ] procedure_call ;

procedure_call_statement ::=
    [ label : ] procedure_call ;

procedure_call ::= procedure_name [ ( actual_parameter_part ) ]

actual_parameter_part ::= parameter_association_list

association_list ::=
    association_element { , association_element }

association_element ::=
    [ formal_part => ] actual_part

There are separate rules for the structure of the constraint and the indenting. Both rules are required to ensure proper formatting of procedure call statements.

There are several options to the structure rules:

Option Symbol Values Structural Element Default Value Description
first_open_paren green_diamond add_new_line, remove_new_line, ignore opening parenthesis ignore
  • The setting add_new_line enforces a carriage return (alias "new line") [and, consequently by indentation rules kicking in, also (indirectly) enforces the indentation of the new line]
  • The setting remove_new_line enforces the removal of any potential space and carriage return
  • The setting ignore disables the option and hence no formatting check is done at all: spaces and new lines can be anything
last_close_paren red_penta_star add_new_line, remove_new_line, ignore closing parenthesis ignore
association_element orange_triangle add_new_line, remove_new_line, ignore association element ignore
association_list_comma purple_hexa_star remove_new_line, ignore comma ignore
ignore_single_line N/A yes, no N/A no
  • yes = Ignore single line expressions.
  • no = Apply rules to single line expressions.

The following figure illustrates where the options will be applied in an procedure call.

img/concurrent_procedure_call_code.png

The following configuration replicates the above code snippet.

rule :
  procedure_call_003:
     first_open_paren : 'remove_new_line'
     last_close_paren : 'add_new_line'
     association_list_comma : 'remove_new_line'
     association_element: 'add_new_line'
     ignore_single_line : 'no'

Note

All examples use the above configuration.

Example: first_open_paren set to add_new_line

Setting the first_open_paren option to add_new_line will result in the following formatting:

test_harness
(
    enabled => true,
    sequence => "test_001",
    logging => "full"
);

Example: last_close_paren set to remove_new_line

Setting the last_close_paren option to remove_new_line will result in the following formatting:

test_harness(
    enabled => true,
    sequence => "test_001",
    logging => "full");

Example: association_element set to remove_new_line

Setting the association_element option to remove_new_line will result in the following formatting:

test_harness(enabled => true, sequence => "test_001", logging => "full"
);

Rules Enforcing Procedure Call Structure