473,371 Members | 1,461 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,371 software developers and data experts.

Parser Generator for C#?

Hello:

I have been looking for a tool similar to Lex and Yacc for C#. I would
like to be able to generate grammars so I can write a simple
interpreter for another piece of code. However, I have to make many
future grammars and was hoping to find a tool that would allow me to
generate as many as I would like.

I was hoping someone had made a port for C#. I haven't had any luck
looking for one, so any direction would be appreciated.

Thanks a lot,
Travis
Jun 27 '08 #1
7 2155
On Sat, 24 May 2008 14:10:18 -0700, je**********@gmail.com wrote:
Hello:

I have been looking for a tool similar to Lex and Yacc for C#. I would
like to be able to generate grammars so I can write a simple interpreter
for another piece of code. However, I have to make many future grammars
and was hoping to find a tool that would allow me to generate as many as
I would like.

I was hoping someone had made a port for C#. I haven't had any luck
looking for one, so any direction would be appreciated.

Thanks a lot,
Travis
Mono

http://www.mono-project.com/Main_Page

Hope this helps

j1mb0jay
Jun 27 '08 #2
je**********@gmail.com wrote:
I have been looking for a tool similar to Lex and Yacc for C#. I would
like to be able to generate grammars so I can write a simple
interpreter for another piece of code. However, I have to make many
future grammars and was hoping to find a tool that would allow me to
generate as many as I would like.

I was hoping someone had made a port for C#. I haven't had any luck
looking for one, so any direction would be appreciated.
There are plenty.

Google places the following high for me:

http://www.ssw.uni-linz.ac.at/coco/#CS

http://www.antlr.org/wiki/display/AN...+CSharp+Target

http://grammatica.percederberg.net/

Arne
Jun 27 '08 #3
In addition to the others mentioned, you could look at
http://www.frontiernet.net/~fredm/pa...istWebPage.htm

It does not generate C# programs, but is a dll called by your C# program
from which you can interact with the parse trees (generated by the parser
from a grammar file and the input text). The system is written in C# and is
open source so you can modify it as you see fit.

<je**********@gmail.comwrote in message
news:6d**********************************@r66g2000 hsg.googlegroups.com...
Hello:

I have been looking for a tool similar to Lex and Yacc for C#. I would
like to be able to generate grammars so I can write a simple
interpreter for another piece of code. However, I have to make many
future grammars and was hoping to find a tool that would allow me to
generate as many as I would like.

I was hoping someone had made a port for C#. I haven't had any luck
looking for one, so any direction would be appreciated.

Thanks a lot,
Travis

Jun 27 '08 #4
On May 24, 3:10*pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
Hello:

I have been looking for a tool similar to Lex and Yacc for C#. I would
like to be able to generate grammars so I can write a simple
interpreter for another piece of code. However, I have to make many
future grammars and was hoping to find a tool that would allow me to
generate as many as I would like.

I was hoping someone had made a port for C#. I haven't had any luck
looking for one, so any direction would be appreciated.

Thanks a lot,
Travis
Just to clarify, I don't want to be able to parse C# files, I want to
generate parsers using C#.

Thanks for everyone's input.
Jun 27 '08 #5
On May 24, 3:37*pm, "Fred Mellender" <nospamPlease_fred...@gmail.com>
wrote:
In addition to the others mentioned, you could look athttp://www.frontiernet.net/~fredm/parser/LinguistWebPage.htm

It does not generate C# programs, but is a dll called by your C# program
from which you can interact with the parse trees (generated by the parser
from a grammar file and the input text). *The system is written in C# and is
open source so you can modify it as you see fit.

<jehugalea...@gmail.comwrote in message

news:6d**********************************@r66g2000 hsg.googlegroups.com...
Hello:
I have been looking for a tool similar to Lex and Yacc for C#. I would
like to be able to generate grammars so I can write a simple
interpreter for another piece of code. However, I have to make many
future grammars and was hoping to find a tool that would allow me to
generate as many as I would like.
I was hoping someone had made a port for C#. I haven't had any luck
looking for one, so any direction would be appreciated.
Thanks a lot,
Travis- Hide quoted text -

- Show quoted text -
This is what I'm looking for. Thanks!
Jun 27 '08 #6
je**********@gmail.com wrote:
On May 24, 3:10 pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
>Hello:

I have been looking for a tool similar to Lex and Yacc for C#. I would
like to be able to generate grammars so I can write a simple
interpreter for another piece of code. However, I have to make many
future grammars and was hoping to find a tool that would allow me to
generate as many as I would like.

I was hoping someone had made a port for C#. I haven't had any luck
looking for one, so any direction would be appreciated.

Thanks a lot,
Travis

Just to clarify, I don't want to be able to parse C# files, I want to
generate parsers using C#.
You can use ANTLR, which is a mature parser generator framework, but a
bit weird perhaps.
You can also use Goldparser. Both are free.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Jun 27 '08 #7
Frans Bouma [C# MVP] wrote:
You can use ANTLR, which is a mature parser generator framework, but
a bit weird perhaps.
Has anyone examples on using StringTemplates to generate ILASM
code or to use Reflection.Emit with Antlr?

--
Arto Viitanen
Jun 27 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Jean de Largentaye | last post by:
Hi, I need to parse a subset of C (a header file), and generate some unit tests for the functions listed in it. I thus need to parse the code, then rewrite function calls with wrong parameters....
2
by: alederer | last post by:
Hallo! Does anybody know a parser generator that supports unicode (UTF-16), and is based on something like ICU. The parser is used in a platform independent and cross-platform communicating...
12
by: pmatos | last post by:
Hi all, I need to create a parser in C++ which should parse a somewhat complex file structure. Yeah, it would be possible to write it from scratch in C++ however I think it would be easier and...
3
by: Jang | last post by:
Could anyone point or send me a syntax of C which fits to Parser Generator (YAAC) ? I've got a big problem because I have to write a translator C ->assembler :[ There is a lot of work to...
2
by: karthik bala guru | last post by:
Hi, I would like to have a XHTML Generator and Parser in C language from the open source community. Someone Here, kindly give me a link or the name of the tool available in the opensource world....
7
by: (Jamie Andrews) | last post by:
For a research project, we're looking for a reliable parser for C that will take an ANSI C program and yield a tree representation of the program (as a Java or C++ object). Of course a grammar...
6
by: Mike C# | last post by:
Hi all, Can anyone recommend a good and *easy to use* lexer and parser generator? Preferably one that was written specifically for VC++ and not mangled through 20 different platforms. I've had...
9
by: Peter Michaux | last post by:
Hi, Does a parser generator exist that generates JavaScript code? Most parser generators generate C or Java code. Thanks, Peter
28
by: Marc Gravell | last post by:
In Linq, you can apparently get a meaningful body from and expression's .ToString(); random question - does anybody know if linq also includes a parser? It just seemed it might be a handy way to...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.