Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parser-generator that outputs C# given a BNF grammar? [closed]

Tags:

c#

parsing

bnf

I'm looking for a tool that will be able to build a parser (in C#) if I give it a BNF grammar (eg. http://savage.net.au/SQL/sql-2003-2.bnf)

Does such a generator exist?

like image 861
ilitirit Avatar asked Sep 30 '08 15:09

ilitirit


People also ask

What is the best parser generator?

Java Compiler Compiler (JavaCC) is the most popular parser generator for use with Java applications. A parser generator is a tool that reads a grammar specification and converts it to a Java program that can recognize matches to the grammar.

Which parser is used in C?

The C/C++ parser is used for C and C++ language source files. The C/C++ parser uses syntax highlighting to identify language elements, including the following elements: Identifiers. Operators.

What is the output of a parser?

The output of the parser is the parsed text which can be obtained in one of its three forms such as reduced graph, parse tree...

Is Bison a parser generator?

Bison is a general-purpose parser generator that converts an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR (1) parser tables. As an experimental feature, Bison can also generate IELR (1) or canonical LR(1) parser tables.


1 Answers

Normally BNF grammars are too ambiguous. ANTLR will be probably good for what you are looking for.

like image 114
leppie Avatar answered Oct 01 '22 03:10

leppie