[antlr-interest] Re: VC 7.0 antlr.dll to special ATTN of Ric Klaren and Terence Parr
Arnar Birgisson
arnarb at oddi.is
Fri Oct 3 10:55:52 PDT 2003
Hi..
Following is my earlier post today, the ANTLR version I used is at
http://wwwhome.cs.utwente.nl/~klaren/antlr/antlr-20030911.tar.gz
I attached my debug versions of antlr.lib, antlr.dll and antlr.pdb. If
you like, I could send you the Release build as well.
Arnar
My earlier post:
For future reference, here's how I built the ANTLR dll with MSVC 7.0,
based on Ric's modified ANTLR 2.7.3-20030911 (this is a little different
from the README):
1. Create new "Win32 Project"
2. In the creation wizard, under "Application Settings", check DLL as
application type and "Empty project" in "Additional Options"
3. Insert all *.cpp files from lib/cpp/src and *.hpp from lib/cpp/antlr
to your project.
4. Make these changes in Project properties:
- Configuration Properties
- C/C++
- General
- Additinal Include Directories: drive:\path-to-antlr\lib\cpp
- Preprocessor
- Preprocessor Definitions:
WIN32;NDEBUG;_WINDOWS;_USRDLL;ANTLR_EXPORTS;ANTLR_CXX_SUPPORTS_NAMESPACE
( change _DEBUG to NDEBUG in release build)
- Code generation
- Runtime Library: Multi-threaded Debug DLL (Skip "debug" in
release build)
- Enable Function-level Linking: Yes
- Language
- Default Char Unsigned: Yes
- Create/Use Precompiled Header: Not using precompiled header
5. Compile
In your project, where you use ANTLR from, you need to select the same
Runtime Library, and define ANTLR_IMPORTS and
ANTLR_CXX_SUPPORTS_NAMESPACE.
> -----Original Message-----
> From: pfhmks0 [mailto:pfhmks0 at yahoo.com]
> Sent: 3. október 2003 17:42
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] Re: VC 7.0 antlr.dll to special
> ATTN of Ric Klaren and Terence Parr
>
>
> Hi,
>
> How do I get this version? The attachment is empty. Thanks in
> advance.
>
> - msingh
>
> --- In antlr-interest at yahoogroups.com, "Alexander Lenski"
> <alenski at d...> wrote:
> > (Sorry, this is a second trial. The first one did not get through:
> attachment is too big.)
> > Hi,
> > Enjoy the dll in the VC 7.0 environment.
> >
> > Attachments:
> > - Notes.txt: how to; requests (Ric, Terence read it
> please).
> > - antlr-2.7.2.zip: just the lib\cpp\antlr and lib\cpp\src
> subdirs.
> > - lib.zip: antlr.lib: import library to
> link with your code (debug build) ,
> > antlr.dll: DLL (debug build),
> > antlr.pdb symbols.
> >
> > Alexander Lenski
> >
> > 1. Notes for the ANTLR DLL target ( MSVC 7.0, Unmanaged DLL ) by
> Alexander Lenski:
> >
> > 1.1 Project settings ("create new project" dialogs)
> > - Win32 project
> > - Application Settings
> > - Application type
> > - DLL
> > - Additional options
> > - Export symbols
> > 1.2 Project properties (change defaults to)
> > - Configuration Properties
> > - C/C++
> > - General
> > - Additional Include Directories
> > - drive:\antlr-2.7.2\lib\cpp
> > - Preprocessor
> > - Preprocessor Definitions
> > -
> WIN32;_DEBUG;_WINDOWS;_USRDLL;ANTLR_EXPORTS;ANTLR_CXX_SUPPORTS_NAMESP
> ACE
> > - Code Generation
> > - Runtime Library
> > - Multi-threaded Debug DLL (/MDd)
> > - Enable Function-Level Linking:
> > - Yes
> > - Language
> > - Enable Run-Time Type Info
> > - Yes
> > - Precompiled Headers
> > - Create/Use Precompiled Headers
> > - Not Using Precompiled Headers
> >
> > 1.3 Some notes on the code change related to the DLL export
> > - See the ASTFactory.hpp for the factory_type,
> factory_descriptor
> > and factory_descriptor_list related defs.
> > - SemanticException.hpp is not included in any of the antlr
> files,
> > the SemanticException is not exported. I added the include
> > in the CharScaner.hpp.
> > - ParserInputState::~ParserInputState must be virtual to be
> properly
> > exported.
> > - Check files (e.g. with the WinDiff) for details and other
> changes.
> >
> > 2 Requests by Alexander Lenski
> > - Please, (as a min) add the
> > //!!!
> > //Get number of non-consumed tokens:
> > public:
> > virtual unsigned int entries() const;
> > with the
> > //!!!
> > //Get number of non-consumed tokens:
> > unsigned int TokenBuffer::entries() const
> > { return queue.entries() - markerOffset;
> > }
> > highly useful function to the TokenBuffer.
> > Please, in addition (as a max) make all data members of the
> > TokenBuffer protected (as it is done with the InputBuffer)
> > instead of private, add the
> > //!!!
> > //Get number of non-consumed chars:
> > public:
> > virtual unsigned int entries() const;
> > with the
> > //!!!
> > //Get number of non-consumed chars:
> > unsigned int InputBuffer::entries() const
> > { return queue.entries() - markerOffset;
> > }
> > to the InputBuffer too.
> > These changes make specialization of the buffers possible.
> > - About the ! suffix (currently not implemented in full) for
> AST
> > construction rules
> > - Please, clarify your intentions related to the !.
> > - Please, consider addition of one more option for the C++
> code gen to set
> > DLL export/import customizable spec in all antlr-generated
> classes in the form
> > class CUST_API SomeClass...
>
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: antlr_dll-debug-20030911.zip
Type: application/x-zip-compressed
Size: 530872 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20031003/88c7df01/antlr_dll-debug-20030911.bin
More information about the antlr-interest
mailing list