This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 28061 - Create ANTLR autoload library
Summary: Create ANTLR autoload library
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: libs (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks: 28062 16625
  Show dependency tree
 
Reported: 2002-10-17 02:35 UTC by _ briansmith
Modified: 2010-12-09 16:28 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Patch for existing files in libs/ (1.74 KB, patch)
2002-10-17 02:36 UTC, _ briansmith
Details | Diff
New files (extract inside libs to create libs/antlr) (3.78 KB, application/zip)
2002-10-17 02:40 UTC, _ briansmith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ briansmith 2002-10-17 02:35:34 UTC
Please see the discussion at NBDEV:

http://www.netbeans.org/servlets/ReadMsg?msgId=390267&listName=nbdev

I will attach a patch that begins the work. It is
not complete; in particular, I have not done the
update for the website, I haven't finalized the
work on the Bundle.properties, etc.

I will need help from within Sun making sure that
<scramble> and <unscramble> work correctly. Also,
somebody needs to take care of the licensing stuff
(discussed extensively in the mailing list thread
above).

Currently, the patch is against ANTLR 2.7.2a3. To
try it out, you will need to download:
http://www.antlr.org/download/antlr-2.7.2a3_9-14-2002.tar.gz


Inside the tar.gz is a file antlrall.jar. Copy the
file antlrall.jar to
${nb_all.dir}/libs/external/antlrall-2.7.2a3.jar

This patch creates a single module that provides
access to the classes necessary to support
language processors that were created using the
ANTLR compiler compiler (the ANTLR runtime
library). It also provides access to all of the
classes that are needed by tools like the ANTLR
module (http://antlr.netbeans.org ) to support
building ANTLR grammars. If so desired, I can
split it up into two modules (the ANTLR runtime is
~150KB uncompressed, the ANTLR development tool
classes are ~450KB uncompressed).
Comment 1 _ briansmith 2002-10-17 02:36:43 UTC
Created attachment 7679 [details]
Patch for existing files in libs/
Comment 2 _ briansmith 2002-10-17 02:40:00 UTC
Created attachment 7680 [details]
New files (extract inside libs to create libs/antlr)
Comment 3 _ pkuzel 2003-01-09 13:55:41 UTC
Brian for licensing issues please contact lenka.kasparova@sun.com. If
I remember well, Mila wanted ANTLR runtime for lexer module. So you
could share your effort.
Comment 4 _ briansmith 2003-01-09 19:38:03 UTC
A new version of ANTLR is going to be released sometime soon. The
current version is in the public domain but the maintainers are
considering using a BSD license for the next release. So, I'm waiting
for the final release before preceding.
Comment 5 _ briansmith 2003-03-20 06:29:05 UTC
ANTLR 2.7.2 has been released. It is still in 
the public domain.

Previous versions of ANTLR were split into two 
parts: the runtime library and the development 
library. The runtime library contained only 
the classfiles necessary for an ANTLR-based 
application to run properly. The development 
library included the actual ANTLR-to-
Java/C#/C++ compilers. I was intending to 
create two modules, one corresponding to each 
ANTLR library. 

However, the ANTLR 2.7.2 build system changed 
and now everything gets packaged together into 
a single large JAR file. Furthermore, the JAR 
file is compressed. Here are the file sizes 
(runtime-only sizes are from ANTLR 2.7.0)
                combined      runtime-only
  compressed    360K          60K
  uncompressed  685K          108K

Is the 360K compressed, combined JAR file 
acceptable? Or, should I repackage the ANTLR 
classes into two uncompressed files (108K 
antlr-runtime.jar and ~550K antlr-dev.jar)?

My understanding is that NetBeans policy is to 
avoid compressed JAR files. I believe that 
most modules that use ANTLR only need the 108k 
runtime system; only the ANTLR module itself 
(antlr.netbeans.org) would need the 
development system. So, I am leaning toward 
the second option. But, that option requires a 
NetBeans-specific build script for ANTLR.
Comment 6 Miloslav Metelka 2003-03-20 14:39:56 UTC
 I would also opt for the second option but I'm not sure what the
consequences are. Do they plan to silently intermix the runtime
classes with the design-time classes at a functional level? I've
looked to antlr.org but didn't find any clue.
 I'm wondering whether we will be able to cleanly determine into which
of the two jars a particular class will go. I mean the compile-time
jar for the previous versions of antlr was easy to generate as the
runtime jar was provided in the distribution so it only required to
take all classes under antlr dir and remove those contained in the
runtime jar already. The remaining classes formed the compile-time
jar. I'm worried that it will no longer be so easy.
 Regarding compression of jar files I think we should be OK even with
the compressed jar files. There was nbdev thread about it
http://www.netbeans.org/servlets/ReadMsg?msgId=385637&listName=nbdev
Added Jesse to cc if he has any comments on this.
Comment 7 Jesse Glick 2003-03-20 15:40:17 UTC
Re. compression? No idea, ask Petr.
Comment 8 Petr Nejedly 2003-03-20 16:13:44 UTC
No strong opinion on it.
I'd use split uncompressed jars, but for hard numbers, I'd have to
do some measurements on different machines ({slow,fast}x{CPU,disk})
Comment 9 _ pkuzel 2003-07-30 08:40:33 UTC
Brian have you applied for legal review at nbdiscuss? If you have LFI
please refer it in issue status whiteboard in form LFI=0000.