From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: Clint Olsen Message-ID: References: <5f9238aeb651f621030bbcc5bf017170@plan9.bell-labs.com>, <200307170222.h6H2M2715827@augusta.math.psu.edu> Subject: Re: [9fans] gcc/plan9 Date: Fri, 18 Jul 2003 08:45:28 +0000 Topicbox-Message-UUID: fac9ec2a-eacb-11e9-9e20-41e7f4b1d025 In article <200307170222.h6H2M2715827@augusta.math.psu.edu>, Dan Cross wrote: > I really would like to see lex (or an evolution of it) brought up to > speed with respect to the modern world. The idea of a lexical analyser > generator is a good one, even if the implementation is a little behind > the times. Lex for the most part has been displaced by flex ["He's dead, Jim"]. In past projects I've used re2c, which is considerably more lightweight and more akin to hand-generated scanners. Be warned that while re2c generates ANSI C, it is written in C++. Some folks on the YASM project took it and rewrote it in ANSI C but they Borg-ified it into their YASM build system. Some cord cutting would be required, but it wouldn't be that difficult to do. The maintainer of re2c apears to have taken the source from his site, but it's a port on FreeBSD and many Linux distributions. Here's a link for the lazy: http://www.0lsen.net/re2c-0.9.1.tar.gz -Clint