From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Config File parsing
Date: Tue, 28 Feb 2012 11:57:58 -0500 [thread overview]
Message-ID: <3ab2f519d8b94b9287908779f8eba4db@chula.quanstro.net> (raw)
In-Reply-To: <6111913F-25EB-4182-8E3B-357446F05655@bitblocks.com>
On Tue Feb 28 11:53:17 EST 2012, bakul@bitblocks.com wrote:
> I have almost always used a handwritten lexer as it seemed about the
> same amount of work and the end result is much smaller and easier to
> understand and lexers for different languages are not all that
> different so once you've written one it is pretty easy to write
> another; and somehow lex or flex interface never felt quite right.
for an extreme example, see /sys/src/cmd/upas/smtp/smtpd.y.
imho, the trick in lexing is to do as little as possible. context rules
tend to sneak in in the lex phase. for example, rc's free carets and
willingness to eat newlines under rules that seem obvious until they
need explaining.
- erik
next prev parent reply other threads:[~2012-02-28 16:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 13:23 arnold
2012-02-28 4:03 ` Nick LaForge
2012-02-28 14:57 ` Aram Hăvărneanu
2012-02-28 16:46 ` Bakul Shah
2012-02-28 16:57 ` erik quanstrom [this message]
[not found] <199d7d8a-c02f-4b21-bb9b-c9be189024bc@w27g2000yqm.googlegroups.co>
2012-02-27 13:18 ` erik quanstrom
2012-02-27 14:06 ` Jack Norton
-- strict thread matches above, loose matches on Subject: below --
2012-02-27 9:53 Mohanasundaram VIT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ab2f519d8b94b9287908779f8eba4db@chula.quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).