compilers

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • madhura

    #1

    compilers

    Hello,
    I have a basic question about compilers. What are the different types
    of compilers, are they written by different companies, why there are
    different names of compilers, what is the purpose, I want to know about
    them. Are interpreters of C available, and if yes, how can I get them.
    Madhura

  • Walter Roberson

    #2
    Re: compilers

    In article <1139941387.469 940.299120@g43g 2000cwa.googleg roups.com>,
    madhura <madhurvibhas@y ahoo.com> wrote:[color=blue]
    >I have a basic question about compilers. What are the different types
    >of compilers,[/color]

    K&R compliant, C89 compliant, C94 compliant, C99 compliant,
    and Broken.
    [color=blue]
    >are they written by different companies,[/color]

    A number of different companies write C compilers, and the same company
    may have several different C compilers out (which may fall into one
    or more of the above categories.) There are also a lot of compilers
    written by entities other than companies, some more organized than
    others.
    [color=blue]
    >why there are different names of compilers,[/color]

    Why are there different names of anything?? Why is your mother's
    name not the same as your father's name or your name, and why
    do your neighbours have different names than those?
    [color=blue]
    >what is the purpose, I want to know about
    >them. Are interpreters of C available, and if yes, how can I get them.[/color]

    There is at least 1 C interpreter available, and I would imagine
    that you could find out more about it in the C FAQ which is regularily
    posted and cited in this newsgroup .
    --
    Okay, buzzwords only. Two syllables, tops. -- Laurie Anderson

    Comment

    • Ian Collins

      #3
      Re: compilers

      madhura wrote:[color=blue]
      > Hello,
      > I have a basic question about compilers. What are the different types
      > of compilers, are they written by different companies, why there are
      > different names of compilers, what is the purpose, I want to know about
      > them. Are interpreters of C available, and if yes, how can I get them.
      > Madhura
      >[/color]
      Different compilers are written for different platforms and deployment
      targets.

      If you have specific questions about your environment, post it on a
      group dedicated to that environment.

      Why would you want an interpretor for a compiled language?

      --
      Ian Collins.

      Comment

      • Malcolm

        #4
        Re: compilers


        "Ian Collins" <ian-news@hotmail.co m> wrote[color=blue]
        >
        > Why would you want an interpretor for a compiled language?
        >[/color]
        Because an interpreter can be easier to write than a compiler, it may also
        be easier to detect certain problems with programs, like memory leaks.
        It also enables you to run the program on any platform with a compiler for
        the interpreter. With C this isn't much of a practical advantage, but if you
        have your own pet language you want to become the next hot technology, it
        might help to have an interpreter written in an inferior but more common
        language.


        Comment

        • tmp123

          #5
          Re: compilers

          Ian Collins wrote:[color=blue]
          > madhura wrote:[color=green]
          > > them. Are interpreters of C available, and if yes, how can I get them.
          > > Madhura[/color]
          >
          > Why would you want an interpretor for a compiled language?[/color]

          (Sorry if this question has an obvious answer); There are anything in
          the C standard that mades mandatory that C was a compiled language?

          Comment

          • Jordan Abel

            #6
            Re: compilers

            On 2006-02-14, tmp123 <tmp123@menta.n et> wrote:[color=blue]
            > Ian Collins wrote:[color=green]
            >> madhura wrote:[color=darkred]
            >> > them. Are interpreters of C available, and if yes, how can I get them.
            >> > Madhura[/color]
            >>
            >> Why would you want an interpretor for a compiled language?[/color]
            >
            > (Sorry if this question has an obvious answer); There are anything in
            > the C standard that mades mandatory that C was a compiled language?[/color]

            There's something about the paradigm of "translatio n" that tends to make
            it a better fit, but nothing absolute

            Comment

            • Eric Sosman

              #7
              Re: compilers



              tmp123 wrote On 02/14/06 17:28,:[color=blue]
              > Ian Collins wrote:
              >[color=green]
              >>madhura wrote:
              >>[color=darkred]
              >>>them. Are interpreters of C available, and if yes, how can I get them.
              >>>Madhura[/color]
              >>
              >>Why would you want an interpretor for a compiled language?[/color]
              >
              >
              > (Sorry if this question has an obvious answer); There are anything in
              > the C standard that mades mandatory that C was a compiled language?[/color]

              The Standard requires (5.1.1.1) that it be possible
              to "translate" isolated segments of C source at different
              times, to retain the results of "translatio n" in files
              and libraries, and to "link" those results into executable
              (or perhaps executING) programs still later. I think we
              can take "translate" to be a synonym for "compile," so in
              that sense C is indeed a "compiled language."

              However, that doesn't mean C can't also be interpreted!
              The Standard does not describe the nature of the output of
              translation, nor the mechanism that causes the program to
              "do stuff" at run-time. A compiler that emits code for an
              interpreter to execute isn't ruled out. In fact, it's done
              all the time, from one viewpoint anyhow: If a program is
              running on a microcoded machine, is it running "natively"
              or is it being "interprete d" by the microcode?

              --
              Eric.Sosman@sun .com

              Comment

              • Keith Thompson

                #8
                Re: compilers

                Eric Sosman <Eric.Sosman@su n.com> writes:
                [snip][color=blue]
                > However, that doesn't mean C can't also be interpreted!
                > The Standard does not describe the nature of the output of
                > translation, nor the mechanism that causes the program to
                > "do stuff" at run-time. A compiler that emits code for an
                > interpreter to execute isn't ruled out. In fact, it's done
                > all the time, from one viewpoint anyhow: If a program is
                > running on a microcoded machine, is it running "natively"
                > or is it being "interprete d" by the microcode?[/color]

                Sure, but a compiler that generates some form of code that's then
                interpreted is a compiler -- and the interpreter itself isn't a C
                interpreter, it's an interpreter for the generated code (P-code,
                J-code, whatever).

                It would be theoretically possible to create a true C interpreter, one
                that would interpret C source code without translating it to some
                lower-level form. It would be easier to translate the C code on the
                fly to some internal form that's then interpreted (similar to the way
                Perl works).

                --
                Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
                San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
                We must do something. This is something. Therefore, we must do this.

                Comment

                • osmium

                  #9
                  Re: compilers

                  "Ian Collins" wrote:
                  [color=blue]
                  > Why would you want an interpretor for a compiled language?[/color]

                  Some people consider that a painless way to learn the syntax of a new
                  language. The instant and effortless feedback has a lot of appeal. Once
                  you learn it, you switch to using a compiler.


                  Comment

                  • Neil

                    #10
                    Re: compilers

                    madhura wrote:[color=blue]
                    > Hello,
                    > I have a basic question about compilers. What are the different types
                    > of compilers, are they written by different companies, why there are
                    > different names of compilers, what is the purpose, I want to know about
                    > them. Are interpreters of C available, and if yes, how can I get them.
                    > Madhura
                    >[/color]
                    The Herb Shlit C reference has the source code for a C Interpreter in
                    the back.

                    Comment

                    • Keith Thompson

                      #11
                      Re: compilers

                      Neil <NeilKurzm@worl dnet.att.net> writes:[color=blue]
                      > madhura wrote:[color=green]
                      >> Hello,
                      >> I have a basic question about compilers. What are the different types
                      >> of compilers, are they written by different companies, why there are
                      >> different names of compilers, what is the purpose, I want to know about
                      >> them. Are interpreters of C available, and if yes, how can I get them.
                      >> Madhura
                      >>[/color]
                      > The Herb Shlit C reference has the source code for a C Interpreter
                      > in the back.[/color]

                      That's Herb Schildt, author of some *very bad* books about C.

                      --
                      Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
                      San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
                      We must do something. This is something. Therefore, we must do this.

                      Comment

                      • Martin Ambuhl

                        #12
                        Re: compilers

                        Keith Thompson wrote:[color=blue]
                        > Neil <NeilKurzm@worl dnet.att.net> writes:[/color]
                        [color=blue][color=green]
                        >> The Herb Shlit C reference has the source code for a C Interpreter
                        >>in the back.[/color]
                        >
                        >
                        > That's Herb Schildt, author of some *very bad* books about C.[/color]

                        Both are misspellings of "Herb BullSchildt."


                        Comment

                        • Neil

                          #13
                          Re: compilers

                          Martin Ambuhl wrote:[color=blue]
                          > Keith Thompson wrote:[color=green]
                          >> Neil <NeilKurzm@worl dnet.att.net> writes:[/color]
                          >[color=green][color=darkred]
                          >>> The Herb Shlit C reference has the source code for a C Interpreter
                          >>> in the back.[/color]
                          >>
                          >>
                          >> That's Herb Schildt, author of some *very bad* books about C.[/color]
                          >
                          > Both are misspellings of "Herb BullSchildt."
                          >
                          >[/color]

                          Before the Internet It was all I had, and all I could find.
                          I helped at the time. Did do a lot of DOS, so I would not have noticed
                          the ANSI violations.

                          Comment

                          Working...