summaryrefslogtreecommitdiffstats
path: root/kdesu/kdesud/lexer.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kdesu/kdesud/lexer.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesu/kdesud/lexer.h')
-rw-r--r--kdesu/kdesud/lexer.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/kdesu/kdesud/lexer.h b/kdesu/kdesud/lexer.h
new file mode 100644
index 000000000..e678d746e
--- /dev/null
+++ b/kdesu/kdesud/lexer.h
@@ -0,0 +1,42 @@
+/* vi: ts=8 sts=4 sw=4
+ *
+ * This file is part of the KDE project, module kdesu.
+ * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
+ */
+
+#ifndef __Lexer_h_included__
+#define __Lexer_h_included__
+
+class QCString;
+
+/**
+ * This is a lexer for the kdesud protocol.
+ */
+
+class Lexer {
+public:
+ Lexer(const QCString &input);
+ ~Lexer();
+
+ /** Read next token. */
+ int lex();
+
+ /** Return the token's value. */
+ QCString &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:
+ QCString m_Input;
+ QCString m_Output;
+
+ int in;
+};
+
+#endif