Loading ...
Sorry, an error occurred while loading the content.
 

Re: [antlr-interest] translations wanted?

Expand Messages
  • Terence Parr
    ... Well, I m assuming David Wigg will continue making progress...it s not an easy task. ;) ... Thanks. Hopefully the getting started notes will help and the
    Message 1 of 12 , Sep 7, 2003
      On Sunday, September 7, 2003, at 10:38 AM, Shishir Ramam wrote:

      > Terence,
      >
      > C++!! I know one exists, and I am attempting to work
      > my way through problems with it. But an alternative
      > or even making the existing one work completely out
      > of the box would be great.

      Well, I'm assuming David Wigg will continue making progress...it's not
      an easy task. ;)

      > Btw, from what I have seen of antlr, looks like a
      > great tool. Just need to climb this learning curve!
      > :)

      Thanks. Hopefully the getting started notes will help and the lecture
      audio/notes from my class last semester will help.

      Terence
      --
      Professor Comp. Sci., University of San Francisco
      Creator, ANTLR Parser Generator, http://www.antlr.org
      Co-founder, http://www.jguru.com
      Co-founder, http://www.knowspam.net enjoy email again!
      Co-founder, http://www.peerscope.com pure link sharing
    • John D. Mitchell
      ... [...] ... How about a RelaxNG (compact) compiler which generated ANTLR code to parse, validate, and AST-ize the defined language? Hmm... Is that hard
      Message 2 of 12 , Sep 7, 2003
        >>>>> "Terence" == Terence Parr <parrt@...> writes:
        [...]

        > Howdy folks...looks like I have at least one student interested in
        > building a grammar and/or translator for their masters project class (one
        > semester, 4 credits). So the question is, what grammars do we really
        > need right now? Is there a translator we need? Perhaps a JavaCC-> ANTLR
        > translator <snicker>

        How about a RelaxNG (compact) compiler which generated ANTLR code to parse,
        validate, and AST-ize the defined language? Hmm... Is that hard enough?


        At a slightly more abstract level, I'd like to see support for lexing,
        parsing, and translating fixed-length formats.

        Take care,
        John
      • Terence Parr
        ... Ah...finally somebody recognized that DTDs for XML should look like a real grammar not the filth in DTDs or that stupid use XML to describe the DTD thing
        Message 3 of 12 , Sep 7, 2003
          On Sunday, September 7, 2003, at 10:51 AM, John D. Mitchell wrote:

          >>>>>> "Terence" == Terence Parr <parrt@...> writes:
          > [...]
          >
          >> Howdy folks...looks like I have at least one student interested in
          >> building a grammar and/or translator for their masters project class
          >> (one
          >> semester, 4 credits). So the question is, what grammars do we really
          >> need right now? Is there a translator we need? Perhaps a JavaCC->
          >> ANTLR
          >> translator <snicker>
          >
          > How about a RelaxNG (compact) compiler which generated ANTLR code to
          > parse,
          > validate, and AST-ize the defined language? Hmm... Is that hard
          > enough?

          Ah...finally somebody recognized that DTDs for XML should look like a
          real grammar not the filth in DTDs or that stupid "use XML to describe
          the DTD" thing whatever it's called. Cool.

          That sounds like a groovy idea. Thanks, John.

          > At a slightly more abstract level, I'd like to see support for lexing,
          > parsing, and translating fixed-length formats.

          Useful for sure. Can you give me an example app?

          Ter
          --
          Professor Comp. Sci., University of San Francisco
          Creator, ANTLR Parser Generator, http://www.antlr.org
          Co-founder, http://www.jguru.com
          Co-founder, http://www.knowspam.net enjoy email again!
          Co-founder, http://www.peerscope.com pure link sharing
        • John D. Mitchell
          ... [...] ... Indeed. To be clear, alas, RelaxNG also has a complete XML-based representation too. :-( ... As long as I don t have to wear any fringe! :-)
          Message 4 of 12 , Sep 7, 2003
            >>>>> "Terence" == Terence Parr <parrt@...> writes:
            [...]

            > Ah...finally somebody recognized that DTDs for XML should look like a
            > real grammar not the filth in DTDs or that stupid "use XML to describe
            > the DTD" thing whatever it's called. Cool.

            Indeed.

            To be clear, alas, RelaxNG also has a complete XML-based representation
            too. :-(


            > That sounds like a groovy idea. Thanks, John.

            As long as I don't have to wear any fringe! :-)


            >> At a slightly more abstract level, I'd like to see support for lexing,
            >> parsing, and translating fixed-length formats.

            > Useful for sure. Can you give me an example app?

            For this one, I don't really care much. My focus is more on the issue of
            getting more support for doing that effectively and efficiently into
            ANTLR. :-)

            The old standby of a comprehensive "de-compiler" would be nice. Something
            that would yank content out of various proprietary data files and put them
            into a decent language. :-)

            An code injection tool that works on .class (or .exe, .so, etc.) files.
            I'd like one which pulled the code up into ASTs and allowed us to do
            transformations and then dumped out a new, clean, valid .class file.

            Hope this helps,
            John
          • mzukowski@yci.com
            I ve had a few requests for a C preprocessor to work with the GCC toolkit. I think it would be more fun to do a Python grammar though :) Monty ... From:
            Message 5 of 12 , Sep 8, 2003
              I've had a few requests for a C preprocessor to work with the GCC toolkit.

              I think it would be more fun to do a Python grammar though :)

              Monty

              -----Original Message-----
              From: Terence Parr [mailto:parrt@...]
              Sent: Sunday, September 07, 2003 10:16 AM
              To: antlr-interest@yahoogroups.com
              Subject: [antlr-interest] translations wanted?


              Howdy folks...looks like I have at least one student interested in
              building a grammar and/or translator for their masters project class
              (one semester, 4 credits). So the question is, what grammars do we
              really need right now? Is there a translator we need? Perhaps a
              JavaCC->ANTLR translator <snicker>

              Please suggest your favorite needed grammar / translator between now
              and 1:15 California time tomorrow, which is class time. ;)

              Thanks,
              Ter
              --
              Professor Comp. Sci., University of San Francisco
              Creator, ANTLR Parser Generator, http://www.antlr.org Co-founder,
              http://www.jguru.com Co-founder, http://www.knowspam.net enjoy email again!
              Co-founder, http://www.peerscope.com link sharing, pure-n-simple






              Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
            • paul taney
              ... Monty, Wouldn t this translate rather easily to an antlr grammar? http://www.python.org/dev/doc/devel/ref/grammar.txt __________________________________ Do
              Message 6 of 12 , Sep 8, 2003
                --- mzukowski@... wrote:
                > I've had a few requests for a C preprocessor to work
                > with the GCC toolkit.
                >
                > I think it would be more fun to do a Python grammar
                > though :)
                >

                Monty,

                Wouldn't this translate rather easily to an antlr
                grammar?


                http://www.python.org/dev/doc/devel/ref/grammar.txt



                __________________________________
                Do you Yahoo!?
                Yahoo! SiteBuilder - Free, easy-to-use web site design software
                http://sitebuilder.yahoo.com
              • lgcraymer
                Ter-- Paul s post reminds me--it would be nice to have a generic EBNF- ANTLR translator, including separating lexer rules from parser rules. That s a
                Message 7 of 12 , Sep 8, 2003
                  Ter--

                  Paul's post reminds me--it would be nice to have a generic EBNF->ANTLR
                  translator, including separating lexer rules from parser rules.
                  That's a relatively simple project, but it could be enhanced by
                  automatic generation of synpreds where there is ambiguity. EBNF
                  notations all have the same syntax, just with different keyword
                  symbols (= or := or ::= for the lefthand/righthand separator, for
                  example). If you provide a translator for one EBNF dialect, then it
                  can probably be used for any other one after a few changes to the
                  lexer.

                  Come to think of it, your new analysis code might take the synpred
                  generation down to a small enough problem that this can easily be done
                  as a one-student term project.

                  --Loring

                  --- In antlr-interest@yahoogroups.com, paul taney <paultaney@y...>
                  wrote:
                  >
                  > --- mzukowski@y... wrote:
                  > > I've had a few requests for a C preprocessor to work
                  > > with the GCC toolkit.
                  > >
                  > > I think it would be more fun to do a Python grammar
                  > > though :)
                  > >
                  >
                  > Monty,
                  >
                  > Wouldn't this translate rather easily to an antlr
                  > grammar?
                  >
                  >
                  > http://www.python.org/dev/doc/devel/ref/grammar.txt
                  >
                  >
                  >
                  > __________________________________
                  > Do you Yahoo!?
                  > Yahoo! SiteBuilder - Free, easy-to-use web site design software
                  > http://sitebuilder.yahoo.com
                • mzukowski@yci.com
                  Absolutely! ... From: paul taney [mailto:paultaney@yahoo.com] Sent: Monday, September 08, 2003 10:42 AM To: antlr-interest@yahoogroups.com Subject: RE:
                  Message 8 of 12 , Sep 8, 2003
                    Absolutely!

                    -----Original Message-----
                    From: paul taney [mailto:paultaney@...]
                    Sent: Monday, September 08, 2003 10:42 AM
                    To: antlr-interest@yahoogroups.com
                    Subject: RE: [antlr-interest] translations wanted?



                    --- mzukowski@... wrote:
                    > I've had a few requests for a C preprocessor to work
                    > with the GCC toolkit.
                    >
                    > I think it would be more fun to do a Python grammar
                    > though :)
                    >

                    Monty,

                    Wouldn't this translate rather easily to an antlr
                    grammar?


                    http://www.python.org/dev/doc/devel/ref/grammar.txt



                    __________________________________
                    Do you Yahoo!?
                    Yahoo! SiteBuilder - Free, easy-to-use web site design software
                    http://sitebuilder.yahoo.com



                    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                  • Pete Forman
                    ... So that we could write an emitter that puts in braces? ;-) -- Pete Forman -./ .- Disclaimer: This post is originated WesternGeco
                    Message 9 of 12 , Sep 9, 2003
                      At 2003-09-08 08:31 -0700, mzukowski@... wrote:
                      >I think it would be more fun to do a Python grammar though :)

                      So that we could write an emitter that puts in braces? ;-)

                      --
                      Pete Forman -./\.- Disclaimer: This post is originated
                      WesternGeco -./\.- by myself and does not represent
                      pete.forman@... -./\.- opinion of Schlumberger, Baker
                      http://petef.port5.com -./\.- Hughes or their divisions.
                    • paul taney
                      ... Now Pete, You know that s nothing that ten or eleven chars of perl can t fix. You just need a preprocessor, here it is: perl -pe y/{}/: / as in: $ cat
                      Message 10 of 12 , Sep 9, 2003
                        --- Pete Forman <pete.forman@...> wrote:
                        > At 2003-09-08 08:31 -0700, mzukowski@... wrote:
                        > >I think it would be more fun to do a Python grammar
                        > though :)
                        >
                        > So that we could write an emitter that puts in
                        > braces? ;-)

                        Now Pete,

                        You know that's nothing that ten or eleven chars
                        of perl can't fix. You just need a preprocessor,
                        here it is:

                        perl -pe 'y/{}/: /'

                        as in:

                        $ cat >tmp
                        i = 2
                        while i {
                        print "Redundancy is good."
                        i -= 1
                        }

                        $ perl -pe 'y/{}/: /' tmp | python
                        Redundancy is good.
                        Redundancy is good.

                        To brace or indent, that is the question.
                        No. You can have both.

                        paul



                        __________________________________
                        Do you Yahoo!?
                        Yahoo! SiteBuilder - Free, easy-to-use web site design software
                        http://sitebuilder.yahoo.com
                      Your message has been successfully submitted and would be delivered to recipients shortly.