| 
      
      
      From: Scott D. F. <sd...@cs...> - 2005-10-13 20:07:07
      
     | 
| 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:
 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 =3D=3D CLASS && lex->LookAhead(1) =3D=3D Identifier){
 To this:
      if(t0 =3D=3D CLASS && !(lex->LookAhead(1) =3D=3D Identifier)){
          lex->GetToken(tk1);
          decl =3D PtreeUtil::List(new Leaf(tk1));
      }
      else if(t0 =3D=3D CLASS && lex->LookAhead(1) =3D=3D 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 th=
e
> 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: pars=
e
> 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
>
 |