source: trunk/yao/share/antlr-2.7.7/examples/java/pascal/UserDefinedType.java @ 1

Last change on this file since 1 was 1, checked in by lnalod, 15 years ago

Initial import of YAO sources

File size: 722 bytes
Line 
1/** Just like a variable except it cannot hold a variable value--it
2 *  holds a type like TYPE size=BIG;
3 *
4 *  You would create a UserDefinedType("size", ...lookup BIG...)
5 *
6 *  In essence, this is anything in the TYPE section.  This is how
7 *  new types are introduced--they build upon TypeSpecifier objects
8 *  that represent records, scalars etc...
9 */
10import java.io.*;
11
12public class UserDefinedType extends Symbol implements Serializable {
13        protected TypeSpecifier type;
14
15        public UserDefinedType(String name, TypeSpecifier type) {
16                super(name);
17                setType(type);
18        }
19
20        public TypeSpecifier getType() {
21                return type;
22        }
23
24        public void setType(TypeSpecifier type) {
25                this.type = type;
26        }
27}
Note: See TracBrowser for help on using the repository browser.