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