Path: csiph.com!xmission!usenet.csail.mit.edu!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: Re: The remarkable similarities between Flex/Lex and XSLT Date: Fri, 24 Jun 2022 06:43:43 -0700 (PDT) Organization: Compilers Central Lines: 29 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-06-074@comp.compilers> References: <22-06-073@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="80752"; mail-complaints-to="abuse@iecc.com" Keywords: lex, design, comment Posted-Date: 24 Jun 2022 19:58:55 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-06-073@comp.compilers> Xref: csiph.com comp.compilers:3095 On Friday, June 24, 2022 at 6:00:44 AM UTC-7, Roger L Costello wrote: > XSLT is a language for processing XML documents. > There are remarkable similarities between Flex/Lex and XSLT. Lex was created > 47 years ago, long before XSLT. One wonders if some members of the XSLT 1.0 > Working Group were Lex users and were influenced by its concepts? > Here are some of the similarities between Flex/Lex and XSLT: > Both are pattern-matching languages, i.e., I was thinking, but didn't post yet, about the different ways of writing pattern matching languages. Well, more specifically about parsing languages, but even more about the pattern matching part. I wrote recently about STEP, which has an input language somewhat different from yacc/bison for describing a parser. And even more, if there should be a language for writing pattern matching languages in. That is, do we need a compiler-compiler-compiler. It does seem rare that one starts from scratch in defining a new computer language, even though not a general purpose programming language. [Pattern-action goes back at least to RPG in 1959, and it was based on the way plugboard accounting machines work. -John]