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

From honey crisis <gaztoast@gmail.com>
Newsgroups comp.compilers
Subject I wonder if this has been done? LL(1) compositional recursive descent PH
Date 2019-12-31 07:16 -0800
Organization Compilers Central
Message-ID <19-12-038@comp.compilers> (permalink)

Show all headers | 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