Mercurial > hg > Members > kono > PLparser
annotate src/plparser/Dictionary.java @ 0:b0dee5b76b12
Scanner worked.
author | kono@ie.u-ryukyu.ac.jp |
---|---|
date | Sat, 28 Aug 2010 16:07:00 +0900 |
parents | |
children | 29c0866e3a84 |
rev | line source |
---|---|
0 | 1 package plparser; |
2 | |
3 import java.util.HashMap; | |
4 | |
5 public class Dictionary<Node> extends HashMap<String,Token<Node>> { | |
6 | |
7 private static final long serialVersionUID = 1L; | |
8 | |
9 public Token<Node> reserve(String name,TokenID type) { | |
10 Token<Node> t = new Token<Node>(name,type); | |
11 this.put(name, t); | |
12 return t; | |
13 } | |
14 | |
15 | |
16 | |
17 public Token<Node> reserve(String string) { | |
18 return reserve(string,TokenID.Any); | |
19 } | |
20 } |