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/ScalarLit.java | |
Initial commit
Diffstat (limited to 'src/syntaxParser/ScalarLit.java')
| -rw-r--r-- | src/syntaxParser/ScalarLit.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/syntaxParser/ScalarLit.java b/src/syntaxParser/ScalarLit.java new file mode 100644 index 0000000..c9810a8 --- /dev/null +++ b/src/syntaxParser/ScalarLit.java @@ -0,0 +1,42 @@ +package syntaxParser; +/** + * ScalarLit + * Creation date: (3/3/2003 2:28:43 AM) + * @author: mattia parigiani + */ +class ScalarLit { + + AtomicLit atomicLit; + ComplexLit complexLit; + String flag; + + /** + * ScalarLit constructor comment. + */ + public ScalarLit() { + super(); + } + public ScalarLit( AtomicLit al){ + atomicLit = al; + flag = "atomicLit"; + } + + public ScalarLit( ComplexLit cl){ + complexLit = cl; + flag = "complexLit"; + } + + String toXML(){ + String result="" ; + try { + if (flag.equals("complexLit")) { + result += complexLit.toXML(); + } else if (flag.equals("atomicLit")) { + result += atomicLit.toXML(); + } + } catch (Exception e ) { + e.printStackTrace(); + } + return result; + } +} |
