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/syntaxParser/CrsList.java | |
Initial commit
Diffstat (limited to 'src/syntaxParser/CrsList.java')
| -rw-r--r-- | src/syntaxParser/CrsList.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/syntaxParser/CrsList.java b/src/syntaxParser/CrsList.java new file mode 100644 index 0000000..d10834e --- /dev/null +++ b/src/syntaxParser/CrsList.java @@ -0,0 +1,33 @@ +package syntaxParser; +/* Author: Sorin Stancu-Mara + * Date: 9 Feb 2008 + * Outside the other Lists becasuse this one works with strings. + */ + +class CrsList implements IParseTreeNode { + String elem; + String tag; + CrsList next; + public CrsList(String e) { + elem = e; + } + public CrsList(String e, CrsList n) { + elem = e; + next = n; + } + public void setTag(String newTag) { + tag =newTag; + if (next != null) { + next.setTag(tag); + } + } + public String toXML() { + String result = ""; + if (tag != null) result += "<" + tag + ">" + elem + "</" + tag + ">"; + else result += elem; + if (next != null) + result += next.toXML(); + return result; + + } +} |
