X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2Fbind%2Fbind.java;h=1aed596a371552b47b8fa00aeff111e6c2a87fae;hp=4441ee1320027bfb7e5efea030fc201b7ca5b0a1;hb=aa4e862db418a090b37b2d70c72fc9e0d1a4265c;hpb=2ea67ebda6606947660f414a9daca7d70f6b8f95 diff --git a/src/edu/berkeley/sbp/bind/bind.java b/src/edu/berkeley/sbp/bind/bind.java index 4441ee1..1aed596 100644 --- a/src/edu/berkeley/sbp/bind/bind.java +++ b/src/edu/berkeley/sbp/bind/bind.java @@ -1,3 +1,5 @@ +// Copyright 2006 all rights reserved; see LICENSE file for BSD-style license + package edu.berkeley.sbp.bind; import edu.berkeley.sbp.util.*; @@ -9,48 +11,15 @@ import java.lang.annotation.*; import java.lang.reflect.*; import java.io.*; +@Retention(RetentionPolicy.RUNTIME) public @interface bind { - /** - * Constructors, classes, and methods with this attribute will - * match every production of the nonterminal called "value()" - * that is arg-compatible. If value() is undefined, then the - * class/constructor/method name is used. - */ - /* - @Retention(RetentionPolicy.RUNTIME) public static @interface nonterminal { String value() default ""; } - */ - - @Retention(RetentionPolicy.RUNTIME) public static @interface raw { } - - /** - * Constructors, classes, and methods with this attribute will - * match every tree tagged with "value()" that is arg-compatible. - * If value() is undefined, then the class/constructor/method - * name is used. - */ - @Retention(RetentionPolicy.RUNTIME) public static @interface as { String value() default ""; } + @Retention(RetentionPolicy.RUNTIME) + public static @interface raw { } + @Retention(RetentionPolicy.RUNTIME) + public static @interface as { String value() default ""; } - /** - * If any parameter to a method or field in a class has a named - * arg-tag, that parameter/field matches the child of the tree - * which either has that label or else is a reference to a - * nonterminal with the corresponding name. - * - * The remaining non-named arg-tags match the remaining children - * of the tree in sequential order. - * - * If any arg-tagged parameters/fields remain, the match fails. - * If there were no arg-tagged parameters-fields, it is as if all - * of them were non-named and arg-tagged. - * - * A method/constructor is arg-compatible if all of its arguments - * are arg-compatible. - * - * A class is arg-compatible if all of its fields are - * arg-compatible, or if one of its constructors is arg-compatible. - * - */ - @Retention(RetentionPolicy.RUNTIME) public static @interface arg { String value() default ""; } + @Retention(RetentionPolicy.RUNTIME) + public static @interface arg { String value() default ""; } }