#ifndef _WX_WXEXPRH__
#define _WX_WXEXPRH__
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "wxexpr.h"
#endif
-#include <stdio.h>
+#if wxUSE_PROLOGIO
#include "wx/defs.h"
#include "wx/string.h"
#include "wx/expr.h"
+#include <stdio.h>
+
// Compatibility
#define PrologExpr wxExpr
#define PrologDatabase wxExprDatabase
WXDLLEXPORT_DATA(extern wxExprErrorHandler) currentwxExprErrorHandler;
-extern "C" WXDLLEXPORT_DATA(FILE*) yyin;
-
-extern "C" WXDLLEXPORT int yyparse(void);
typedef enum {
wxExprNull,
return value.word;
else if (type == wxExprString)
return wxString(value.string);
- else return wxString(_T(""));
+ else return wxString(wxT(""));
}
inline wxString StringValue(void) const {
return wxString(value.string);
else if (type == wxExprWord)
return wxString(value.word);
- else return wxString(_T(""));
+ else return wxString(wxT(""));
}
// Get nth arg of clause (starting from 1)
bool IsFunctor(const wxString& s) const; // Only for a clause
void WriteClause(FILE* stream); // Write this expression as a top-level clause
void WriteExpr(FILE* stream); // Write as any other subexpression
- void WriteLispExpr(FILE* stream);
// Append an expression to a list
void Append(wxExpr *expr);
// so we can index into the wxExpr database and fish out the pointer.
inline void SetClientData(wxObject *data) { client_data = data; }
inline wxObject *GetClientData(void) const { return client_data; }
+
+ DECLARE_NO_COPY_CLASS(wxExpr)
};
class WXDLLEXPORT wxExprDatabase: public wxList
bool ReadFromString(const wxString& buffer);
bool Write(const wxString& fileName);
bool Write(FILE* stream);
- void WriteLisp(FILE* stream);
// Compatibility
inline bool ReadProlog(wxChar *filename) { return Read(wxString(filename)); }
private:
DECLARE_DYNAMIC_CLASS(wxExprDatabase)
+ DECLARE_NO_COPY_CLASS(wxExprDatabase)
};
// Function call-style interface - some more convenience wrappers/unwrappers
// YACC/LEX can leave memory lying around...
extern "C" WXDLLEXPORT int wxExprCleanUp();
-#endif
+#endif // wxUSE_PROLOGIO
+
+#endif // _WX_WXEXPRH__