🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #2714

Re: YACC/LEX Combo for large textual input

#2714
From: Dan A. Dickey
Date: Mon, 28 Jan 1991 20:15
23 lines
1367 bytes
Well, I now know what I need to know.  I thank everyone who has sent
me email.  You can stop sending now.  I particularly thank:
Larry Jones, Florian Krohm, dilse2@info.win.tue.nl,
Mark Pledger, Rick Kimball, Thomas J Roberts, and Peter Mielke.

The solution was quite simple actually, I'm embarassed that I didn't
think of it myself; but, that's why I originally asked.

The solution I'll use consists of modifying the lex piece to just parse
"identifiers".  Then, when it finds an identifier, it will look it up
in a "reserved word" table.  If found, it will return the associated token.
If not found, then it returns "identifier".  The lookup will take place
via a C routine, not building it into the lex parse tables like I was doing.

I knew there had to be a better and easier way, and this, I believe, is it.

	-Dan


--
---------
Dan A. Dickey      ddickey@fizban.cray.com, or ddickey@aspen.cray.com
Technical Details
Message-ID: <135928.7596@timbuk.cray.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!timbuk!ddickey
References: <144123.10308@timbuk.cray.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!timbuk!ddickey
From: ddickey@aspen04.cray.com (Dan A. Dickey)
Newsgroups: comp.lang.misc
Subject: Re: YACC/LEX Combo for large textual input
Message-ID: <135928.7596@timbuk.cray.com>
Date: 28 Jan 91 20:15:00 GMT
References: <144123.10308@timbuk.cray.com>
Reply-To: ddickey@aspen04.cray.com (Dan A. Dickey)
Organization: Cray Research, Inc.
Lines: 23