Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #3071
| From | George Neuner <gneuner2@comcast.net> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: The dragon book says separating lexical analysis and parsing is beneficial, so why doesn't ANTLR separate them? |
| Date | 2022-06-11 18:15 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <22-06-040@comp.compilers> (permalink) |
| References | <22-06-023@comp.compilers> |
On Thu, 9 Jun 2022 14:52:59 +0000, Roger L Costello <costello@mitre.org> wrote: >[elided quote] seem like compelling reasons for separating the lexical analysis >from parsing, so why does ANTLR not do so; i.e., why does ANTLR combine them? > >/Roger > >[1] Compilers: Principles, Techniques, and Tools by Aho, Sethi, and Ullman. Technically ANTLR does /not/ combine them ... it generates separate lexer and parser. What ANTLR /does/ do is allow specifying both the parser and lexer in a single input file. It also can recognize textual constants within the parser specification and generate lexer rules for them. Note that Yacc and Bison also recognize textual constants in the parser grammar and generate a token id for the (seperately specified) lexer to return. ANTLR goes further only because it can: ANTLR can create a lexer whereas Yacc and Bison cannot. George
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
The dragon book says separating lexical analysis and parsing is beneficial, so why doesn't ANTLR separate them? Roger L Costello <costello@mitre.org> - 2022-06-09 14:52 +0000
Re: The dragon book says separating lexical analysis and parsing is beneficial, so why doesn't ANTLR separate them? "Alexei A. Frounze" <alexfrunews@gmail.com> - 2022-06-09 18:07 -0700
Re: The dragon book says separating lexical analysis and parsing is beneficial, so why doesn't ANTLR separate them? gah4 <gah4@u.washington.edu> - 2022-06-09 23:01 -0700
Re: The dragon book says separating lexical analysis and parsing is beneficial, so why doesn't ANTLR separate them? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-06-10 12:26 +0200
The dragon book says separating lexical analysis and parsing is beneficial, so why doesn't ANTLR separate them? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-06-11 23:45 +0300
Re: The dragon book says separating lexical analysis and parsing is beneficial, so why doesn't ANTLR separate them? George Neuner <gneuner2@comcast.net> - 2022-06-11 18:15 -0400
Re: The dragon book says separating lexical analysis and parsing is beneficial, so why doesn't ANTLR separate them? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2022-06-12 14:10 +0000
csiph-web