diff options
| author | Constantin Jucovschi <cj@ubuntu.localdomain> | 2009-03-31 06:18:54 -0400 |
|---|---|---|
| committer | Constantin Jucovschi <cj@ubuntu.localdomain> | 2009-03-31 06:18:54 -0400 |
| commit | 0f1055b8d7f97d86c66fa602c17666bc2ff9c437 (patch) | |
| tree | 9c68fa99a97063bbe4a4231e04fc09329541ac71 /src/grammar/ConstantList.java | |
Initial commit
Diffstat (limited to 'src/grammar/ConstantList.java')
| -rw-r--r-- | src/grammar/ConstantList.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/grammar/ConstantList.java b/src/grammar/ConstantList.java new file mode 100644 index 0000000..e40d99f --- /dev/null +++ b/src/grammar/ConstantList.java @@ -0,0 +1,36 @@ +package grammar; + +import java.util.*; + +/** ConstantList + * + * @author Andrei Aiordachioaie + */ +public class ConstantList implements IParseTreeNode +{ + LinkedList<String> list; + + public ConstantList(String val) + { + list = new LinkedList<String>(); + list.add(val); + } + + public void add(String val) + { + list.add(val); + } + + public String toXML() + { + String result = ""; + Iterator<String> it = list.iterator(); + while (it.hasNext()) + { + result += "<value>" + it.next() + "</value>"; + } + + return result; + } + +} |
