MOdificata gestione chiave 1 della relapp git-svn-id: svn://10.65.10.50/trunk@1333 c028cbd2-c16b-5b4b-a496-9718f37d4682
49 lines
911 B
C++
Executable File
49 lines
911 B
C++
Executable File
#ifndef __SCANNER_H
|
|
#define __SCANNER_H
|
|
|
|
#ifndef __FSTREAM_H
|
|
#include <fstream.h>
|
|
#endif
|
|
|
|
#ifndef __STRINGS_H
|
|
#include <strings.h>
|
|
#endif
|
|
|
|
#ifndef INCL_XVTH
|
|
#include <xvt.h>
|
|
#endif
|
|
|
|
// @C
|
|
class TScanner : private ifstream
|
|
{
|
|
// @DPRIV
|
|
TString _token, _key, _buffer;
|
|
bool _pushed;
|
|
word _line;
|
|
|
|
public:
|
|
// @FPUB
|
|
TScanner(const char* filename);
|
|
~TScanner() {}
|
|
const TString& pop();
|
|
const TString& key() const { return _key; }
|
|
const TString& popkey() { pop(); return key(); }
|
|
const TString& string();
|
|
TString& line(char eol = '\n');
|
|
const TString& equal() { return line('='); }
|
|
void rectangle(RCT& rect);
|
|
int integer();
|
|
double number();
|
|
const TString& operand();
|
|
bool paragraph(const char* name);
|
|
|
|
bool ok() { return good(); }
|
|
|
|
void push(const char* tok = NULL);
|
|
const TString& token() const { return _token; }
|
|
word linenum() { return _line; }
|
|
};
|
|
|
|
|
|
#endif // __SCANNER_H
|