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

new guy

Expand Messages
  • george_artin@yahoo.com
    folks, I m a new member in this mailing list and it is my first time to use the ANTLR, I want to ask u how to start? I want to translate from Java to my
    Message 1 of 8 , Nov 13, 2001
    • 0 Attachment
      folks,
      I'm a new member in this mailing list and it is my first time to use
      the ANTLR, I want to ask u how to start? I want to translate from
      Java to my dedicated assembly code, where can I found a document on
      how to use the ANTLR.

      Regards,
      G. Artin
    • Remus Pereni
      ... All you would ever need can be found at: http://www.antlr.org/doc/index.html http://www.antlr.org/articles.html http://www.jguru.com (do a search on antlr)
      Message 2 of 8 , Nov 13, 2001
      • 0 Attachment
        On Tue, Nov 13, 2001 at 08:03:55PM -0000, george_artin@... wrote:
        >folks,
        >I'm a new member in this mailing list and it is my first time to use
        >the ANTLR, I want to ask u how to start? I want to translate from
        >Java to my dedicated assembly code, where can I found a document on
        >how to use the ANTLR.

        All you would ever need can be found at:

        http://www.antlr.org/doc/index.html
        http://www.antlr.org/articles.html
        http://www.jguru.com (do a search on antlr)
        this mailing list

        >Regards,
        > G. Artin

        Regards,
        Remus
      • george artin
        Thanks a lot Remus it helps. I found a page named getting started with ANTLR it asks you to run the instruction java antlr.Tool t.g , where t.g is the
        Message 3 of 8 , Nov 14, 2001
        • 0 Attachment
          Thanks a lot Remus it helps.
          I found a page named "getting started with ANTLR" it
          asks you to run the instruction "java antlr.Tool t.g",
          where "t.g" is the grammar file and when I run the
          instruction it gives me this error message:
          "Exception in thread "main"
          java.lang.NoClassDefFoundError: antlr/Tool"
          I don't know why this message appear? the class path
          for java is tuned correctly and I can run any java
          file.

          Regards,
          G. Artin
          --- Remus Pereni <remus@...> wrote:
          > On Tue, Nov 13, 2001 at 08:03:55PM -0000,
          > george_artin@... wrote:
          > >folks,
          > >I'm a new member in this mailing list and it is my
          > first time to use
          > >the ANTLR, I want to ask u how to start? I want to
          > translate from
          > >Java to my dedicated assembly code, where can I
          > found a document on
          > >how to use the ANTLR.
          >
          > All you would ever need can be found at:
          >
          > http://www.antlr.org/doc/index.html
          > http://www.antlr.org/articles.html
          > http://www.jguru.com (do a search on antlr)
          > this mailing list
          >
          > >Regards,
          > > G. Artin
          >
          > Regards,
          > Remus


          __________________________________________________
          Do You Yahoo!?
          Find the one for you at Yahoo! Personals
          http://personals.yahoo.com
        • Ric Klaren
          Hi, ... Is antlr s installdir included in the class path? e.g. the antlr-2.7.1 directory. Cheers, Ric -- ... Wit is cultured insolence. - Aristotle
          Message 4 of 8 , Nov 14, 2001
          • 0 Attachment
            Hi,

            On Wed, Nov 14, 2001 at 09:40:52AM -0800, george artin wrote:
            > "Exception in thread "main"
            > java.lang.NoClassDefFoundError: antlr/Tool"
            > I don't know why this message appear? the class path
            > for java is tuned correctly and I can run any java
            > file.

            Is antlr's installdir included in the class path? e.g. the antlr-2.7.1
            directory.

            Cheers,

            Ric
            --
            -----+++++*****************************************************+++++++++-------
            ---- Ric Klaren ----- klaren@... ----- +31 53 4893722 ----
            -----+++++*****************************************************+++++++++-------
            Wit is cultured insolence. - Aristotle
          • Sinan
            ... What version java are you using? What OS? Assuming Unix/Linux # java -classpath $WHERE_BE_ANTLR/antlr.jar antlr.Tool t.g should work. Also if you have
            Message 5 of 8 , Nov 14, 2001
            • 0 Attachment
              george artin wrote:
              >
              > Thanks a lot Remus it helps.
              > I found a page named "getting started with ANTLR" it
              > asks you to run the instruction "java antlr.Tool t.g",
              > where "t.g" is the grammar file and when I run the
              > instruction it gives me this error message:
              > "Exception in thread "main"
              > java.lang.NoClassDefFoundError: antlr/Tool"
              > I don't know why this message appear? the class path
              > for java is tuned correctly and I can run any java
              > file.
              >

              What version java are you using? What OS?

              Assuming Unix/Linux

              # java -classpath $WHERE_BE_ANTLR/antlr.jar antlr.Tool t.g

              should work.

              Also if you have compatilility problems, do

              # cd $WHERE_BE_ANTLR
              # find antlr -name "*.class" -exec rm {} \;
              # javac -g `find antlr -name "*.java" -print`
              # jar cvf myAntlr.jar antlr

              and then

              # java -classpath $WHERE_BE_ANTLR/myAntlr.jar antlr.Tool t.g

              One caveat:

              If you use Ric Klaren's version and get an error , then delete the file

              Cpp2CodeGenerator.java

              Sinan
            • Andre Moll
              Hi, I am trying to build the cpp libs under Tru64 unix. I fail to build using cxx as well using gcc. Has anybody successfuly build the antlr libraries with
              Message 6 of 8 , Nov 22, 2001
              • 0 Attachment
                Hi,

                I am trying to build the cpp libs under Tru64 unix. I fail to build using
                cxx as well using gcc. Has anybody successfuly build the antlr libraries
                with Compaq Tru64 UNIX V5.1 (Rev. 732) and could give me a hind what is
                going wrong?

                For cxx I tried already the compilerflags -std gnu; -std ansi; -std
                strict_ansi without any success.

                Thx in advance, Andre

                Using cxx:
                ========

                ----
                ./configure
                ----# ./configure
                creating cache ./config.cache
                checking for a BSD compatible install... scripts/install-sh -c
                checking whether build environment is sane... yes
                checking whether make sets ${MAKE}... yes
                checking for working aclocal... missing
                checking for working autoconf... missing
                checking for working automake... missing
                checking for working autoheader... missing
                checking for working makeinfo... missing
                checking host system type... alphaev6-dec-osf5.1
                checking build system type... alphaev6-dec-osf5.1
                checking for ranlib... ranlib
                checking for gcc... no
                checking for cc... cc
                checking whether the C compiler (cc ) works... yes
                checking whether the C compiler (cc ) is a cross-compiler... no
                checking whether we are using GNU C... no
                checking whether cc accepts -g... yes
                checking for non-GNU ld... /usr/bin/ld
                checking if the linker (/usr/bin/ld) is GNU ld... no
                checking for BSD-compatible nm... /usr/bin/nm
                checking whether ln -s works... yes
                updating cache ./config.cache
                loading cache ./config.cache within ltconfig
                checking whether we are using GNU C... no
                checking for object suffix... o
                checking for executable suffix... no
                checking for cc option to produce PIC... none
                checking if cc supports -c -o file.o... yes
                checking if cc supports -c -o file.lo... yes
                checking if cc static flag -non_shared works... -non_shared
                checking if the linker (/usr/bin/ld) is GNU ld... no
                checking whether the linker (/usr/bin/ld) supports shared libraries... yes
                checking command to parse /usr/bin/nm output... failed
                checking how to hardcode library paths into programs... immediate
                checking for /usr/bin/ld option to reload object files... -r
                checking dynamic linker characteristics... osf5.1 ld.so
                checking if libtool supports shared libraries... yes
                checking whether to build shared libraries... no
                checking whether to build static libraries... yes
                checking for objdir... .libs
                creating libtool
                updating cache ./config.cache
                loading cache ./config.cache
                checking for c++... no
                checking for g++... no
                checking for gcc... no
                checking for CC... no
                checking for cxx... cxx
                checking whether the C++ compiler (cxx ) works... yes
                checking whether the C++ compiler (cxx ) is a cross-compiler... no
                checking whether we are using GNU C++... no
                checking whether cxx accepts -g... yes
                checking how to run the C++ preprocessor... cxx -E
                checking for ranlib... (cached) ranlib
                updating cache ./config.cache
                creating ./config.status
                creating Makefile
                creating src/Makefile
                creating antlr/Makefile

                ---
                gnu make (cxx)
                ---# gmake
                Making all in src
                gmake[1]: Entering directory `/usr/local/src/antlr-2.7.1/lib/cpp/src'
                /bin/sh ../libtool --mode=compile
                cxx -DPACKAGE=\"libantlr\" -DVERSION=\"2.7.1\" -I. -I. -I.. -g -c
                CharBuffer.cpp
                cxx -DPACKAGE=\"libantlr\" -DVERSION=\"2.7.1\" -I. -I. -I.. -g -Wp,-MD,.deps
                /CharBuffer.pp -c CharBuffer.cpp -o CharBuffer.o
                cxx: Error: ../antlr/CharBuffer.hpp, line 58: namespace "std" has no member
                "istream"
                ANTLR_USE_NAMESPACE(std)istream& input;
                --------------------------------^
                cxx: Error: ../antlr/CharBuffer.hpp, line 62: qualified name is not allowed
                CharBuffer(ANTLR_USE_NAMESPACE(std)istream& input_);
                -------------------^
                cxx: Error: ../antlr/CharBuffer.hpp, line 62: expected a ")"
                CharBuffer(ANTLR_USE_NAMESPACE(std)istream& input_);
                --------------------------------------------------^
                cxx: Warning: ../antlr/CharBuffer.hpp, line 55: class "antlr::CharBuffer"
                defines no constructor to initialize the following:
                reference member "antlr::CharBuffer::input"
                class CharBuffer : public InputBuffer {
                ------^
                cxx: Error: CharBuffer.cpp, line 51: namespace "std" has no member "istream"
                CharBuffer::CharBuffer(ANTLR_USE_NAMESPACE(std)istream& input_)
                -----------------------------------------------^
                cxx: Error: CharBuffer.cpp, line 51: no instance of overloaded function
                "antlr::CharBuffer::CharBuffer" matches the specified type
                CharBuffer::CharBuffer(ANTLR_USE_NAMESPACE(std)istream& input_)
                ------------^
                cxx: Error: CharBuffer.cpp, line 52: expected a "{"
                : input(input_)
                ^
                cxx: Warning: CharBuffer.cpp, line 53: missing return statement at end of
                non-void function "antlr::CharBuffer::CharBuffer"
                {}
                -^
                cxx: Info: 6 errors detected in the compilation of "CharBuffer.cpp".
                gmake[1]: *** [CharBuffer.lo] Error 1
                gmake[1]: Leaving directory `/usr/local/src/antlr-2.7.1/lib/cpp/src'
                gmake: *** [all-recursive] Error 1

                using g++
                =======

                --------
                ./configure
                -------#
                ./configure
                creating cache ./config.cache
                checking for a BSD compatible install... scripts/install-sh -c
                checking whether build environment is sane... yes
                checking whether make sets ${MAKE}... yes
                checking for working aclocal... missing
                checking for working autoconf... missing
                checking for working automake... missing
                checking for working autoheader... missing
                checking for working makeinfo... missing
                checking host system type... alphaev6-dec-osf5.1
                checking build system type... alphaev6-dec-osf5.1
                checking for ranlib... ranlib
                checking for gcc... gcc
                checking whether the C compiler (gcc ) works... yes
                checking whether the C compiler (gcc ) is a cross-compiler... no
                checking whether we are using GNU C... yes
                checking whether gcc accepts -g... yes
                checking for ld used by GCC... /usr/bin/ld
                checking if the linker (/usr/bin/ld) is GNU ld... no
                checking for BSD-compatible nm... /usr/bin/nm
                checking whether ln -s works... yes
                updating cache ./config.cache
                loading cache ./config.cache within ltconfig
                checking for object suffix... o
                checking for executable suffix... no
                checking for gcc option to produce PIC... none
                checking if gcc supports -c -o file.o... yes
                checking if gcc supports -c -o file.lo... yes
                checking if gcc supports -fno-rtti -fno-exceptions ... yes
                checking if gcc static flag -static works... -static
                checking if the linker (/usr/bin/ld) is GNU ld... no
                checking whether the linker (/usr/bin/ld) supports shared libraries... yes
                checking command to parse /usr/bin/nm output... failed
                checking how to hardcode library paths into programs... immediate
                checking for /usr/bin/ld option to reload object files... -r
                checking dynamic linker characteristics... osf5.1 ld.so
                checking if libtool supports shared libraries... yes
                checking whether to build shared libraries... no
                checking whether to build static libraries... yes
                checking for objdir... .libs
                creating libtool
                updating cache ./config.cache
                loading cache ./config.cache
                checking for c++... no
                checking for g++... g++
                checking whether the C++ compiler (g++ ) works... yes
                checking whether the C++ compiler (g++ ) is a cross-compiler... no
                checking whether we are using GNU C++... yes
                checking whether g++ accepts -g... yes
                checking how to run the C++ preprocessor... g++ -E
                checking for ranlib... (cached) ranlib
                updating cache ./config.cache
                creating ./config.status
                creating Makefile
                creating src/Makefile
                creating antlr/Makefile

                -----
                gnu make (c++)
                -----

                gmake[1]: Entering directory `/usr/local/src/antlr-2.7.1/lib/cpp/src'
                /bin/sh ../libtool --mode=compile
                g++ -DPACKAGE=\"libantlr\" -DVERSION=\"2.7.1\" -I. -I. -I.. -g -O2 -W -
                Wall -pipe -c CharBuffer.cpp
                g++ -DPACKAGE=\"libantlr\" -DVERSION=\"2.7.1\" -I. -I. -I.. -g -O2 -W -Wall
                -pipe -Wp,-MD,.deps/CharBuffer.pp -c CharBuffer.cpp -o CharBuffer.o
                as: Error: No source or object files specified on the command line
                gmake[1]: *** [CharBuffer.lo] Error 1
                gmake[1]: Leaving directory `/usr/local/src/antlr-2.7.1/lib/cpp/src'
                gmake: *** [all-recursive] Error 1
              • Ric Klaren
                ... It looks like you have to tweak config.hpp a bit for your compiler. Seems like problems with namespace support. Try different settings for the defines of
                Message 7 of 8 , Nov 22, 2001
                • 0 Attachment
                  On Thu, Nov 22, 2001 at 06:32:41PM +0800, Andre Moll wrote:
                  > I am trying to build the cpp libs under Tru64 unix. I fail to build using
                  > cxx as well using gcc. Has anybody successfuly build the antlr libraries
                  > with Compaq Tru64 UNIX V5.1 (Rev. 732) and could give me a hind what is
                  > going wrong?
                  >
                  > For cxx I tried already the compilerflags -std gnu; -std ansi; -std
                  > strict_ansi without any success.

                  It looks like you have to tweak config.hpp a bit for your compiler. Seems
                  like problems with namespace support.

                  Try different settings for the defines of ANTLR_USE_NAMESPACE etc. Could
                  you send me what you had to change for support on Tru64, then I can include
                  it in the next release..

                  Ric
                  --
                  -----+++++*****************************************************+++++++++-------
                  ---- Ric Klaren ----- klaren@... ----- +31 53 4893722 ----
                  -----+++++*****************************************************+++++++++-------
                  Time what is time - I wish I knew how to tell You why - It hurts to know -
                  Aren't we machines - Time what is time - Unlock the door
                  - And see the truth - Then time is time again
                  From: 'Time what is Time' by Blind Guardian
                • Andre Moll
                  Could solve this very easy after have a deeper look into the cxx manuals depending porting applications. I know .. I know ... rtfm first ;-) ... I am sorry for
                  Message 8 of 8 , Nov 22, 2001
                  • 0 Attachment
                    Could solve this very easy after have a deeper look into the cxx manuals
                    depending porting applications.

                    I know .. I know ... rtfm first ;-) ... I am sorry for that.

                    I add these lines to config.hpp and it's now working fine.

                    //
                    // Digital CXX
                    //
                    #ifdef __DECCXX
                    #define __USE_STD_IOSTREAM
                    #endif

                    Greetz Andre

                    > -----Original Message-----
                    > From: Ric Klaren [mailto:klaren@...]
                    > Sent: Thursday, November 22, 2001 7:20 PM
                    > To: antlr-interest@yahoogroups.com
                    > Subject: Re: [antlr-interest] Building Problems under Tru64
                    >
                    >
                    > On Thu, Nov 22, 2001 at 06:32:41PM +0800, Andre Moll wrote:
                    > > I am trying to build the cpp libs under Tru64 unix. I fail to
                    > build using
                    > > cxx as well using gcc. Has anybody successfuly build the antlr libraries
                    > > with Compaq Tru64 UNIX V5.1 (Rev. 732) and could give me a hind what is
                    > > going wrong?
                    > >
                    > > For cxx I tried already the compilerflags -std gnu; -std ansi; -std
                    > > strict_ansi without any success.
                    >
                    > It looks like you have to tweak config.hpp a bit for your compiler. Seems
                    > like problems with namespace support.
                    >
                    > Try different settings for the defines of ANTLR_USE_NAMESPACE etc. Could
                    > you send me what you had to change for support on Tru64, then I
                    > can include
                    > it in the next release..
                    >
                    > Ric
                    > --
                    > -----+++++*****************************************************+++
                    > ++++++-------
                    > ---- Ric Klaren ----- klaren@... ----- +31 53 4893722 ----
                    > -----+++++*****************************************************+++
                    > ++++++-------
                    > Time what is time - I wish I knew how to tell You why - It hurts
                    > to know -
                    > Aren't we machines - Time what is time - Unlock the door
                    > - And see the truth - Then time is time again
                    > From: 'Time what is Time' by Blind Guardian
                    >
                    >
                    >
                    >
                    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                    >
                    >
                  Your message has been successfully submitted and would be delivered to recipients shortly.