KDESu

lexer.h
1/* vi: ts=8 sts=4 sw=4
2
3 This file is part of the KDE project, module kdesu.
4 SPDX-FileCopyrightText: 1999, 2000 Geert Jansen <jansen@kde.org>
5*/
6
7#ifndef __Lexer_h_included__
8#define __Lexer_h_included__
9
10#include <QByteArray>
11
12/**
13 * This is a lexer for the kdesud protocol.
14 */
15
16class Lexer
17{
18public:
19 Lexer(const QByteArray &input);
20 ~Lexer();
21
22 Lexer(const Lexer &) = delete;
23 Lexer &operator=(const Lexer &) = delete;
24
25 /** Read next token. */
26 int lex();
27
28 /** Return the token's value. */
30
31 enum Tokens {
32 Tok_none,
33 Tok_exec = 256,
34 Tok_pass,
35 Tok_delCmd,
36 Tok_ping,
37 Tok_str,
38 Tok_num,
39 Tok_stop,
40 Tok_set,
41 Tok_get,
42 Tok_delVar,
43 Tok_delGroup,
44 Tok_host,
45 Tok_prio,
46 Tok_sched,
47 Tok_getKeys,
48 Tok_chkGroup,
49 Tok_delSpecialKey,
50 Tok_exit,
51 };
52
53private:
54 QByteArray m_Input;
55 QByteArray m_Output;
56
57 int in;
58};
59
60#endif
This is a lexer for the kdesud protocol.
Definition lexer.h:17
QByteArray & lval()
Return the token's value.
Definition lexer.cpp:27
int lex()
Read next token.
Definition lexer.cpp:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.