CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Guest

    Yacc and Lex in Visual C++ ??

    Hi,

    I want to create a kind of compilator. I know how to do that in C language with a yacc and a lex. However how can i do that in Visual C++ ??

    Thanks for your help.

    Best regards.

    Steph.


  2. #2
    Join Date
    Apr 1999
    Posts
    32

    Re: Yacc and Lex in Visual C++ ??

    Hello Steph! I really like your problem because it has been something I have been resolving the last year! Where I work had to build up a compiler for ANSI C language so that we decided to use Lex and Yacc..But in Visual C++ is quite a problem seen that we needed classes implementing the same stuff. We have created Lex.exe and Yacc.exe in order to create VC++ classes as output. Now I can't tell you more because I have all this stuff at home. I let you ma e-mail if you are interested to knoew more. I can give you these files you can use : [email protected]


  3. #3
    Guest

    Re: Yacc and Lex in Visual C++ ??

    Here is a good lex/yacc for Win32 platform: http://www.cix.co.uk/~phil-stearns/
    Goo luck!! Bye!!


  4. #4
    Join Date
    Apr 1999
    Location
    Miami, FL
    Posts
    67

    Re: Yacc and Lex in Visual C++ ??

    Search the web for a product called "Visual Parse++". I hear it's pretty good for what you want to do.

    Have fun!

    Alvaro

  5. #5
    Join Date
    May 1999
    Location
    Germany
    Posts
    12

    Re: Yacc and Lex in Visual C++ ??

    Hi,
    You can use GNU FLEX and Bison.
    For flex you need to fix the skeleton file (or ask me for mailing it to you). Bison works out of the shelf.
    Both the lexer and the parser are simple function calls as you know from Yacc anf Lex. Works with renaming the files to CPP. Even a CString can be handled from Bison...
    There are also flex++ and bison++, but I had not the time to test them.
    I used FLex and Bison since VC++ V1.0 and I'm really happy with it (now having VC++ V5.0, no 6 yet)

    .


    Dieter Fauth :-)

  6. #6
    Join Date
    Apr 1999
    Location
    Chennai, INDIA
    Posts
    27

    Re: Yacc and Lex in Visual C++ ??

    hi,
    i have been working in this for the past one year. if you want to develop the compiler in C++ in Windows Environment, you can use PCCTS - Purdue Compiler Construction Tool Set. this is really good and this is freeware. you can get it at www.antlr.org. you can create Abstract Syntax Trees for the Grammar that you have parsed. if you need any help on this, mail me. my mail id is [email protected]

    Good Luck,
    Kalyan



  7. #7
    Guest

    Re: Yacc and Lex in Visual C++ ??

    Hi,
    Could you mail me FLex and Bison, and FLex++ and Bison++ at [email protected].
    I have VC++ 5.0. I will use it so if you can mail it to me fast, it will be very helpful.

    Danke schön Dieter. Ich spreche ein bissen Deutsch !

    Stéphane :-)


  8. #8
    Join Date
    May 1999
    Location
    Germany
    Posts
    12

    Re: Yacc and Lex in Visual C++ ??

    Hi Stéphane,
    here is the skeleton file you need for using FLEX with MSVC.
    Please get the program files and docu from the various GNU sources (I guess Flex newst vesion is 2.5.4 and Bison is 1.25).

    Oh, Sorry, attachments do not work here !?? Send me a private mail to code guru with you e-mail address.

    Many regards,

    Dieter Fauth :-)

  9. #9
    Guest

    Re: Yacc and Lex in Visual C++ ??

    Could you please mail me a copy of those files? The address is:
    [email protected]

    Thank you in advance.
    Jessie


  10. #10
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266

    Re: Yacc and Lex in Visual C++ ??

    I think that the company web site for Visual Parse++ is: http://www.sand-stone.com

    There is a message in the comp.compilers newsgroup about Visual Parse++ at: http://www.iecc.com/comparch/article/96-05-145

    The comp.compilers newsgroup is at: http://www.iecc.com/compilers/

    The Journal of C Language Translation looks interesting at: http://jclt.iecc.com/

    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  11. #11
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266

    Re: Yacc and Lex in Visual C++ ??

    The Parser Generator (http://www.cix.co.uk/~phil-stearns/) has moved to the Bumble-Bee Software homepage at: http://www.bumblebeesoftware.com/



    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured