Parser Generator for C#?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jehugaleahsa@gmail.com

    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
  • j1mb0jay

    #2
    Re: Parser Generator for C#?

    On Sat, 24 May 2008 14:10:18 -0700, jehugaleahsa@gm ail.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



    Hope this helps

    j1mb0jay

    Comment

    • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

      #3
      Re: Parser Generator for C#?

      jehugaleahsa@gm ail.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:







      Arne

      Comment

      • Fred Mellender

        #4
        Re: Parser Generator for C#?

        In addition to the others mentioned, you could look at


        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.

        <jehugaleahsa@g mail.comwrote in message
        news:6dc2ead3-d786-4647-b897-10307f69b97d@r6 6g2000hsg.googl egroups.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

        Comment

        • jehugaleahsa@gmail.com

          #5
          Re: Parser Generator for C#?

          On May 24, 3:10 pm, "jehugalea...@g mail.com" <jehugalea...@g mail.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.

          Comment

          • jehugaleahsa@gmail.com

            #6
            Re: Parser Generator for C#?

            On May 24, 3:37 pm, "Fred Mellender" <nospamPlease_f red...@gmail.co m>
            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...@g mail.comwrote in message
            >
            news:6dc2ead3-d786-4647-b897-10307f69b97d@r6 6g2000hsg.googl egroups.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!

            Comment

            • Frans Bouma [C# MVP]

              #7
              Re: Parser Generator for C#?

              jehugaleahsa@gm ail.com wrote:
              On May 24, 3:10 pm, "jehugalea...@g mail.com" <jehugalea...@g mail.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#)
              ------------------------------------------------------------------------

              Comment

              • Arto Viitanen

                #8
                Re: Parser Generator for C#?

                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

                Comment

                Working...