summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/GrammarUtil.h
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2002-07-01 01:48:27 +0000
committerMichi Henning <michi@zeroc.com>2002-07-01 01:48:27 +0000
commit6a5566ac0c91503f37759c2c06fe3b2f86e4ea99 (patch)
tree7c49806d9e55ca00b0d9d2a034e270a1caf630e7 /cpp/src/Slice/GrammarUtil.h
parentLinux fix (diff)
downloadice-6a5566ac0c91503f37759c2c06fe3b2f86e4ea99.tar.bz2
ice-6a5566ac0c91503f37759c2c06fe3b2f86e4ea99.tar.xz
ice-6a5566ac0c91503f37759c2c06fe3b2f86e4ea99.zip
Added more case-insensitive checks for struct, exception, and class
definitions. Changed parser to write diagnostics to stdout instead of stderr.
Diffstat (limited to 'cpp/src/Slice/GrammarUtil.h')
-rw-r--r--cpp/src/Slice/GrammarUtil.h49
1 files changed, 0 insertions, 49 deletions
diff --git a/cpp/src/Slice/GrammarUtil.h b/cpp/src/Slice/GrammarUtil.h
index 889ad02d797..591fa976eed 100644
--- a/cpp/src/Slice/GrammarUtil.h
+++ b/cpp/src/Slice/GrammarUtil.h
@@ -17,55 +17,6 @@
namespace Slice
{
-// TODO: ML: Consider moving to Scanner.l, as it is only used there.
-//
-// Function object to do case-insensitive string comparison.
-//
-struct CICompare : public std::binary_function<std::string, std::string, bool>
-{
- // TODO: ML: Make non-inline. (Not necessary if moved to Scanner.l)
- bool operator()(const std::string& s1, const std::string& s2) const
- {
- std::string::const_iterator p1 = s1.begin();
- std::string::const_iterator p2 = s2.begin();
- while(p1 != s1.end() && p2 != s2.end() && tolower(*p1) == tolower(*p2))
- {
- ++p1;
- ++p2;
- }
- if(p1 == s1.end() && p2 == s2.end())
- {
- return false;
- }
- else if(p1 == s1.end())
- {
- return true;
- }
- else if(p2 == s2.end())
- {
- return false;
- }
- else
- {
- return tolower(*p1) < tolower(*p2);
- }
- }
-};
-
-//
-// Definitions for the case-insensitive keyword-token map.
-//
-// TODO: ML: Naming conventions for types. (Should be StringTokenMap.)
-// TODO: ML: Consider moving to Scanner.l, as it is only used there. Then keywordMap can also be static.
-typedef std::map<std::string, int, CICompare> stringTokenMap;
-extern stringTokenMap keywordMap;
-
-//
-// initialize() fills the keyword map with all keyword-token pairs.
-//
-// TODO: ML: Perhaps initializeKeywordMap() would be a better name?
-void initialize();
-
class StringTok;
class StringListTok;
class TypeStringTok;