Best lex/yacc for C++?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Xenos

    #16
    Re: Best lex/yacc for C++?


    "Moonlit" <alt.spam@jupit er.universe> wrote in message
    news:3f85e27d$0 $58701$e4fe514c @news.xs4all.nl ...[color=blue]
    > Hi,
    >
    > Antlr Don't know anything about this, seems widely supported for[/color]
    different[color=blue]
    > languages, user java to generate code (I think).[/color]

    yes it is written in Java.
    [color=blue]
    > Hmmm, still difficult to choose, ok at some point I just have to pick one[/color]
    I[color=blue]
    > guess.[/color]

    You might also check out :
    PCCTS -- This the predecessor to ANLTr, but it is written in C++.

    There is a nice list of compiler compilers here:

    [color=blue]
    >
    > I just decided to order my copy of vc++ 2003, hope it works with spirit[/color]
    and[color=blue]
    > well, I could always backtrack to flex++/byacc/bison++ if not.
    >[/color]
    The only problem I see with this is the latest version of VC++ still has
    weak template support, and as you already know, Spirit is very template
    intensive. Have you checked out the BOOST library, to which Spirit was
    resently added too? It has some nice workarounds for various compilers.


    DrX



    Comment

    • Moonlit

      #17
      Re: Best lex/yacc for C++?

      Hi,

      "Xenos" <dont.spam.me@s pamhate.com> wrote in message
      news:bm6ri0$lqh 4@cui1.lmms.lmc o.com...[color=blue]
      >
      > "Moonlit" <alt.spam@jupit er.universe> wrote in message
      > news:3f85e27d$0 $58701$e4fe514c @news.xs4all.nl ...[color=green]
      > > Hi,
      > >
      > > Antlr Don't know anything about this, seems widely supported for[/color]
      > different[color=green]
      > > languages, user java to generate code (I think).[/color]
      >
      > yes it is written in Java.
      >[color=green]
      > > Hmmm, still difficult to choose, ok at some point I just have to pick[/color][/color]
      one[color=blue]
      > I[color=green]
      > > guess.[/color]
      >
      > You might also check out :
      > PCCTS -- This the predecessor to ANLTr, but it is written in C++.
      >
      > There is a nice list of compiler compilers here:
      > http://catalog.compilertools.net
      >[/color]
      Thanks, I will check them out.
      [color=blue][color=green]
      > >
      > > I just decided to order my copy of vc++ 2003, hope it works with spirit[/color]
      > and[color=green]
      > > well, I could always backtrack to flex++/byacc/bison++ if not.
      > >[/color]
      > The only problem I see with this is the latest version of VC++ still has
      > weak template support, and as you already know, Spirit is very template
      > intensive. Have you checked out the BOOST library, to which Spirit was
      > resently added too? It has some nice workarounds for various compilers.[/color]

      Well they say over in the spirit newsgroup that vc7.1 compiles very well,
      but of course, the proof of the...

      I tried different versions of spirit 1.6.1 (the latest stable release).
      Could create a simple parser but when I wanted to use the ast templates it
      failed, without that I don't think it is possible to write a (maintainable)
      parser. The 1.7 release doesn't even compile, it gives a error in a certain
      line.[color=blue]
      >
      >
      > DrX
      >
      >
      >[/color]

      Thanks, for your reply.


      Comment

      • Joel de Guzman

        #18
        Re: Best lex/yacc for C++?

        "Moonlit" <alt.spam@jupit er.universe> wrote in message
        news:3f870549$0 $58712$e4fe514c @news.xs4all.nl
        [color=blue][color=green][color=darkred]
        >>> I just decided to order my copy of vc++ 2003, hope it works with spirit[/color]
        >> and[color=darkred]
        >>> well, I could always backtrack to flex++/byacc/bison++ if not.
        >>>[/color]
        >> The only problem I see with this is the latest version of VC++ still has
        >> weak template support, and as you already know, Spirit is very template
        >> intensive. Have you checked out the BOOST library, to which Spirit was
        >> resently added too? It has some nice workarounds for various compilers.[/color]
        >
        > Well they say over in the spirit newsgroup that vc7.1 compiles very well,
        > but of course, the proof of the...
        >
        > I tried different versions of spirit 1.6.1 (the latest stable release).
        > Could create a simple parser but when I wanted to use the ast templates it
        > failed, without that I don't think it is possible to write a (maintainable)
        > parser. The 1.7 release doesn't even compile, it gives a error in a certain
        > line.[/color]

        Hi,

        AFAIK, 1.7 compiles cleanly on VC 7.1 (all regressions pass). Could you
        be more specific with the compilation errors you are getting? I'd appreciate it
        if you can post some code that exhibits the problem in Spirit's mailing list.
        Rest assured, we are trying our best to make things work as smoothly as
        possible.

        Regards,
        --
        Joel de Guzman

        Download The Spirit Parser Library for free. Spirit is an object oriented recursive descent parser generator framework implemented using template meta-programming techniques.




        Comment

        • Moonlit

          #19
          Re: Best lex/yacc for C++?

          Hi,

          Thanks Joel four your reply and all your guys for working on spirit, I realy
          love to just write C++ code and not have to mix C and/or precompile stuff.

          I have got my VC7.1 version in. And it seems to compile fine (though I
          didn't create any more than some simple things), but it did compile the same
          example project that couldn't be compiled with VC6.0 and it works!

          However with the VC6.0 the following errors are given as soon as I use ast
          stuff (I could create a simple command line parser though) if you are
          interested:

          This is the ast_calc from the example section (the regular calc works fine
          with VC6.0).

          Compiling...
          ast_calc.cpp
          h:\include\boos t\spirit\tree\c ommon.hpp(207) : error C2984: 'node_iter_data '
          : template parameters '' and '' do not match
          h:\include\boos t\spirit\tree\c ommon.hpp(207) : see declaration of
          'node_iter_data '
          h:\include\boos t\spirit\tree\c ommon.hpp(534) : error C2989:
          'tree_match_att r<class boost::referenc e_wrapper<T> >' : template class has
          already been defined as a non-template class
          h:\include\boos t\spirit\tree\c ommon.hpp(534) : error C2988: unrecognizable
          template declaration/definition
          h:\include\boos t\spirit\tree\c ommon.hpp(569) : fatal error C1903: unable to
          recover from previous error(s); stopping compilation


          Thanks for your great work,

          Regards, Ron AF Greve



          "Joel de Guzman" <djowel@gmx.co. uk> wrote in message
          news:bmb1jc$khs pl$1@ID-58159.news.uni-berlin.de...[color=blue]
          > "Moonlit" <alt.spam@jupit er.universe> wrote in message
          > news:3f870549$0 $58712$e4fe514c @news.xs4all.nl
          >[color=green][color=darkred]
          > >>> I just decided to order my copy of vc++ 2003, hope it works with[/color][/color][/color]
          spirit[color=blue][color=green][color=darkred]
          > >> and
          > >>> well, I could always backtrack to flex++/byacc/bison++ if not.
          > >>>
          > >> The only problem I see with this is the latest version of VC++ still[/color][/color][/color]
          has[color=blue][color=green][color=darkred]
          > >> weak template support, and as you already know, Spirit is very template
          > >> intensive. Have you checked out the BOOST library, to which Spirit was
          > >> resently added too? It has some nice workarounds for various[/color][/color][/color]
          compilers.[color=blue][color=green]
          > >
          > > Well they say over in the spirit newsgroup that vc7.1 compiles very[/color][/color]
          well,[color=blue][color=green]
          > > but of course, the proof of the...
          > >
          > > I tried different versions of spirit 1.6.1 (the latest stable release).
          > > Could create a simple parser but when I wanted to use the ast templates[/color][/color]
          it[color=blue][color=green]
          > > failed, without that I don't think it is possible to write a[/color][/color]
          (maintainable)[color=blue][color=green]
          > > parser. The 1.7 release doesn't even compile, it gives a error in a[/color][/color]
          certain[color=blue][color=green]
          > > line.[/color]
          >
          > Hi,
          >
          > AFAIK, 1.7 compiles cleanly on VC 7.1 (all regressions pass). Could you
          > be more specific with the compilation errors you are getting? I'd[/color]
          appreciate it[color=blue]
          > if you can post some code that exhibits the problem in Spirit's mailing[/color]
          list.[color=blue]
          > Rest assured, we are trying our best to make things work as smoothly as
          > possible.
          >
          > Regards,
          > --
          > Joel de Guzman
          > http://www.boost-consulting.com
          > http://spirit.sf.net
          >
          >
          >[/color]


          Comment

          Working...