1 package edu.berkeley.sbp.bind;
3 import edu.berkeley.sbp.util.*;
4 import edu.berkeley.sbp.*;
5 import edu.berkeley.sbp.chr.*;
6 import edu.berkeley.sbp.bind.*;
8 import java.lang.annotation.*;
9 import java.lang.reflect.*;
12 @Retention(RetentionPolicy.RUNTIME)
13 public @interface bind {
15 * Constructors, classes, and methods with this attribute will
16 * match every production of the nonterminal called "value()"
17 * that is arg-compatible. If value() is undefined, then the
18 * class/constructor/method name is used.
21 @Retention(RetentionPolicy.RUNTIME) public static @interface nonterminal { String value() default ""; }
24 @Retention(RetentionPolicy.RUNTIME)
25 public static @interface raw { }
28 * Constructors, classes, and methods with this attribute will
29 * match every tree tagged with "value()" that is arg-compatible.
30 * If value() is undefined, then the class/constructor/method
34 @Retention(RetentionPolicy.RUNTIME)
35 public static @interface as { String value() default ""; }
39 * If any parameter to a method or field in a class has a named
40 * arg-tag, that parameter/field matches the child of the tree
41 * which either has that label or else is a reference to a
42 * nonterminal with the corresponding name.
44 * The remaining non-named arg-tags match the remaining children
45 * of the tree in sequential order.
47 * If any arg-tagged parameters/fields remain, the match fails.
48 * If there were no arg-tagged parameters-fields, it is as if all
49 * of them were non-named and arg-tagged.
51 * A method/constructor is arg-compatible if all of its arguments
54 * A class is arg-compatible if all of its fields are
55 * arg-compatible, or if one of its constructors is arg-compatible.
58 @Retention(RetentionPolicy.RUNTIME)
59 public static @interface arg { String value() default ""; }