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

Re: [antlr-interest] antlr.jar and jdk 1.2.2

Expand Messages
  • Terence Parr
    ... ack! just with antlr or with the vm in general? should be faster given better compiler and GC. ... ah ha! I wondered which class was forcing all of
    Message 1 of 4 , Jul 9, 2000
    • 0 Attachment
      Robert Colquhoun wrote:
      >
      > Hi,
      >
      > Just recently i upgraded my machine(HP-UX) from 1.1.8 to 1.2.2(as well as
      > increased memory usage and decreased performance with the new jvm ;-) i
      > have noticed a problem with using the current antlr.jar(2.7.0)

      ack! just with antlr or with the vm in general? should be faster given
      better compiler and GC.

      > If my parser needs to print out a message from a RecognitionException ie
      > call the RecognitionException.toString() method the java virtual machine
      > tries to suck in pretty much every class associated with antlr.
      >
      > Looking at antlr/RecognitionException.java
      > public String toString() {
      > return Tool.getFileLineString(fileName,line)+getMessage();
      > }

      ah ha! I wondered which class was forcing all of these damn things to
      be loaded. I just added a bunch of stuff to the script that builds
      antlr.jar, making it like 40k bigger! Ack. Shoot, well at least they
      won't be loaded in memory. When I send out 2.7.1a3 today, I'll move the
      getFileLineString thing and then perhaps you can try removing Tool and
      class types referenced from the antlr.jar to see if it still finds the
      classes it needs. :) That would be a great favor to everyone I'd say.

      > ....everything works just fine!

      Great!

      Thanks,
      Ter
      --
      Chief Scientist, http://www.jGuru.com -- Your Java Portal
      Co-Founder, http://www.NoWebPatents.org -- Stop Patent Stupidity!
      parrt@...
    • Terence Parr
      Robert, Specifically, i just added: antlr/DefineGrammarSymbols.class antlr/ANTLRGrammarParseBehavior.class antlr/MakeGrammar.class antlr/ANTLRParser.class
      Message 2 of 4 , Jul 9, 2000
      • 0 Attachment
        Robert,

        Specifically, i just added:

        antlr/DefineGrammarSymbols.class
        antlr/ANTLRGrammarParseBehavior.class
        antlr/MakeGrammar.class
        antlr/ANTLRParser.class
        antlr/ANTLRTokenTypes
        antlr/LLkGrammarAnalyzer
        antlr/GrammarAnalyzer

        which I think we're being yanked in by Tool.

        Ter
        --
        Chief Scientist, http://www.jGuru.com -- Your Java Portal
        Co-Founder, http://www.NoWebPatents.org -- Stop Patent Stupidity!
        parrt@...
      • Robert Colquhoun
        ... vm in general - its on an older machine, i think i am running the wrong type of programs(short duration, relatively straightforward, not much object
        Message 3 of 4 , Jul 10, 2000
        • 0 Attachment
          At 10:48 AM 7/9/00 -0700, Terence Parr wrote:
          >Robert Colquhoun wrote:
          > >
          > > Hi,
          > >
          > > Just recently i upgraded my machine(HP-UX) from 1.1.8 to 1.2.2(as well as
          > > increased memory usage and decreased performance with the new jvm ;-) i
          > > have noticed a problem with using the current antlr.jar(2.7.0)
          >
          >ack! just with antlr or with the vm in general? should be faster given
          >better compiler and GC.

          vm in general - its on an older machine, i think i am running the wrong
          type of programs(short duration, relatively straightforward, not much
          object creation/destruction) for it. HP have a version of 1.3 in beta i
          might wait till that is released before complaining too much...

          > > If my parser needs to print out a message from a RecognitionException ie
          > > call the RecognitionException.toString() method the java virtual machine
          > > tries to suck in pretty much every class associated with antlr.
          > >
          > > Looking at antlr/RecognitionException.java
          > > public String toString() {
          > > return Tool.getFileLineString(fileName,line)+getMessage();
          > > }
          >
          >ah ha! I wondered which class was forcing all of these damn things to
          >be loaded. I just added a bunch of stuff to the script that builds
          >antlr.jar, making it like 40k bigger! Ack. Shoot, well at least they
          >won't be loaded in memory. When I send out 2.7.1a3 today, I'll move the
          >getFileLineString thing and then perhaps you can try removing Tool and
          >class types referenced from the antlr.jar to see if it still finds the
          >classes it needs. :) That would be a great favor to everyone I'd say.

          Attached is patch against 2.7.1a3 which separates the FileLineFormatter
          class from the Tool class - it works for all the stuff i tried but could
          probably do with someone else checking over it.

          - Robert
        • Terence Parr
          ... Cool...got the patch in my to do list. Ter -- Chief Scientist, http://www.jGuru.com -- Your Java Portal Co-Founder, http://www.NoWebPatents.org -- Stop
          Message 4 of 4 , Jul 10, 2000
          • 0 Attachment
            Robert Colquhoun wrote:
            > >ah ha! I wondered which class was forcing all of these damn things to
            > >be loaded. I just added a bunch of stuff to the script that builds
            > >antlr.jar, making it like 40k bigger! Ack. Shoot, well at least they
            > >won't be loaded in memory. When I send out 2.7.1a3 today, I'll move the
            > >getFileLineString thing and then perhaps you can try removing Tool and
            > >class types referenced from the antlr.jar to see if it still finds the
            > >classes it needs. :) That would be a great favor to everyone I'd say.
            >
            > Attached is patch against 2.7.1a3 which separates the FileLineFormatter
            > class from the Tool class - it works for all the stuff i tried but could
            > probably do with someone else checking over it.

            Cool...got the patch in my to do list.

            Ter
            --
            Chief Scientist, http://www.jGuru.com -- Your Java Portal
            Co-Founder, http://www.NoWebPatents.org -- Stop Patent Stupidity!
            parrt@...
          Your message has been successfully submitted and would be delivered to recipients shortly.