Custom rule parsing hooks, e.g. whitespace binders. A hook is a piece of code that implements org.intellij.grammar.parser.GeneratedParserUtilBase.SectionHook interface

Examples:


  {
    parserImports=[
      "static com.intellij.lang.WhitespacesBinders.*"
      "static com.sample.MyHooks.*" ]
  }

  root ::= left_binder right_binder both_binders

  // standard hooks for left, right and both binders
  left_binder ::= ... { hooks=[leftBinder="GREEDY_LEFT_BINDER"] }
  right_binder ::= ... { hooks=[rightBinder="GREEDY_RIGHT_BINDER"] }
  both_binders ::= ... { hooks=[wsBinders="GREEDY_LEFT_BINDER, GREEDY_RIGHT_BINDER"] }

  // log parsing results via syntax error messages using logHook
  logging_rule ::= ... { hooks=[logHook='in logging_rule!'] }

  // user hook from MyHooks class
  got_hook1 ::= ... { hooks=[myHook1="SOME_CONST"] }
  got_hook2 ::= ... { hooks=[myHook2='"string", "array", "args"'] }