Re: Has lexing and parsing theory advanced since the 1970's?

Ev Drikos <drikosev@gmail.com>
Wed, 29 Sep 2021 05:07:52 -0700 (PDT)

          From comp.compilers

Related articles
Has lexing and parsing theory advanced since the 1970's? costello@mitre.org (Roger L Costello) (2021-09-14)
Re: Has lexing and parsing theory advanced since the 1970's? anton@mips.complang.tuwien.ac.at (2021-09-16)
Re: Has lexing and parsing theory advanced since the 1970's? 480-992-1380@kylheku.com (Kaz Kylheku) (2021-09-17)
Has lexing and parsing theory advanced since the 1970's? christopher.f.clark@compiler-resources.com (Christopher F Clark) (2021-09-18)
Re: Has lexing and parsing theory advanced since the 1970's? drikosev@gmail.com (Ev Drikos) (2021-09-29)
| List of all articles for this month |

From: Ev Drikos <drikosev@gmail.com>
Newsgroups: comp.compilers
Date: Wed, 29 Sep 2021 05:07:52 -0700 (PDT)
Organization: Compilers Central
References: 21-09-008
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="74987"; mail-complaints-to="abuse@iecc.com"
Keywords: parse, history
Posted-Date: 29 Sep 2021 17:10:44 EDT
In-Reply-To: 21-09-008

On Thursday, September 16, 2021 at 7:56:25 PM UTC+3, Roger L Costello wrote:
>
> That said, Flex & Bison is old. Has lexing/parsing theory advanced since the
> 1970’s? If yes, are there parser generators available today which are based on
> those advances in lexing/parsing theory? Or does Flex & Bison still represent
> the state-of-the-art in terms of the underlying theory it uses?


Hello,


The routines that recognize tokens are still called scanners and those
that parse the input are still called parsers. That explained, this long
list may give a clue of what an answer to your last question shall be:
https://en.wikipedia.org/wiki/Comparison_of_parser_generators


Yet, I haven't used most of them. So, I'll give you an example with
Syntaxis, a tool I've coded that isn't included in the above list.


If we try to parse this erroneous Fortran line with the command 'fcheck'
(binary available at https://github.com/drikosev/Fortran) we see that
the expected tokens in the error message contain both a '=' and a name:


program ? ; end


Note that the command 'fcheck' uses a deterministic parser (built by
Syntaxis) and the expected tokens in an error message are pre-computed.


To my knowledge, the ability of a parser to shift simultaneously two
distinct terminals in one transition isn't an advancement in theory but
I guess several tools mentioned in the Wikipedia list above possibly
provide similar or better goodies (ie Chris Clark described an ANTLR4
feature that advances theory directly).


Regards,
Ev. Drikos


Post a followup to this message

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