J
jehugaleahsa
Hello:
Before I venture down the dark alley of open source lexers and parsers
written in C#, I was wondering if .NET already had such a thing. I
think anyone with a basic understand of Regex and a little free time
could write an inefficient lexical analyzer.
I was surprised 3 months ago, after writing a C# writer, when I
learned about the System.CodeDom classes, which were not only way more
complete and flexible, but could build the code in C# or VB and could
build the code as a string or an assembly. It put me back in my
developer diapers. I'm still kicking myself for wasting all that time.
I want to make sure that .NET, in MS's infinite wisdom, didn't also
make a lexer/parser/compiler namespace. Lex and Yacc are great if your
creating a C/C++ program or are willing to call a native method. There
really needs to be equivilent tools for generating .NET code (C# or IL
preferrably) from a Backus Naur form. Especially when you plan on
doing the parsing at runtime within an application.
It has come to my attention lately that I need to create a simple
parser for one of my open source projects, for the sanity and
convenience of my users. I have been reading my Dragon book, but it
takes a lot of time to write your own compiler. I don't think I want
to completely reinvent the wheel here if there is already a superior
product out there that can generate the .NET code for me.
I'd be happy if someone could point me to a free, decent lexer/parser
that can generate an efficient RL parser written in C#. I've played
around with quite a few that can be found on CodePlex, but I have been
less than impressed. Application-specific languages are pretty common
these days, so I expect some of you have worked with them.
Thanks for any pointers,
Travis
Before I venture down the dark alley of open source lexers and parsers
written in C#, I was wondering if .NET already had such a thing. I
think anyone with a basic understand of Regex and a little free time
could write an inefficient lexical analyzer.
I was surprised 3 months ago, after writing a C# writer, when I
learned about the System.CodeDom classes, which were not only way more
complete and flexible, but could build the code in C# or VB and could
build the code as a string or an assembly. It put me back in my
developer diapers. I'm still kicking myself for wasting all that time.
I want to make sure that .NET, in MS's infinite wisdom, didn't also
make a lexer/parser/compiler namespace. Lex and Yacc are great if your
creating a C/C++ program or are willing to call a native method. There
really needs to be equivilent tools for generating .NET code (C# or IL
preferrably) from a Backus Naur form. Especially when you plan on
doing the parsing at runtime within an application.
It has come to my attention lately that I need to create a simple
parser for one of my open source projects, for the sanity and
convenience of my users. I have been reading my Dragon book, but it
takes a lot of time to write your own compiler. I don't think I want
to completely reinvent the wheel here if there is already a superior
product out there that can generate the .NET code for me.
I'd be happy if someone could point me to a free, decent lexer/parser
that can generate an efficient RL parser written in C#. I've played
around with quite a few that can be found on CodePlex, but I have been
less than impressed. Application-specific languages are pretty common
these days, so I expect some of you have worked with them.
Thanks for any pointers,
Travis