Skip to end of metadata
Go to start of metadata

Here are notes on a medium-sized commit by jrose to clean up groovy.g and associated files.

Affected source files:

Functional changes

  • Allow newline before LBRACE uniformly. Use nlsWarn in all such cases.
  • Factor T[] syntax into declaratorBrackets rule.
  • Make new and METHOD_CALL expressions have common structure.
  • Add grammar for proposed "$*x" GString syntax.
  • Right-exclusive ranges are spelled x..<y (x...y temporarily backward-compatible).
  • Fix bug in #! comment syntax.
  • Clarify keywords in argList rule. Allow '[:' only in grammar notes.

Name changes

  • SPREAD_ARG => SPREAD_DOT (for *. nodes)
  • OPTIONAL_ARG => OPTIONAL_DOT (for ?. nodes)


  • Remove transitional hack arrayOrTypeArgs.
  • Clean up and simplify pathExpression and commandStatement rules.
  • Add some more javadoc.
  • Remove annoying zz= decorations on argList, etc.
  • Remove useless rules for expressionBlock, assignmentTail, assignmentOp.
  • Factor statement label syntax into statementLabelPrefix.
  • Remove some useless 'greedy' declarations.
  • No labels


  1. Surely x..<y is confusing and/or misleading when x > y. One fix is to allow x..>y as a synonym for x..<y. Neither is intrinsically more applicable; the former is just more common. It would also make sense to allow x<..y, x>..y, x<..>y, and x>..<y.

  2. jrose AUTHOR

    There has been extensive discussion of ranges on the jsr list. Please see the archives for more details.