Re: A minimal LL(1) parser generator ?

rockbrentwood@gmail.com
Sat, 4 Jan 2020 10:37:29 -0800 (PST)

          From comp.compilers

Related articles
[4 earlier articles]
Re: A minimal LL(1) parser generator ? gaztoast@gmail.com (2019-12-31)
Re: A minimal LL(1) parser generator ? anton@mips.complang.tuwien.ac.at (2019-12-31)
Re: A minimal LL(1) parser generator ? carlglassberg@gmail.com (2020-01-01)
Re: A minimal LL(1) parser generator ? gaztoast@gmail.com (honey crisis) (2020-01-02)
Re: A minimal LL(1) parser generator ? anton@mips.complang.tuwien.ac.at (2020-01-02)
Re: A minimal LL(1) parser generator ? gneuner2@comcast.net (George Neuner) (2020-01-02)
Re: A minimal LL(1) parser generator ? rockbrentwood@gmail.com (2020-01-04)
Re: A minimal LL(1) parser generator ? gaztoast@gmail.com (honey crisis) (2020-01-05)
Re: A minimal LL(1) parser generator ? carlglassberg@gmail.com (2020-01-05)
Re: A minimal LL(1) parser generator ? carlglassberg@gmail.com (2020-01-05)
Re: A minimal LL(1) parser generator ? carlglassberg@gmail.com (2020-01-05)
Branched gotos was: Re: A minimal LL(1) parser generator ? christopher.f.clark@compiler-resources.com (Christopher F Clark) (2020-01-06)
Re: Branched gotos was: Re: A minimal LL(1) parser generator ? jamin.hanson@googlemail.com (Ben Hanson) (2020-01-07)
[3 later articles]
| List of all articles for this month |

From: rockbrentwood@gmail.com
Newsgroups: comp.compilers
Date: Sat, 4 Jan 2020 10:37:29 -0800 (PST)
Organization: Compilers Central
References: 19-12-016
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="71911"; mail-complaints-to="abuse@iecc.com"
Keywords: LL(1)
Posted-Date: 04 Jan 2020 21:19:07 EST
In-Reply-To: 19-12-016

On Sunday, December 22, 2019 at 10:17:44 AM UTC-6, Andy wrote:
> ANTLR has even LL(*) but is too complicated. I am searching maximal
> simple and elegant generator which generates function call like
> written by hand.


A large set of parsers are lined up in the parser generator comparison on
Wikipedia here
https://en.wikipedia.org/wiki/Comparison_of_parser_generators


The question of who in the list does bona fide code synthesis (as opposed to
cookie-cutter code generation) is not directly addressed, as far as I can see.
But the items can be reviewed individually.


Perhaps you will end up writing a parser generator that does this. The obvious
"direct map" method is
Draft Version:
state = goto label
state transition = goto
general format:
Label:
      action
goto(s) - either single goto or branched gotos


Synthesized Version:
control flow structures are synthesized from this.


The transformation of jump tables to control flow structures is essentially
the same process as the transformation of finite state automata to regular
expressions. An intelligent transformation process will leave some goto's in
place in order to prevent the introduction of redundancy.


If the generated parser is linked to the parser specification, the
transformation has to be able to correctly inject "#line" directives.
Alternatively, a better method is NOT to inject "#line" directives, but
comments that interweave displays of the original code that the transformation
took place from.


Post a followup to this message

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