Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

I wonder if this has been done? LL(1) compositional recursive descent PH

25 views
Skip to first unread message

honey crisis

unread,
Dec 31, 2019, 11:28:42 AM12/31/19
to
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 able to compute first/follows for k>1

So I wrote a recursive descent LL(1) parser generator that uses composition to compose its parsing from a number of subparsers. Each shares the same lexer and symbol table as the master parser, but gets delegated to, working around the limitations of LL(1)

It also lets you take over the parse with hand written code in the grammars, and allows for syntactic predicates like Coco/R does.

It targets C# for major grammars, or VB and other .NET languages too for smaller grammars at least.

Anyone seen a beast like this?

I'm just curious how fresh this idea is.
0 new messages