Re: Hand written or tool generated lexical analyzers for FORTRAN

"Pankaj" <pankaj.jangid@gmail.com>
27 Sep 2005 09:43:27 -0400

          From comp.compilers

Related articles
Hand written or tool generated lexical analyzers for FORTRAN pankaj.jangid@gmail.com (Pankaj) (2005-09-14)
Re: Hand written or tool generated lexical analyzers for FORTRAN gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-09-15)
Re: Hand written or tool generated lexical analyzers for FORTRAN fjscipio@rochester.rr.com (Fred J. Scipione) (2005-09-17)
Re: Hand written or tool generated lexical analyzers for FORTRAN gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-09-18)
Re: Hand written or tool generated lexical analyzers for FORTRAN pankaj.jangid@gmail.com (Pankaj) (2005-09-27)
Re: C scanners, was Hand written or tool generated lexical analyzers f rsc@swtch.com (Russ Cox) (2005-09-30)
Re: C scanners, was Hand written or tool generated lexical analyzers f nmm1@cus.cam.ac.uk (2005-10-02)
Re: C scanners, was Hand written or tool generated lexical analyzers f vesa.karvonen@cs.helsinki.fi (Vesa Karvonen) (2005-10-13)
| List of all articles for this month |
From: "Pankaj" <pankaj.jangid@gmail.com>
Newsgroups: comp.compilers
Date: 27 Sep 2005 09:43:27 -0400
Organization: http://groups.google.com
References: 05-09-05405-09-061 05-09-069
Keywords: lex, parse, design, comment
Posted-Date: 27 Sep 2005 09:43:27 EDT

I still feel that a design where lexer doesn't have to communicate
with syntactical analyser is a good and simple design and more
efficient also.


How about an idea where lexer is divided into two layers. First is a
scanner which takes character input and returns semi-classified tokens
but the second stage, the lexer, will completely resolve the remaining
tokens. i.e. second stage will classify keywords and identifiers.


Pankaj


[If your language permits lexing without context feedback, you can
just do it. But if you need feedback, e.g., to identify token
boundaries, I don't see how the second layer would help. -John]


Post a followup to this message

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