Good parser generator (think lex/yacc or antlr) for .NET? Build time only?

Eric Schoonover picture Eric Schoonover · Aug 10, 2009 · Viewed 11.9k times · Source

Is there a good parser generator (think lex/yacc or antlr) for .NET? Any that have a license that would not scare lawyers? Lot’s of LGPL but I am working on embedded components and some organizations are not comfortable with me taking an LGPL dependency.

I've heard that Oslo may provide this functionality but I'm not sure if it's a build time dependency or also a runtime dependency. Can anyone clarify what Oslo will provide?

UPDATE
What I would really like is a parser generator that is a build time only dependency. It looks like ANTLR has a runtime component.

Answer

Eric Schoonover picture Eric Schoonover · Aug 20, 2009

I just discovered that F# ships with an implementation of yacc and lex. It looks like I will be able to leverage this parser generator for my .NET needs.

F# Samples

The Parsing sample shows how to use the fsyacc and fslex tools to build parsers and lexers for use with F#. (Mode: Compiled, Runs on: any CLI, including Mono)

Related blog posts: