Using flex++ and bison (not ++) with c++

Discussion in 'C++' started by daniele.calisi@gmail.com, Dec 21, 2005.

  1. Guest

    Hi everyone,
    after some days spent in long searches with google, I still not have
    found a solution with this problem:

    I need to use flex (or flex++) and bison (but not bison++) in order to
    create a simple expression parser (that reads from a string, but this
    is another problem)

    I have problems with the fact that I cannot use bison++, and bison
    creates a c file... do you have any simple tutorial on how create such
    a thing?
    , Dec 21, 2005
    #1
    1. Advertising

  2. <> schrieb im Newsbeitrag
    news:...
    > Hi everyone,
    > after some days spent in long searches with google, I still not have
    > found a solution with this problem:
    >
    > I need to use flex (or flex++) and bison (but not bison++) in order
    > to
    > create a simple expression parser (that reads from a string, but
    > this
    > is another problem)
    >
    > I have problems with the fact that I cannot use bison++, and bison
    > creates a c file... do you have any simple tutorial on how create
    > such
    > a thing?


    Why not using boost::spirit?

    www.boost.org
    Gernot Frisch, Dec 21, 2005
    #2
    1. Advertising

  3. wrote:

    > I have problems with the fact that I cannot use bison++, and bison
    > creates a c file... do you have any simple tutorial on how create such
    > a thing?


    Recent versions of bison can be used with C++. You can see a sample in my
    open source z80 assembler:

    http://www.arrakis.es/~ninsesabe/pasmo/

    The last version, still under development, has a bison parser that compiles
    in C++, inside a namespace and using a class as lexer.

    Take care, bison manual warns that c++ related features can be changed in
    next releases.

    --
    Salu2
    =?ISO-8859-15?Q?Juli=E1n?= Albo, Dec 21, 2005
    #3
  4. Guest

    Gernot Frisch wrote:

    > Why not using boost::spirit?


    Man, that thing is incredible. I wrote an incredibly validator for a
    file format we made up in less than 2 hours, with the learning and
    everything.

    Where can I get more info? I want to look into the possibilty of
    feeding parse() a stream instead of character sequence. Flipping
    through the docs has been helpful up to this point but I need more;
    maybe it's in there but I can't find it...where is a good full coverage
    tutorial on spirit (not just regurgitating the calculator example in
    the docs for instance)?
    , Dec 22, 2005
    #4
  5. Guest

    wrote:
    > Gernot Frisch wrote:
    >
    > > Why not using boost::spirit?

    >
    > Man, that thing is incredible. I wrote an incredibly validator for a
    > file format we made up in less than 2 hours, with the learning and
    > everything.
    >
    > Where can I get more info? I want to look into the possibilty of
    > feeding parse() a stream instead of character sequence. Flipping
    > through the docs has been helpful up to this point but I need more;
    > maybe it's in there but I can't find it...where is a good full coverage
    > tutorial on spirit (not just regurgitating the calculator example in
    > the docs for instance)?


    Nevermind...perfectly obvious if you just keep reading a bit.
    , Dec 22, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom Heathcote

    Problem with flex++/bison++

    Tom Heathcote, Nov 26, 2003, in forum: C++
    Replies:
    0
    Views:
    847
    Tom Heathcote
    Nov 26, 2003
  2. Chris Cranford

    Bison/Flex To ByteCode

    Chris Cranford, Apr 15, 2004, in forum: C++
    Replies:
    2
    Views:
    525
    Karl Heinz Buchegger
    Apr 15, 2004
  3. Replies:
    2
    Views:
    477
    Sherm Pendley
    Sep 7, 2005
  4. Replies:
    2
    Views:
    1,543
    Peter
    Mar 2, 2007
  5. Replies:
    0
    Views:
    330
Loading...

Share This Page