7 // 各種リテラルとして存在するオブジェクトを定義する。
8 // ここで定義されたリテラルについては、consに直接設定されるオブジェクトと
29 // リテラルは、各オブジェクトを生成する役割も持つ。
30 // リテラルオブジェクトは、TreeNodeに補足されるためだけに
32 // リテラルオブジェクトはdatumとしてのみ扱われ、処理されると
34 // 各リテラルはIDと保持するデータが異なるだけなので、別段対した
40 smart_ptr<unicode::UniString> toValue();
42 const smart_ptr<LiteralData>& getData() const;
43 syntax::DatumID getID() const;
47 virtual smart_ptr<unicode::UniString> toValue_() = 0;
48 virtual const smart_ptr<LiteralData>& getData_() const = 0;
49 virtual syntax::DatumID getID_() const = 0;
53 // 渡されたlexemeに該当するLiteralを返す。
54 // 渡されるliteralはlexeme datumの範囲であることが予想されている。
55 smart_ptr<Literal> generateLiteral(smart_ptr<lexeme::ILexeme> l);
61 #endif /* _LITERAL_H_ */