From: Grzegorz J. <sof...@ya...> - 2005-10-16 13:38:01
|
--- "Scott D. Fleming" <sd...@cs...> wrote: > Hi Maciek, > Your problem looks like one that I've reported (and suggested a patch > for) twice in recent history to the OpenC++ mailing list. I'm sure > the > maintainers will add a patch to the CVS repository and update the CVS > snapshots soon (hint hint). Here's a copy of my previous post: Scott, I am sorry, in the past few months I had very little resources to put into this. If you want to apply the patch yourself, go ahead (e-mail me if you need privledges). Guilles will be releasing 2.9 soon, ask him if he will be willing to sneak your contribution under this release. Even if not, take your time, apply the patch and we can release 2.10 then, even if it is soon after 2.9. BR Grzegorz > > There is a mistake in the grammar that OpenC++'s parser expects. > Prior > to GCC 3.4, this was never a problem, but since GCC 3.4, the STL > library > uses the syntax that the broken grammar doesn't accept. In > particular > OpenC++ expects template declarations to look like this: > > template<typename T>... > > With an identifier like "T" following typename, but in fact the > following is legal C++: > > template<typename>... > > This causes occ to issue errors whenever it parses the GCC library > files > that include the latter syntax (e.g., bits/cpp_type_traits.h). I > fixed > the problem by changing the Parser::rTempArgDeclaration member > function > definition in parser/Parser.cc. I changed this line (roughly the > third > line in the function): > > if(t0 == CLASS && lex->LookAhead(1) == Identifier){ > > To this: > > if(t0 == CLASS && !(lex->LookAhead(1) == Identifier)){ > lex->GetToken(tk1); > decl = PtreeUtil::List(new Leaf(tk1)); > } > else if(t0 == CLASS && lex->LookAhead(1) == Identifier){ > > I am not positive that my Ptree representation for the template > argument > declaration (temp.arg.declaration) is exactly what the OpenC++ > maintainers would want, but it seemed to make sense to me. > > Cheers, Scott > > > On 10/13/05, Maciej Leks <Mac...@be...> wrote: > > Hi All, > > > > I've made the latest version of OpenC++ based on the snapshot given > by > > some of this list expert on Cygwin 1.5.18-1 (gcc 3.4.4.). > > > > Then, I was trying to compile one of the example that is injected > with the > > distribution, as follows: > > > > $ occ2 BeforeClass.mc > > occ2: command failed: /usr/local/bin/occ --private--external-driver > -E > > <BeforeClass.ii --private--output BeforeClass.occ.tmp > > 2>BeforeClass.feedback > > > > ..and the content of the BeforeClass.feedback is: > > > > $ cat BeforeClass.feedback > > > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/cpp_type_traits.h:83: > > parse error before `>' > > > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/cpp_type_traits.h:90: > > parse error before `template' > > > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/cpp_type_traits.h:102: > > parse error before `>' > > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_tree.h:72: > parse > > error before `std' > > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_map.h:66: > parse > > error before `std' > > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_map.h:119: > parse > > error before `typedef' > > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_map.h:126: > parse > > error before `typedef' > > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_map.h:624: > parse > > error before `template' > > > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_multimap.h:66: > > parse error before `std' > > > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/char_traits.h:49: > parse > > error before `__gnu_cxx' > > > > The same output I get when I try to use other examples. > > > > Any suggestion? > > > > Best Rgds, > > Maciek Leks > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: > > Power Architecture Resource Center: Free content, downloads, > discussions, > > and more. http://solutions.newsforge.com/ibmarch.tmpl > > _______________________________________________ > > Opencxx-users mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/opencxx-users > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, > discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |