Re: MKS Lex and Yacc with MSVC++ 4.2 (Steve Simpson)
29 Jan 1997 11:47:03 -0500

          From comp.compilers

Related articles
MKS Lex and Yacc with MSVC++ 4.2 (1997-01-25)
Re: MKS Lex and Yacc with MSVC++ 4.2 (1997-01-29)
| List of all articles for this month |

From: (Steve Simpson)
Newsgroups: comp.compilers
Date: 29 Jan 1997 11:47:03 -0500
Organization: Shore.Net/Eco Software, Inc; (
References: 97-01-190
Keywords: yacc, MSDOS

Let me follow up with some more detail. Our application is written in
C++ for Windows 95/NT so we are using the -LC switch to output C++ and
we're defining LEX_WINDOWS and YACC_WINDOWS to be usuable from
Windows. The parser code is part of a Windows DLL.

The code from lex and yacc gives errors where it is setting int
pointers to short pointers and short pointers to int pointers. In 32
bit Windows, they are not the same. Prior versions of the compiler
would let these errors slide. I can cast the errors away but I just
get a crash when I execute the code.

I'm using the latest MKS version of Lex and Yacc for NT - version

>I've been having some trouble getting MKS Lex and Yacc output
>to compile with MS Visual C++ 4.2.
>There were a bunch of compile errors where casts were needed. I
>modified the code to eliminate the compiler errors as needed but I'm
>getting access violations.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.