diff options
author | boris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-03-11 22:25:45 +0000 |
---|---|---|
committer | boris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-03-11 22:25:45 +0000 |
commit | c7c98779abc8163b68ee4419994a2376917e9255 (patch) | |
tree | ac95afc24c3a098ddf17650a5ebadb1a0310c7f2 /TAO/CIAO | |
parent | 49293108ef93a3d324b5b5baf6cedba65eb17f98 (diff) | |
download | ATCD-c7c98779abc8163b68ee4419994a2376917e9255.tar.gz |
ChangeLogTag: Thu Mar 11 16:30:45 2004 Boris Kolpackov <boris@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/CIAO')
-rw-r--r-- | TAO/CIAO/CCF/CCF/IDL2/LexicalAnalyzer.cpp | 21 | ||||
-rw-r--r-- | TAO/CIAO/CCF/CCF/IDL2/Parser.cpp | 30 | ||||
-rw-r--r-- | TAO/CIAO/CCF/CCF/IDL2/Parser.hpp | 8 | ||||
-rw-r--r-- | TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp | 26 | ||||
-rw-r--r-- | TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp | 6 | ||||
-rw-r--r-- | TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Typedef.hpp | 6 | ||||
-rw-r--r-- | TAO/CIAO/CCF/Documentation/TODO | 2 | ||||
-rw-r--r-- | TAO/CIAO/CIDLC/cidlc.cpp | 2 | ||||
-rw-r--r-- | TAO/CIAO/ChangeLog | 45 |
9 files changed, 130 insertions, 16 deletions
diff --git a/TAO/CIAO/CCF/CCF/IDL2/LexicalAnalyzer.cpp b/TAO/CIAO/CCF/CCF/IDL2/LexicalAnalyzer.cpp index cc963c559c5..abd5626b0a4 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/LexicalAnalyzer.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/LexicalAnalyzer.cpp @@ -396,6 +396,27 @@ namespace CCF { return TokenPtr (new Keyword (*i, line)); } + + // This part is tricky. If it's after 6pm then come back + // in the morning. In essence I want the same name + // ('string' and 'wstring') to be recognized as a keyword + // in one case and as an identifier in the other. When + // we see 'string' followed by '<' we want it to be a + // keyword. If it's just all by itself then we want to treat + // it as an identifier (since it is a complete construct + // by itself). So here we are going to check for that. + // + + if (lexeme == "string" || lexeme == "wstring") + { + Char c = skip_space (get ()); + ret (c); + + if (c == '<') + { + return TokenPtr (new Keyword (lexeme, line)); + } + } } // Check if it is a reserved identifier. diff --git a/TAO/CIAO/CCF/CCF/IDL2/Parser.cpp b/TAO/CIAO/CCF/CCF/IDL2/Parser.cpp index f8209665c7b..6dc06154e20 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/Parser.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/Parser.cpp @@ -56,6 +56,7 @@ namespace CCF RAISES ("raises" ), READONLY ("readonly" ), SEQUENCE ("sequence" ), + STRING ("string" ), STRUCT ("struct" ), SUPPORTS ("supports" ), SWITCH ("switch" ), @@ -65,6 +66,7 @@ namespace CCF TYPEPREFIX ("typeprefix" ), UNION ("union" ), VALUETYPE ("valuetype" ), + WSTRING ("wstring" ), COLON (":"), COMMA (","), @@ -271,6 +273,12 @@ namespace CCF act_typedef_begin_seq ( f.typedef_ (), &SemanticAction::Typedef::begin_seq), + act_typedef_begin_bounded_string ( + f.typedef_ (), &SemanticAction::Typedef::begin_bounded_string), + + act_typedef_begin_bounded_wstring ( + f.typedef_ (), &SemanticAction::Typedef::begin_bounded_wstring), + act_typedef_declarator ( f.typedef_ (), &SemanticAction::Typedef::declarator), @@ -973,7 +981,27 @@ namespace CCF typedef_type_spec = identifier[act_typedef_begin] - | SEQUENCE >> LT >> identifier[act_typedef_begin_seq] >> GT + | + ( + SEQUENCE + >> LT + >> identifier[act_typedef_begin_seq] + >> GT + ) + | + ( + STRING + >> LT + >> integer_const_expr[act_typedef_begin_bounded_string] + >> GT + ) + | + ( + WSTRING + >> LT + >> integer_const_expr[act_typedef_begin_bounded_wstring] + >> GT + ) ; // union diff --git a/TAO/CIAO/CCF/CCF/IDL2/Parser.hpp b/TAO/CIAO/CCF/CCF/IDL2/Parser.hpp index 8bb83e7ebf4..43b94414db1 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/Parser.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/Parser.hpp @@ -328,6 +328,7 @@ namespace CCF KeywordParser RAISES; KeywordParser READONLY; KeywordParser SEQUENCE; + KeywordParser STRING; KeywordParser STRUCT; KeywordParser SUPPORTS; KeywordParser SWITCH; @@ -337,6 +338,7 @@ namespace CCF KeywordParser TYPEPREFIX; KeywordParser UNION; KeywordParser VALUETYPE; + KeywordParser WSTRING; // Punctuation parsers (alphabetic group order). // @@ -672,6 +674,12 @@ namespace CCF OneArgAction<IdentifierPtr, SemanticAction::Typedef> act_typedef_begin_seq; + NoArgAction<SemanticAction::Typedef> + act_typedef_begin_bounded_string; + + NoArgAction<SemanticAction::Typedef> + act_typedef_begin_bounded_wstring; + OneArgAction<SimpleIdentifierPtr, SemanticAction::Typedef> act_typedef_declarator; diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp index 508d8e277a7..a615e2c5ea3 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp @@ -113,6 +113,32 @@ namespace CCF } void Typedef:: + begin_bounded_string () + { + if (ctx.trace ()) cerr << "typedef string<" << ">" << endl; + + define_ = false; // this should actually be true + + Name name ("::string"); + ScopedName from (ctx.scope ().scoped_name ()); + + type_ = &resolve<Type> (from, name); + } + + void Typedef:: + begin_bounded_wstring () + { + if (ctx.trace ()) cerr << "typedef wstring<" << ">" << endl; + + define_ = false; // this should actually be true + + Name name ("::wstring"); + ScopedName from (ctx.scope ().scoped_name ()); + + type_ = &resolve<Type> (from, name); + } + + void Typedef:: declarator (SimpleIdentifierPtr const& id) { if (ctx.trace ()) cerr << " " << id << endl; diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp index 84f843e67cb..faeea36fd2a 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp @@ -28,6 +28,12 @@ namespace CCF begin_seq (IdentifierPtr const& id); virtual void + begin_bounded_string (); + + virtual void + begin_bounded_wstring (); + + virtual void declarator (SimpleIdentifierPtr const& id); virtual void diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Typedef.hpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Typedef.hpp index 6fe6c305155..d7c59168fea 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Typedef.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Typedef.hpp @@ -22,6 +22,12 @@ namespace CCF begin_seq (IdentifierPtr const& id) = 0; virtual void + begin_bounded_string () = 0; + + virtual void + begin_bounded_wstring () = 0; + + virtual void declarator (SimpleIdentifierPtr const& id) = 0; virtual void diff --git a/TAO/CIAO/CCF/Documentation/TODO b/TAO/CIAO/CCF/Documentation/TODO index 322be932422..7a70b99f513 100644 --- a/TAO/CIAO/CCF/Documentation/TODO +++ b/TAO/CIAO/CCF/Documentation/TODO @@ -83,7 +83,7 @@ Legend: --- -@@ Inherited name lookup +%% Inherited name lookup %% Revisit LEM for interconnected rules. diff --git a/TAO/CIAO/CIDLC/cidlc.cpp b/TAO/CIAO/CIDLC/cidlc.cpp index fee9c933660..2b2a943dc45 100644 --- a/TAO/CIAO/CIDLC/cidlc.cpp +++ b/TAO/CIAO/CIDLC/cidlc.cpp @@ -168,7 +168,7 @@ main (int argc, char* argv[]) //@@ bad token comparison for (TokenPtr token = lexer.next ();; token = lexer.next ()) { - // cerr << token << endl; + // cerr << typeid(*(token.in ())).name () << " : " << token << endl; token_stream.push_back (token); if (ReferenceCounting::strict_cast<EndOfStream> (token) != 0) break; } diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog index f325918f340..76f079540f1 100644 --- a/TAO/CIAO/ChangeLog +++ b/TAO/CIAO/ChangeLog @@ -1,3 +1,22 @@ +Thu Mar 11 16:30:45 2004 Boris Kolpackov <boris@dre.vanderbilt.edu> + + * CCF/CCF/IDL2/LexicalAnalyzer.cpp: + * CCF/CCF/IDL2/Parser.cpp: + * CCF/CCF/IDL2/Parser.hpp: + * CCF/CCF/IDL2/SemanticAction/Typedef.hpp: + * CCF/CCF/IDL2/SemanticAction/Impl/Typedef.cpp: + * CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp: + + Added support for bounded string and wstring. + + * CCF/Documentation/TODO: + + Reflected new achievement. + + * CIDLC/cidlc.cpp: + + Cosmetic changes. + 2004-03-11 Venkita Subramonian <venkita@harry.cs.wustl.edu> * ciao/Container_Base.cpp: Removed an ACE_DEBUG statement which @@ -5,8 +24,8 @@ Wed Mar 10 14:59:19 2004 Venkita Subramonian <venkita@cs.wustl.edu> - * docs/static_ciao_toc.html: - * docs/static_ciao_contents.html: + * docs/static_ciao_toc.html: + * docs/static_ciao_contents.html: * docs/static_ciao_index.html: Updated documentation. Renamed static_ciao.html to static_ciao_contents.html. @@ -14,18 +33,18 @@ Wed Mar 10 12:36:01 2004 Jeff Parsons <j.parsons@vanderbilt.edu> * CIDLC/ServantHeaderGenerator.cpp: * CIDLC/ServantSourceGenerator.cpp: - + Added code generator instantiations to handle multiple nested modules. - + * CIDLC/cidlc.cpp: - + Fixed typo in usage message. Tue Mar 9 23:18:22 2004 Venkita Subramonian <venkita@cs.wustl.edu> - * tools/static_configurator/Static_Assembly_Parser.cpp: - + * tools/static_configurator/Static_Assembly_Parser.cpp: + Made a minor fix to eliminate unnecessary command line option processing. @@ -33,14 +52,14 @@ Tue Mar 9 23:18:22 2004 Venkita Subramonian <venkita@cs.wustl.edu> Tue Mar 9 22:48:10 2004 Venkita Subramonian <venkita@cs.wustl.edu> - * docs/static_ciao.html: - * docs/imgs/ciao-static1.jpg: - * docs/imgs/ciao-static2.jpg: - * docs/imgs/ciao-dynamic1.jpg: - * docs/imgs/ciao-dynamic2.jpg: + * docs/static_ciao.html: + * docs/imgs/ciao-static1.jpg: + * docs/imgs/ciao-static2.jpg: + * docs/imgs/ciao-dynamic1.jpg: + * docs/imgs/ciao-dynamic2.jpg: * docs/imgs/ciao-static-vs-dynamic.jpg: Added documentation for CIAO static configuration. - + Mon Mar 8 14:57:39 2004 Boris Kolpackov <boris@dre.vanderbilt.edu> * CIDLC/ExecutorMappingGenerator.cpp: |