diff options
author | Michi Henning <michi@zeroc.com> | 2002-07-25 23:09:48 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2002-07-25 23:09:48 +0000 |
commit | 997c78b8c2911a3787d9ca9b4b10e587cb8cbb2d (patch) | |
tree | 267560499341128d631b40e1caff8e9435b55552 /cpp/include/Slice/Parser.h | |
parent | Added generation of Yellow.Query in service configuration. (diff) | |
download | ice-997c78b8c2911a3787d9ca9b4b10e587cb8cbb2d.tar.bz2 ice-997c78b8c2911a3787d9ca9b4b10e587cb8cbb2d.tar.xz ice-997c78b8c2911a3787d9ca9b4b10e587cb8cbb2d.zip |
Changed Slice parser to disallow leading underscore for identifiers.
Changed Slice parser to reject identifiers beginning with "Ice", unless
the --ice option is used. Changed Slice parser to disallow identifiers
that have a trailing "Operations", "Holder", "Helper", "Prx", or "Ptr",
to avoid clashes with language mappings. Fixed tests and remaining code
base to work correctly with the changed rules.
Diffstat (limited to 'cpp/include/Slice/Parser.h')
-rw-r--r-- | cpp/include/Slice/Parser.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cpp/include/Slice/Parser.h b/cpp/include/Slice/Parser.h index aec3c2e934b..f48004a9acc 100644 --- a/cpp/include/Slice/Parser.h +++ b/cpp/include/Slice/Parser.h @@ -364,6 +364,7 @@ protected: Container(const UnitPtr&); + void checkPrefix(const std::string&) const; bool checkInterfaceAndLocal(const std::string&, bool, bool, bool, bool, bool); ContainedList _contents; @@ -771,10 +772,12 @@ class SLICE_API Unit : virtual public Container { public: - static UnitPtr createUnit(bool, bool); + static UnitPtr createUnit(bool, bool, bool); bool ignRedefs() const; + bool allowIcePrefix() const; + void setComment(const std::string&); std::string currentComment(); // Not const, as this function removes the current comment. std::string currentFile() const; @@ -816,10 +819,11 @@ public: private: - Unit(bool, bool); + Unit(bool, bool, bool); bool _ignRedefs; bool _all; + bool _allowIcePrefix; int _errors; std::string _currentComment; int _currentLine; @@ -832,7 +836,7 @@ private: std::map<std::string, ContainedList> _contentMap; }; -extern SLICE_API Unit* unit; // The current parser for bison/flex +extern SLICE_API Unit* unit; // The current parser for bison/flex // ---------------------------------------------------------------------- // CICompare -- function object to do case-insensitive string comparison. |