*BSD News Article 29475


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!MathWorks.Com!europa.eng.gtefsd.com!library.ucla.edu!ihnp4.ucsd.edu!sdd.hp.com!nigel.msen.com!zib-berlin.de!irz401!uriah!not-for-mail
From: j@uriah.sax.de (J Wunsch)
Newsgroups: comp.os.386bsd.questions
Subject: Re: yacc lex and *BSD how to get it working
Date: 17 Apr 1994 19:35:31 +0200
Organization: Private U**X site; member IN e.V.
Lines: 24
Message-ID: <2ors13INN6ph@bonnie.sax.de>
References: <1994Apr14.144305.16368@news.uit.no>
NNTP-Posting-Host: bonnie.sax.de

finns@cc.uit.no (Finn Stensvik) writes:

>lex get a parse-error when chewing on a file produced by yacc.

>The errormsg is:
>lex.l:90: parse error before '1'

What are the related code lines? If possible, try to look at the C code.

>lex had problems parsing a file produced by yacc.

Erm, lex should never attempt to parse a file produce by yacc:-)
(Yacc compiles .y files into .c, lex compiles .l files into .c)

Can you give more data points? I'm suspecting some strange
re#define's, Xaw3d also suffers from it. The most probable thing is
that someone tries to redefine input(), which used to be a macro in
AT&T lex, but is a function in flex (aka., Berkeley lex). The correct
way were re#define'ing YY_INPUT() instead. This would work for both.
-- 
cheers, J"org                             work:    joerg_wunsch@tcd-dresden.de
                                          private:   joerg_wunsch@uriah.sax.de
Steinbach's Guideline for Systems Programming:
        Never test for an error condition you don't know how to handle.