Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!pollux.usc.edu!papa From: papa@pollux.usc.edu (Marco Papa) Newsgroups: comp.windows.ms.programmer Subject: Re: MS Windows compatible YACC and LEX Keywords: YACC, LEX Message-ID: <28711@usc> Date: 10 Dec 90 01:31:01 GMT References: <256@stbimbo.UUCP> <28630@usc> <262@stbimbo.UUCP> Sender: news@usc Organization: Felsina Software, Los Angeles, CA Lines: 66 Nntp-Posting-Host: pollux.usc.edu In article <262@stbimbo.UUCP> ges@stbimbo (Gerald Sullivan) writes: |In article <28630@usc> papa@pollux.usc.edu (Marco Papa) writes: ||In article <256@stbimbo.UUCP> ges@stbimbo.UUCP (Gerald Sullivan) writes: |||Is anyone out there aware of yacc and lex clones that produce |||MS Windows compatible code. In other words I am looking for |||yacc and lex that produce code that can be linked to Windows |||applications. I would be happy to hear about any other parser |||generators that produce Windows compatible code. || ||Lex and Yacc have really nothing to do with Windows, so your question should be ||something like "is there a lex/yacc package that works with compilers that can ||be used to build Windows applications?". The answer is yes. I'm building such ||an application. I'm using MKS Lex/Yacc. You can get a good deal on the ||package from either Programmer's Paradise of Programmer's Shop. Discounted ||price is around $200. I'm fully satisfied with this product. || ||-- Marco | |No, my question is exactly what I asked. Sorry if it was not clear. | |Are you linking the parser to your Windows application or just executing |the parser from a Windows application as a DOS "process"? I need to do |the former. I'm linking actually "multiple" parser to the window application. And I am calling Windows routines from the routines called by the parser. |It is my understanding that just |because somthing compiles with MS C does not imply that it will work run |under Windows as part of a Windows application. In other words, y.tab.c |(the parser source code generated by yacc) produced by MKS yacc may do |things acceptable under DOS but not Windows (ie segment arithmatic, |requiring incompatible libraries, etc). I may be mistaken, I am new to |Windows and DOS but have used yacc and lex extensively. This is definitely not true of MKS lex/yacc. And I can't see why it would be true of any other. You'll likely have to create your own gettoken routine, if you don;t want to use the one provided, but MKS lex allows you to redifine all the macros to your heart content. |I want to call yyparse() from a Windows application. Note that it is |not enough to be able to run the parser as a DOS "process" because I need |access to data structures built as a side effect of the parsing process. |I don't think it is possible to pass data structures to a Windows application |from a DOS "process" spawned by the application. I may be wrong. I sincerely don't know what you're talking about. But then, I don't use DOS processes at all. |I am aware of MKS yacc and lex. According to MKS, the output of MKS yacc |is indeed incompatible with Windows. They did not say why. They said that |the parser produced by MKS yacc cannot be linked to a Windows application. |They said it will run as a DOS application under Windows. Unfortunately, |that is not what I need. The MKS person suggested I chek back in 6 months. I guess they don't know what they are talking about either. BTW, mks LEX/yacc worked for me with MSC 5.1 and 6.0 and Windows 2.11 and 3.0. -- Marco -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Xerox sues somebody for copying?" -- David Letterman -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=