27Oct00
Procedural Macros for Java
Bachrach and Playford
accessible Macro
public syntax accessible {
  case #{ ?modifiers:* accessible ?:type ?:name ?init:*; }:
    Fragment getterName
      = new IdentifierFragment("get“ + name.asCapitalizedString());
    Fragment setterName
      = new IdentifierFragment("set“ + name.asCapitalizedString());
    return #{
      private ?type ?name ?init;
      ?modifiers ?type ?getterName() { return ?name; }
      ?modifiers ?type ?setterName(?type newValue) { ?name = newValue; }
    };
}
public class RepeatRule {
  public accessible Date startDate;
  public accessible Date endDate;
  public accessible int  repeatCount = 0;
}