
Re: Branched gotos was: Re: A minimal LL(1) parser generator ?
I can confirm that this works well. Adding the ability to search using a grammar rather than simply match also opens up a whole other world of possibilities. Regards, Ben

Branched gotos was: Re: A minimal LL(1) parser generator ?
to > cookiecutter 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

Re: A minimal LL(1) parser generator ?
That table didn't align properly, so lets present the same results this way:  Waite/Goos: x  y ===> Wirth EBNF: x { y x } ===> Gray: x y && 

Re: A minimal LL(1) parser generator ?
correction: ((a b &&))((c d & &&)) for EBNF: a { b a } c { d c } should be: ((a b &&))((c d &&)) for EBNF: a { b a } c { d c } and ((a b && c d & &&)) should be: ((a b && c d &&)) Don't know how those extraneous single "&" got there! Carl 

Re: A minimal LL(1) parser generator ?
On Thursday, January 2, 2020 at 10:21:53 AM UTC8, Anton Ertl wrote: ... > (( a b && c d && )) 1. For concatenation of these, I would write, in Gray: ((a b &&))((c d & &&)) for EBNF: a { b a } c { d c } because wouldn't ((a b && c d & &&)) be the same as? a { b a } c { d a { b a }

Re: A minimal LL(1) parser generator ?
Do you think this is something that's sought after more generally? I've considered it for my parser generators but the problem i run into is a kind of "state explosion" wherein since i can't freely branch, i can't converge paths, so each dysjunction can only create more dysjunctions.

Shift/Accept & Reduce/Accept Conflicts  parsing in midstream
This is an example grammar, where I'll discuss the issue. Base Grammar: L >  L S, S > x  u L v, > S w L Canonical BottomUp/Rightmost Transduction: L > a  L S b, S > x c  u L v d, > S w L z Inputs/Tokens: {u,v,w,x}, Outputs/Actions: {a,b,c,d,z} LR Table: States: 08 Shift:

Re: A minimal LL(1) parser generator ?
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 cookiecutter code generation) is not directly addressed, as far

Re: A minimal LL(1) parser generator ?
A little late to the discussion, but ... On Sat, 21 Dec 2019 19:07:55 0800 (PST), 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. There are a number

Re: A minimal LL(1) parser generator ?
... >> >"a b && c &&" ... >Should that be ? >a {b a} { c a {b a}} Yes. >Also, would > a b && c d && I assume you mean a concatenation of "a b &&" and "c d &&". In Gray syntax that would be (( a b && c d && )) >parse as: > a { b a } c { d c } Yes. >or as: > a { b a } c { d a

Re: A minimal LL(1) parser generator ?
function call like written by hand. I designed Parsley to do exactly that. i don't know how minimal it is at this point, but I've been using the LL1.cs file in it in several of my parser projects to generate parse tables. Maybe it will help. https://www.codeproject.com/Articles/5255160/Parse

Re: A minimal LL(1) parser generator ?
... > >If Gray: "a b &&" > EBNF: "a { b a }" ... > >then ... ... > >"a b && c &&" > > The left operand of the second && would be "a b &&", so the whole > thing would be equivalent to > > a {b a} {c {a {b a}}} ... Should that be ? a {b a} { c a {b a}} Also, would a b && c d &&

Re: A minimal LL(1) parser generator ?
The left operand of the second && would be "a b &&", so the whole thing would be equivalent to a {b a} {c {a {b a}}} a (( b  c )) && would parse the same strings, but with different parse trees; so if you add actions, the results would probably be different. >and so on ... > >Further

I wonder if this has been done? LL(1) compositional recursive descent PH
I recently needed a parser generator for parsing C# and the ANTLR C#6 grammar i found resulted in an 800K+ source file and wouldn't even parse. Coco/R's C# grammar i could find was embedded with so much state it was impossible to follow. So I wrote my own parser generator. I've never been

Re: A minimal LL(1) parser generator ?
https://www.codeproject.com/Articles/5162249/HowtoMakeanLL1ParserLesson1 I wrote a lesson on building one in 3 steps
