From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <312c73e5b2edd1e464cb971a39bd334e@coraid.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] Replacements for lex From: Brantley Coile Date: Fri, 19 Jan 2007 14:13:40 -0500 In-Reply-To: <7871fcf50701191058w7ef924cer224b9c8e4f63321b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 05f549ea-ead2-11e9-9d60-3106f5b1d025 My suggestion is just to write scanners by hand. I've written dozens and they take only a few minutes. While a half hour seems long compared to the speed of an automaticly generated scanner, the time difference over the total project is quite small. And besides. You want to learn how to write compilers. > Has anyone had success with lexer-generators other than lex under Plan > 9? I'm taking a compilers class this semester and I'd like to do as > much work under Plan 9 as possible. > > I looked around online and found re2c, which looked interesting except > it's written in C++. > > For languages sufficiently like C, is regexp(2) suitable? > > --Joel