You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
792 B
43 lines
792 B
15 years ago
|
/* vi: ts=8 sts=4 sw=4
|
||
|
*
|
||
13 years ago
|
* This file is part of the KDE project, module tdesu.
|
||
15 years ago
|
* Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
|
||
|
*/
|
||
|
|
||
|
#ifndef __Lexer_h_included__
|
||
|
#define __Lexer_h_included__
|
||
|
|
||
14 years ago
|
class TQCString;
|
||
15 years ago
|
|
||
|
/**
|
||
13 years ago
|
* This is a lexer for the tdesud protocol.
|
||
15 years ago
|
*/
|
||
|
|
||
|
class Lexer {
|
||
|
public:
|
||
15 years ago
|
Lexer(const TQCString &input);
|
||
15 years ago
|
~Lexer();
|
||
|
|
||
|
/** Read next token. */
|
||
|
int lex();
|
||
|
|
||
|
/** Return the token's value. */
|
||
15 years ago
|
TQCString &lval();
|
||
15 years ago
|
|
||
|
enum Tokens {
|
||
|
Tok_none, Tok_exec=256, Tok_pass, Tok_delCmd,
|
||
|
Tok_ping, Tok_str, Tok_num , Tok_stop,
|
||
|
Tok_set, Tok_get, Tok_delVar, Tok_delGroup,
|
||
|
Tok_host, Tok_prio, Tok_sched, Tok_getKeys,
|
||
|
Tok_chkGroup, Tok_delSpecialKey, Tok_exit
|
||
|
};
|
||
|
|
||
|
private:
|
||
15 years ago
|
TQCString m_Input;
|
||
|
TQCString m_Output;
|
||
15 years ago
|
|
||
|
int in;
|
||
|
};
|
||
|
|
||
|
#endif
|