Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

language.h

Go to the documentation of this file.
00001 /*
00002  *      HT Editor
00003  *      language.h
00004  *
00005  *      Copyright (C) 1999-2002 Sebastian Biallas (sb@web-productions.de)
00006  *
00007  *      This program is free software; you can redistribute it and/or modify
00008  *      it under the terms of the GNU General Public License version 2 as
00009  *      published by the Free Software Foundation.
00010  *
00011  *      This program is distributed in the hope that it will be useful,
00012  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *      GNU General Public License for more details.
00015  *
00016  *      You should have received a copy of the GNU General Public License
00017  *      along with this program; if not, write to the Free Software
00018  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  *
00020  */
00021 
00022 #ifndef LANGUAGE_H
00023 #define LANGUAGE_H
00024 
00025 #include "global.h"
00026 #include "common.h"
00027 
00028 #define NL 10
00029 #define WHITESPACE ' '
00030 #define COMMENT '#'
00031 #define INV 255
00032 
00033 extern byte mapchar[];
00034 
00035 class analy_string: public Object {
00036 protected:
00037         byte *string;
00038         int len;
00039 public:
00040         void init(const byte *s, int Len);
00041         virtual void done();
00042         virtual void render_string(char *result, int maxlen) = 0;
00043         void set_len(int Len);
00044                    int  length();
00045         virtual char *name() = 0;
00046 };
00047 
00048 class analy_raw_string: public analy_string {
00049 public:
00050         virtual void render_string(char *result, int maxlen);
00051         static int string_test(const byte *s, int testlen, int &foundlen);
00052         virtual char *name();
00053 };
00054 
00055 class analy_c_string: public analy_string {
00056 public:
00057         virtual void render_string(char *result, int maxlen);
00058         static int string_test(const byte *s, int testlen, int &foundlen);
00059         virtual char *name();
00060 };
00061 
00062 class analy_unicode_string: public analy_string {
00063 public:
00064         virtual void render_string(char *result, int maxlen);
00065         static int string_test(const byte *s, int testlen, int &foundlen);
00066         virtual char *name();
00067 };
00068 
00069 class analy_pascal_string: public analy_string {
00070 public:
00071         virtual void render_string(char *result, int maxlen);
00072         static int string_test(const byte *s, int testlen, int &foundlen);
00073         virtual char *name();
00074 };
00075 
00076 
00077 analy_string *string_test(const byte *s, int testlen);
00078 
00079 #endif

Generated on Fri May 7 21:15:40 2004 by doxygen 1.3.5