/usr/include/yacas/tokenizer.h is in yacas 1.3.6-2+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | /** \file tokenizer.h
* definitions of input output classes that read and write from string.
*/
#ifndef YACAS_TOKENIZER_H
#define YACAS_TOKENIZER_H
#include "yacasbase.h"
#include "lispstring.h"
#include "lispio.h"
#include "lisphash.h"
#include <cctype>
class LispTokenizer : public YacasBase
{
public:
LispTokenizer() : iToken() {}
/// NextToken returns a string representing the next token,
/// or an empty list.
virtual const LispString* NextToken(LispInput& aInput,
LispHashTable& aHashTable);
virtual ~LispTokenizer(){}
protected:
LispString iToken; //Can be used as a token container.
};
class CommonLispTokenizer : public LispTokenizer
{
public:
virtual const LispString* NextToken(LispInput& aInput,
LispHashTable& aHashTable);
};
// utility functions
inline
bool IsAlpha(LispChar c)
{
return std::isalpha(c) || c == '\'';
}
inline
bool IsAlNum(LispChar c)
{
return IsAlpha(c) || std::isdigit(c);
}
bool IsSymbolic(LispChar c);
#endif
|