Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Jan Ziak <0xe2.0x9a.0x9b@gmail.com> Newsgroups: comp.compilers Subject: Re: Parallel scanning, was How can the speed of a scanner be independent of the number of rules? Date: Thu, 24 Mar 2022 11:18:41 -0700 (PDT) Organization: Compilers Central Lines: 16 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-03-058@comp.compilers> References: <22-03-047@comp.compilers> <22-03-052@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="91980"; mail-complaints-to="abuse@iecc.com" Keywords: lex, parallel Posted-Date: 24 Mar 2022 15:19:18 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <22-03-052@comp.compilers> Xref: csiph.com comp.compilers:2955 On Thursday, March 24, 2022 at 6:26:21 PM UTC+1, Jan Ziak wrote: > [Is there anything published about parallel scanning? I'd think it'd be > inherently sequential since you don't know the state for a character > until you've processed all the previous characters. -John] The belief that "scanning is inherently sequential since you don't know the state for a character until you've processed all the previous characters" is false for most programming languages (BASIC, Go, XML, etc) for most real-world source codes. -atom [Well, OK, if I'm scanning XML and break it up into chunks to scan in parallel, how do I know whether I'm inside a CDATA block? Or are you just saying you can do clumps of a few characters at a time? Again, some sort of reference rather than just claiming it's possible would be a help. -John]