Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #2419

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

Path csiph.com!tncsrv06.tnetconsulting.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From honey crisis <gaztoast@gmail.com>
Newsgroups comp.compilers
Subject I wonder if this has been done? LL(1) compositional recursive descent PH
Date Tue, 31 Dec 2019 07:16:07 -0800 (PST)
Organization Compilers Central
Lines 17
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <19-12-038@comp.compilers> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Injection-Info gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="4703"; mail-complaints-to="abuse@iecc.com"
Keywords LL(1), parse
Posted-Date 31 Dec 2019 11:28:41 EST
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:2419

Show key headers only | View raw


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.

Back to comp.compilers | Previous | Next | Find similar


Thread

I wonder if this has been done? LL(1) compositional recursive descent PH honey crisis <gaztoast@gmail.com> - 2019-12-31 07:16 -0800

csiph-web