Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Roger L Costello Newsgroups: comp.compilers Subject: Flex is the most powerful lexical analysis language in the world. True or False? Date: Wed, 4 May 2022 11:22:34 +0000 Organization: Compilers Central Lines: 34 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-05-003@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="28745"; mail-complaints-to="abuse@iecc.com" Keywords: lex, question, comment Posted-Date: 04 May 2022 13:50:10 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Accept-Language: en-US Content-Language: en-US Xref: csiph.com comp.compilers:2991 Hi Folks, 1. A lexical analysis language that exclusively provides regular expressions for scanning input can only process regular languages. (a) True (b) False 2. Flex provides, in addition to regular expressions, states and a pushdown stack. This greatly expands the set of languages that can be processed. (a) True (b) False 3. Because Flex provides states and a pushdown stack, Flex lexers can process context-free languages. (a) True (b) False 4. No other lexical analysis language provides states and a pushdown stack. (a) True (b) False 5. Flex is the most powerful lexical analysis language in the world. (a) True (b) False /Roger [I think that you could easily graft a state stack into any lexer that has start states. Also, tools like Antlr combine the lexer and parser generators, so they're at least as powerful as flex. -John]