summaryrefslogtreecommitdiffstats
path: root/tdesu/tdesud/lexer.h
blob: a2b42c7a44f5668f490939d9bc43e7fb81ef7ba8 (plain)
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
/*
 *
 * This file is part of the KDE project, module tdesu.
 * Copyright (C) 1999,2000 Geert Jansen <[email protected]>
 */

#ifndef __Lexer_h_included__
#define __Lexer_h_included__

class TQCString;

/**
 * This is a lexer for the tdesud protocol.
 */

class Lexer {
public:
    Lexer(const TQCString &input);
    ~Lexer();

    /** Read next token. */
    int lex();

    /** Return the token's value. */
    TQCString &lval();

    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:
    TQCString m_Input;
    TQCString m_Output;

    int in;
};

#endif