Custom PSI accessors and method mix-ins. See documentation and HOWTO for more.

Examples:


  {
    psiImplUtilClass="com.sample.SamplePsiImplUtil"
    tokens=[
      OP_PLUS='+'
    ]
  }
  sum_expr ::= expr '+' expr {
    methods=[
      // user PSI accessors for sub-rules and tokens:
      left="/expr[0]"    // will be @NotNull as far as we have "+" in the expression
      right="/expr[1]"   // "expr" is the name of the auto-calculated child property (singular or list)
      op="/OP_PLUS"      // explicit token accessor

      // method mix-ins from SamplePsiImplUtil
      evaluate toString
    ]
  }
  list ::= item + {
    methods=[
      element="item" // rename getItemList() method to getElementList()
      // item=""     // .. or suppress it completely
    ]
  }
  reference ::= id {
    methods=[
      // rename getId() to getNameIdentifier()
      nameIdentifier="id"

      // implement getReferences() API via mix-in
      getReferences
    ]
  }