Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4680 right-hear 1
/** \file tokenizer.h
2
 * definitions of input output classes that read and write from string.
3
 */
4
 
5
 
6
#ifndef __tokenizer_h__
7
#define __tokenizer_h__
8
 
9
#include "yacasbase.h"
10
#include "lispstring.h"
11
#include "lispio.h"
12
#include "lisphash.h"
13
class LispTokenizer : public YacasBase
14
{
15
public:
16
  LispTokenizer() : iToken() {}
17
  /// NextToken returns a string representing the next token,
18
  /// or an empty list.
19
  virtual LispString * NextToken(LispInput& aInput,
20
                                  LispHashTable& aHashTable);
21
  virtual ~LispTokenizer(){}
22
protected:
23
  LispString iToken; //Can be used as a token container.
24
};
25
 
26
class CommonLispTokenizer : public LispTokenizer
27
{
28
public:
29
    virtual LispString * NextToken(LispInput& aInput,
30
                                    LispHashTable& aHashTable);
31
};
32
 
33
 
34
// utility functions
35
LispBoolean IsDigit(LispChar c);
36
LispBoolean IsAlpha(LispChar c);
37
LispBoolean IsAlNum(LispChar c);
38
LispBoolean IsSymbolic(LispChar c);
39
 
40
 
41
 
42
#endif
43