🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #164

Re: Comment delimiters

#164
From: John Levine
Date: Sat, 17 Oct 2026 04:01
18 lines
2031 bytes
According to Anton Ertl <anton@mips.complang.tuwien.ac.at>:
>As for convenience, for various compilers I read that either the
>scanner or the parser (or both) were hand-written (I don't remember
>which one was more frequent). ...

Lexers are usually much slower than parsers because they're O(N) in
the number of characters in the source code while parsers are O(N) in
the number of tokens the lexer returned.  So they're worth some effort
to speed up.

There are also tools like re2c which turns regular expressions into
C code which tends to run a lot faster than the table lookup loop
in flex parsers.

-- 
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly
Technical Details
Message-ID: <11aurud$2b0g$3@gal.iecc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder9.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
References: <1791742457-5857@newsgrouper.org> <2026Oct15.081750@mips.complang.tuwien.ac.at> <11asgjl$328d5$1@dont-email.me> <2026Oct16.191024@mips.complang.tuwien.ac.at>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder9.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: John Levine <johnl@taugh.com>
Newsgroups: comp.arch
Subject: Re: Comment delimiters
Date: Sat, 17 Oct 2026 04:01:17 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <11aurud$2b0g$3@gal.iecc.com>
References: <1791742457-5857@newsgrouper.org> <2026Oct15.081750@mips.complang.tuwien.ac.at> <11asgjl$328d5$1@dont-email.me> <2026Oct16.191024@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 17 Oct 2026 04:01:17 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
	logging-data="76816"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <1791742457-5857@newsgrouper.org> <2026Oct15.081750@mips.complang.tuwien.ac.at> <11asgjl$328d5$1@dont-email.me> <2026Oct16.191024@mips.complang.tuwien.ac.at>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)