anchor.diff:                            | LBRACE dot_field_item (COMMA dot_field_item)* RBRACE
                             | VAR
                             )
  -                     |  "%"  nterm<<V>>
  +                     |  TOKPERCENT  nterm<<V>>
                        )*                   {{ return v }}
   
       rule fieldname: VAR
   
       rule nterm<<V>>:
  -        [ ("!" | "~" | "-" ) ] term<<V>> {{ return term }}
  +        [ (TOKEXCLAIM | TOKTILDE | TOKMINUS ) ] term<<V>> {{ return term }}
   
       rule call_params<<V>>:
           LPAREN ( assign_value [VAR]( COMMA assign_value [VAR])* RPAREN | RPAREN )
  
positive.code:         | VAR [ COLONCOLON VAR ] [ Type_named_sub ]
  
      rule importBVI_statement:
      "parameter" VAR  EQUAL expression SEMICOLON
  #    "port" VAR  EQUAL expression SEMICOLON
      | "default_clock" [ VAR ]
          [ LPAREN VAR [ COMMA VAR ] RPAREN ] [ EQUAL expression ] SEMICOLON
      | "input_clock" [VAR] [ LPAREN VAR [ COMMA VAR ] RPAREN ]
          EQUAL expression SEMICOLON
      | "output_clock" VAR LPAREN VAR [ COMMA VAR ] RPAREN
          SEMICOLON
      | "no_reset" SEMICOLON
      | "schedule"
          ( VAR | LPAREN VAR (COMMA VAR)* RPAREN )
          ( "CF" | "SB" | "SBR" | "C" )
          ( VAR | LPAREN VAR (COMMA VAR)* RPAREN )
          SEMICOLON
      | "default_reset" VAR  LPAREN [ VAR ] RPAREN  [ EQUAL expression] SEMICOLON
      | "input_reset" [ VAR ]  LPAREN [ VAR ] RPAREN
          [ "clocked_by" LPAREN VAR RPAREN ]
          EQUAL expression SEMICOLON
      | "output_reset" VAR  LPAREN VAR RPAREN
          "clocked_by" LPAREN VAR RPAREN
          SEMICOLON
  #    "ancestor"  LPAREN clock1 COMMA clock2 RPAREN SEMICOLON
  #    "same_family"  LPAREN clock1 COMMA clock2 RPAREN SEMICOLON
  
      rule import_declaration:
          "import"
          ( r'"BDPI"' [ VAR  EQUAL ]
              FUNCTION VAR [ HASH call_params<<[]>> ]
              function_name
              argument_list
              [ provisos ] SEMICOLON
          | r'"BVI"' [VAR] [ EQUAL ]
              "module" VAR
              [ HASH  call_params<<[]>> ]
              argument_list
              [ provisos ] SEMICOLON
              ( method_declaration
              | importBVI_statement
              )*
              "endmodule" [ COLON  VAR ]
          | VAR  COLONCOLON  STAR SEMICOLON
          | SEMICOLON
          )
  
      rule export_declaration:
          "export" VAR
          [ LPAREN DOT DOT RPAREN ]
          SEMICOLON
  
  
negative.code: 
  %%
  parser HSDL:
      #option:      "context-insensitive-scanner"
  
      ignore:    "[ \r\t\n]+"
      ignore:    "\\/\\/.*?\r?\n"
  