From owner-freebsd-hackers Mon Dec 2 13:03:28 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA13197 for hackers-outgoing; Mon, 2 Dec 1996 13:03:28 -0800 (PST) Received: from hemi.com (hemi.com [204.132.158.10]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id NAA13192 for ; Mon, 2 Dec 1996 13:03:26 -0800 (PST) Received: (from mbarkah@localhost) by hemi.com (8.8.3/8.7.3) id OAA07802; Mon, 2 Dec 1996 14:02:07 -0700 (MST) From: Ade Barkah Message-Id: <199612022102.OAA07802@hemi.com> Subject: Re: Lex/Yacc question To: terry@lambert.org (Terry Lambert) Date: Mon, 2 Dec 1996 14:02:07 -0700 (MST) Cc: hackers@freebsd.org In-Reply-To: <199612021835.LAA10927@phaeton.artisoft.com> from "Terry Lambert" at Dec 2, 96 11:35:37 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > You can also avoid states if you want to... for example, in your rfc821.l: > > [ ... ] > > > | command: /* nothing*/ > > | | command incomplete_helo > > | | command helo_command > > | { yyerrok; } > > | ; > > [ ... ] > > I found in implementation for an interactive parser, this tends to fail. > > Specifically, using the "-i" option to get a case insensitive parser > (instead of specifying [Hh][Ee][Ll][Oo]) results in your string that > you assemble from '.' returns coming back case converted. > > I actually though this was bad from several perspectives, [...] =-) Probably getting far off topic from -hackers now. In any case, I tested my quicky implementation and it does *not* convert the input case, regardless of using the '-l' "lex compatibility flag". (And I do use -i, otherwise those regexes look very ugly very fast!) I do have some additional rules to handle things like empty lines, syntax errors, etc. | mail FROM : | 250 ... Sender ok Converting the case would violate even rfc821, since many mail systems are case sensitive. If I'm not too busy with real work I'll finish up a minimal rfc821 implementation later today. Regards, -Ade [ps: We're probably going to sell a standalone email-to-paging gateway with FreeBSD as its host OS. If we actually sell them, I plan that a portion of the each sale would be donated back to FreeBSD.] ------------------------------------------------------------------- Inet: mbarkah@hemi.com - HEMISPHERE ONLINE - -------------------------------------------------------------------