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) |
From: | glen herrmannsfeldt <gah@ugcs.caltech.edu> |
Newsgroups: | comp.compilers |
Date: | 18 Sep 2005 00:44:41 -0400 |
Organization: | Compilers Central |
References: | 05-09-054 05-09-061 05-09-069 |
Keywords: | parse |
Posted-Date: | 18 Sep 2005 00:44:41 EDT |
Fred J. Scipione wrote:
(snip)
> This discussion has reminded me of a thought I had following the
> expositions in this news group on Quantum Parsers and Quantum
> Grammars. You may recall (or look-up :-)) that the threads included
> demonstrations of the idea that there is an algebra for parser
> descriptions that allows both the language terms and action items
> (code segments) to be manipulated without changing their semantics (or
> at least that is my poor paraphrasing of one of the demonstrated
> ideas).
And your discussion reminded me of dynamic programming algorithms. I
believe they are often used in code generators, to find the optimal
code sequence for a given function.
I was just thinking, though, that they could be used in a parser. In
case of a syntax error one could find the closest legal syntax to the
input statement. I have known compilers to attempt to correct the
input, but I don't know that they used dynamic programming.
The IBM PL/I(F) compiler was pretty good, with messages like
"Semicolon missing, one inserted".
I still remember when I was just learning Fortran and asked someone a
question about it, they commented about a compiler that didn't
understand the FROMAT statement.
-- glen
Return to the
comp.compilers page.
Search the
comp.compilers archives again.