• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
            • Parse-expressions
            • Parse-udps
            • Parse-statements
            • Parse-property
              • Vl-parse-property-list-of-arguments
                • Vl-parse-event-expression-fragment
              • Vl-parse-sequence-match-item
              • Vl-parse-property-actual-arg
              • Vl-parse-scoped-or-hierarchical-identifier
              • Vl-parse-cycledelayrange
              • Vl-parse-sequence-abbrev
              • Vl-parse-boolean-abbrev
              • Vl-parse-1+-expression-or-dists-separated-by-commas
              • Vl-parse-property-acceptop
              • Vl-parse-dist-item
              • Vl-parse-sequence-match-item-list
              • Vl-parse-property-spec
              • Vl-parse-impl-prop-expr-op
              • Vl-parse-expression-or-dist
              • Vl-parse-dist-list
              • Vl-alternating-propexpr/op-list-p
              • Vl-left-associate-alternating-propexpr/op-list
              • Vl-left-associate-delay-se-tail
              • Vl-delay-se-tail-p
              • Vl-parse-1+-named-property-list-of-arguments
              • Vl-parse-property-low-prec-unary
              • Vl-parse-within-sequence-expr-aux
              • Vl-parse-throughout-sequence-expr
              • Vl-parse-or-property-expr-aux
              • Vl-parse-intersect-sequence-expr-aux
              • Vl-parse-intersect-sequence-expr
              • Vl-parse-delay-sequence-expr
              • Vl-parse-assign-sequence-expr
              • Vl-parse-and-property-expr-aux
              • Vl-parse-1+-property-case-items
              • Vl-parse-within-sequence-expr
              • Vl-parse-or-property-expr
              • Vl-parse-instance-property-expr
              • Vl-parse-iff-property-expr
              • Vl-parse-delay-sequence-expr-tail
              • Vl-parse-and-property-expr
              • Vl-parse-until-property-expr
              • Vl-parse-strength-property-expr
              • Vl-parse-repeat-sequence-expr
              • Vl-parse-property-expr
              • Vl-parse-property-case-item
              • Vl-parse-not-property-expr
              • Vl-parse-impl-property-expr
              • Vl-parse-firstmatch-sequence-expr
            • Vl-genelements
            • Parse-paramdecls
            • Parse-blockitems
            • Parse-utils
            • Parse-insts
            • Parse-functions
            • Parse-assignments
            • Parse-clocking
            • Parse-strengths
            • Vl-parse-genvar-declaration
            • Vl-parse
            • Parse-netdecls
            • Parse-asserts
            • Vl-maybe-parse-lifetime
            • Parse-dpi-import-export
            • Parse-ports
            • Parse-timeunits
            • Seq
            • Parse-packages
            • Parse-eventctrl
          • Vl-load-merge-descriptions
          • Vl-find-basename/extension
          • Vl-load-file
          • Vl-loadresult
          • Scope-of-defines
          • Vl-find-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-read-file
          • Vl-includeskips-report-gather
          • Vl-load-main
          • Extended-characters
          • Vl-load
          • Vl-load-description
          • Vl-descriptions-left-to-load
          • Inject-warnings
          • Vl-preprocess-debug
          • Vl-write-preprocessor-debug-file
          • Vl-read-file-report-gather
          • Vl-load-descriptions
          • Vl-load-files
          • Translate-off
          • Vl-load-read-file-hook
          • Vl-read-file-report
          • Vl-loadstate-pad
          • Vl-load-summary
          • Vl-collect-modules-from-descriptions
          • Vl-loadstate->warnings
          • Vl-iskips-report
          • Vl-descriptionlist
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
        • Transforms
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Parse-property

Vl-parse-property-list-of-arguments

Heuristically match a property_list_of_arguments.

Signature
(vl-parse-property-list-of-arguments &key (tokstream 'tokstream) 
                                     (config 'config)) 
 
  → 
(mv errmsg? value new-tokstream)
Arguments
config — Guard (vl-loadconfig-p config).

Our goal is to match property_list_of_arguments, defined in the SystemVerilog-2012 grammar as follows:

property_list_of_arguments ::=

    [property_actual_arg] { ',' [property_actual_arg] }
                          { ',' '.' identifier '(' [property_actual_arg] ')' }

  | '.' identifier ( [property_actual_arg] )
       { ',' '.' identifier ( [property_actual_arg] ) }

Here is a slightly revised, equivalent grammar:

named_property_list_of_arguments ::=
               '.' identifier ( [property_actual_arg] )
         { ',' '.' identifier ( [property_actual_arg] ) }

property_list_of_arguments ::=
    [property_actual_arg] { ',' [property_actual_arg] } [named_property_list_of_arguments]
  | named_property_list_of_arguments

Note that we can match named_property_list_of_arguments with vl-parse-1+-named-property-list-of-arguments and we know that such a thing always starts with a dot. Note also that by inspecting the grammar, we can see that property_list_of_arguments always occurs within parens, so we know that we should end on a right paren.

Distressingly this rule is quite ambiguous. We describe some of the basic property_actual_arg ambiguities in vl-parse-property-actual-arg. But beyond that, here we have property_actual_args being separated by commas, which is even more ambiguous because an event_expression can itself be a comma-delimited list of expressions!

So how can we handle this. One option would be to try to aggressively use backtracking to find a match. But even then we have to make rather arbitrary distinctions for expressions like a or b---is it an event expression or is it a property expression?

So I think something I like better is to be a little more restrictive. Suppose that instead of the full event_expression grammar, we only support edge expressions that have an explicit posedge or negedge, and otherwise we require a property expression. This will still allow us to match most of the grammar and will probably lead to mostly correct interpretations.

Coming up with a proper solution to this would probably require a lot of experimentation. This language is so awful...

Subtopics

Vl-parse-event-expression-fragment
Special subset of event_expression for use only in sequence_list_of_actuals.