aboutsummaryrefslogtreecommitdiff
path: root/externals/ace/Svc_Conf_Lexer.h
diff options
context:
space:
mode:
authorXanadu <none@none>2010-07-20 02:49:28 +0200
committerXanadu <none@none>2010-07-20 02:49:28 +0200
commit79622802f397258ee0f34327ba3ae6977ca3e7ff (patch)
tree1868946c234ab9ee256a6b7766a15713eae94235 /externals/ace/Svc_Conf_Lexer.h
parent7dd2dc91816ab8b3bc3b99a1b1c99c7ea314d5a8 (diff)
parentf906976837502fa5aa81b982b901d1509f5aa0c4 (diff)
Merge. Revision history for source files should be all back now.
--HG-- branch : trunk rename : sql/CMakeLists.txt => sql/tools/CMakeLists.txt rename : src/server/game/Pools/PoolHandler.cpp => src/server/game/Pools/PoolMgr.cpp rename : src/server/game/Pools/PoolHandler.h => src/server/game/Pools/PoolMgr.h rename : src/server/game/PrecompiledHeaders/NixCorePCH.cpp => src/server/game/PrecompiledHeaders/gamePCH.cpp rename : src/server/game/PrecompiledHeaders/NixCorePCH.h => src/server/game/PrecompiledHeaders/gamePCH.h
Diffstat (limited to 'externals/ace/Svc_Conf_Lexer.h')
-rw-r--r--externals/ace/Svc_Conf_Lexer.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/externals/ace/Svc_Conf_Lexer.h b/externals/ace/Svc_Conf_Lexer.h
new file mode 100644
index 00000000000..fbd15e1a6da
--- /dev/null
+++ b/externals/ace/Svc_Conf_Lexer.h
@@ -0,0 +1,70 @@
+// -*- C++ -*-
+
+//=========================================================================
+/**
+ * @file Svc_Conf_Lexer.h
+ *
+ * $Id: Svc_Conf_Lexer.h 81312 2008-04-09 21:01:34Z iliyan $
+ *
+ * This class is a hand-coded replacement for the lexer generated from
+ * Svc_Conf.l that correctly supports Unicode.
+ *
+ * @author Chad Elliott <elliott_c@ociweb.com>
+ */
+//=========================================================================
+
+#ifndef SVC_CONF_LEXER_H
+#define SVC_CONF_LEXER_H
+
+#include /**/ "ace/pre.h"
+#include "ace/Svc_Conf.h"
+
+#if (ACE_USES_CLASSIC_SVC_CONF == 1)
+#include "ace/Encoding_Converter_Factory.h"
+
+class ACE_Encoding_Converter;
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
+/** This class lexes the classic ACE Service Configurator language.
+ * The entry point is similar to what flex would generate. However, it
+ * is a static method in this class (which is really just name space).
+ */
+class ACE_Svc_Conf_Lexer
+{
+public:
+ /// This is similar to the C function, ace_yylex, which a bison
+ /// generated parser expects. It returns information in the ace_yylval
+ /// parameter and uses input stored in the param parameter.
+ static int yylex (YYSTYPE* ace_yylval,
+ ACE_Svc_Conf_Param* param);
+
+private:
+ static size_t input(ACE_Svc_Conf_Param* param, char* buf, size_t max_size);
+
+ static int scan (YYSTYPE* ace_yylval, ACE_Svc_Conf_Param* param);
+
+#if defined (ACE_USES_WCHAR)
+ static bool convert_to_utf8 (
+ ACE_Svc_Conf_Param* param,
+ size_t skip_bytes,
+ ACE_Encoding_Converter_Factory::Encoding_Hint hint);
+ static bool convert_from_utf8 (ACE_Encoding_Converter* converter,
+ const char* source,
+ size_t source_size,
+ ACE_TCHAR* target,
+ size_t target_size,
+ size_t& length);
+ static ACE_Encoding_Converter_Factory::Encoding_Hint
+ locate_bom (char* source,
+ size_t source_size,
+ size_t& bytes_used);
+#endif /* ACE_USES_WCHAR */
+};
+
+ACE_END_VERSIONED_NAMESPACE_DECL
+#endif /* ACE_USES_CLASSIC_SVC_CONF = 1 */
+
+#include /**/ "ace/post.h"
+
+#endif /* SVC_CONF_LEXER_H */