00001 // +-------------------------------------------------------------------------+ 00002 // | I__n__t__e__L__i__b 0.6.10 development | 00003 // | Copyright (c) Andrey Vikt. Stolyarov <crocodil_AT_croco.net> 2000-2007. | 00004 // | | 00005 // | This is free software. The library part is available under | 00006 // | GNU LESSER GENERAL PUBLIC LICENSE v.2.1. | 00007 // | GNU LGPL v2.1 is found in docs/gnu_gpl2.txt, or at http://www.gnu.org | 00008 // | Please see also docs/readme.txt and visit http://www.intelib.org | 00009 // | | 00010 // | !!! THERE IS NO WARRANTY OF ANY KIND, NEITHER EXPRESSED NOR IMPLIED !!! | 00011 // +-------------------------------------------------------------------------+ 00012 00013 00014 00015 00016 #include "../sexpress/sstring.hpp" 00017 #include "scheme.hpp" 00018 #include "schcont.hpp" 00019 #include "schfun.hpp" 00020 #include "schsymb.hpp" 00021 00022 00023 IntelibTypeId 00024 SchExpressionSymbol::TypeId(&SExpressionLabel::TypeId, true); 00025 00026 class SchFormQuote : public SExpressionForm { 00027 public: 00028 SchFormQuote() : SExpressionForm() {} 00029 ~SchFormQuote() {} 00030 virtual SString TextRepresentation() const 00031 { return "#<FORM QUOTE>"; } 00032 virtual void Call(const SReference ¶ms, IntelibContinuation &lf) const 00033 { 00034 lf.PushTodo(SchemeContinuation::quote_parameter, params.Car()); 00035 } 00036 }; 00037 00038 SchSymbolQuote::SchSymbolQuote() 00039 : SchSymbol("QUOTE", SReference(new SchFormQuote)) 00040 { 00041 PTheSchemeSymbolQuote = this; 00042 } 00043 00044 SchLabelTrue::SchLabelTrue() 00045 : SLabel("#T") 00046 { 00047 PTheSchemeBooleanTrue = this; 00048 } 00049 00050 SchLabelFalse::SchLabelFalse() 00051 : SLabel("#F") 00052 { 00053 PTheSchemeBooleanFalse = this; 00054 } 00055 00056 SchLabelEmptyList::SchLabelEmptyList() 00057 : SLabel("()") 00058 { 00059 PTheEmptyList = this; 00060 } 00061 00062 SchLibraryProvidedSymbols TheSchLibraryProvidedSymbols; 00063 00064 SchSymbol "E = TheSchLibraryProvidedSymbols.Quote; 00065 00066 IntelibX_scheme_not_a_symbol:: 00067 IntelibX_scheme_not_a_symbol(SReference a_param) 00068 : IntelibX("Not a scheme symbol", a_param) {}