Re: DFA Lexer Generation From BNF

Robert A Duff <bobduff@shell01.TheWorld.com>
Fri, 16 Nov 2007 20:28:41 -0500

          From comp.compilers

Related articles
Code generation from AST lssilva@gmail.com (Lucas S. Silva) (2007-11-10)
DFA Lexer Generation From BNF pbm@oct.net (Paul B Mann) (2007-11-10)
Re: DFA Lexer Generation From BNF cfc@shell01.TheWorld.com (Chris F Clark) (2007-11-11)
Re: DFA Lexer Generation From BNF gneuner2/@/comcast.net (George Neuner) (2007-11-12)
Re: DFA Lexer Generation From BNF pbm@oct.net (Paul B Mann) (2007-11-16)
Re: DFA Lexer Generation From BNF bobduff@shell01.TheWorld.com (Robert A Duff) (2007-11-16)
Re: DFA Lexer Generation From BNF idbaxter@semdesigns.com (2007-11-17)
| List of all articles for this month |

From: Robert A Duff <bobduff@shell01.TheWorld.com>
Newsgroups: comp.compilers
Date: Fri, 16 Nov 2007 20:28:41 -0500
Organization: The World Public Access UNIX, Brookline, MA
References: 07-11-033 07-11-038
Keywords: parse, lex

"Paul B Mann" <pbm@oct.net> writes:


> Does anyone know of a lexer generator whose input is a BNF grammar
> instead of regular expressions ?
>
> Paul Mann
>
> [DFA's aren't adequate to recognize BNF, which is why parser
> generators use a DFA and a stack or other more powerful machines. I
> suppose you could limit it to a BNF subset equivalent to regexps, but
> what would be the point? -John]


The point (of using BNF notation for a lexer) I think would be to use a
uniform notation for both lexer and parser. Seems reasonable, since the
one is a subset of the other. Some parser tools do this..


- Bob


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.