Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / runtime / kdesu / kdesud / lexer.h
blobe8e6f746221a4ed59957daa0cff26761dad476de
1 /* vi: ts=8 sts=4 sw=4
3 * This file is part of the KDE project, module kdesu.
4 * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
5 */
7 #ifndef __Lexer_h_included__
8 #define __Lexer_h_included__
10 #include <QByteArray>
12 /**
13 * This is a lexer for the kdesud protocol.
16 class Lexer {
17 public:
18 Lexer(const QByteArray &input);
19 ~Lexer();
21 /** Read next token. */
22 int lex();
24 /** Return the token's value. */
25 QByteArray &lval();
27 enum Tokens {
28 Tok_none, Tok_exec=256, Tok_pass, Tok_delCmd,
29 Tok_ping, Tok_str, Tok_num , Tok_stop,
30 Tok_set, Tok_get, Tok_delVar, Tok_delGroup,
31 Tok_host, Tok_prio, Tok_sched, Tok_getKeys,
32 Tok_chkGroup, Tok_delSpecialKey, Tok_exit
35 private:
36 QByteArray m_Input;
37 QByteArray m_Output;
39 int in;
42 #endif