[antlr-interest] VC 7.0 antlr.dll to special ATTN of Ric Klaren and Terence Parr

Alexander Lenski alenski at dca.net
Mon Feb 10 06:40:57 PST 2003


Hi Ric,

1. ... Shouldn't that namespace macro be in the config.hpp, in an appropriate msvc 7 #ifdef ?
  Yes, the ANTLR_CXX_SUPPORTS_NAMESPACE can be defined in the config.
2. About the ! suffix...

Typical rule:
protected
me_to_s_literal[ MCall* pMC, TYPE_SP_T& spWS ]
{ assert( pMC );
  TYPE_SP_AST spR;
}
: #( spO:PP_TO_S_LITERAL!
       (   IDENT!
           { Some code
           }
         | PP_VA_ARGS!
           { Some code
           }
   )  )
   { Some code
   }
;
3.  You mean an addition to only the top of the class definitions ? ...
Yes,  for example:

config.hpp has:
//
#if defined(_MSC_VER) && !defined(__ICL)
  #if( defined APP_EXPORTS )
    #define CUST_API  __declspec( dllexport )
  #elif( defined  APP_IMPORTS )
    #define CUST_API  __declspec( dllimport )
  #else
    #define CUST_API
  #endif
#endif
//
codegen generates:
//
struct CUST_API CPPMCLexerTokenTypes
{ ...
}
//
class CUST_API CPPMCLexer : public ANTLR_USE_NAMESPACE(antlr)CharScanner, public CPPMCLexerTokenTypes
{ ...
}

Now I can define APP_EXPORTS or APP_IMPORTS in the command line or in the config with the
#define APP_EXPORTS  //When I build DLL for my lexer
or
#define APP_IMPORTS  //When I use the DLL
or I do not define the APP_EXPORTS  and APP_IMPORTS  if build another type of app and do not use the DLL.

Thanks,
Alexander Lenski

----- Original Message ----- 
From: "Ric Klaren" <klaren at cs.utwente.nl>
To: <antlr-interest at yahoogroups.com>
Sent: Monday, February 10, 2003 7:18 AM
Subject: Re: [antlr-interest] VC 7.0 antlr.dll to special ATTN of Ric Klaren and Terence Parr


> Hi,
> 
> On Mon, Feb 10, 2003 at 02:50:03AM -0500, Alexander Lenski wrote:
> > (Sorry, this is a second trial. The first one did not get through:
> > attachment is too big.)
> 
> You can send big stuff directly to me if necessary, our mailserver can
> handle quite a lot.
> 
> I'll look at it when I'm back in office. (Taking a few earned days off
> after returning from business trip to the states)
> 
> >             - Preprocessor Definitions
> >               - WIN32;_DEBUG;_WINDOWS;_USRDLL;ANTLR_EXPORTS;ANTLR_CXX_SUPPORTS_NAMESPACE
> 
> Shouldn't that namespace macro be in the config.hpp, in an appropriate msvc
> 7 #ifdef ?
> 
> >       - Check files (e.g. with the WinDiff) for details and other changes.
> 
> Will do :)
> 
> > 2 Requests by Alexander Lenski
> >         These changes make specialization of the buffers possible.
> 
> I'll look at them, don't see much problems there. I might change a name or
> two if I think it's more in antlr's naming style though.
> 
> >       - About the ! suffix (currently not implemented in full) for AST
> >         construction rules
> >         - Please, clarify your intentions related to the !.
> 
> What's documented should work I guess. If it's not it's a bug. The last
> month has been very busy for me so I might have missed a bug report in that
> period. To speed up bug fixes in C++ codegen you can send me a complete
> compilable grammar which demonstrates the problem (if it's non trivial to
> see) If I have to make a grammar myself to find debug such stuff it will
> usually take quite some time to get it fixed (since it will need a big
> antlr session for me to work on).
> 
> > - 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... 
> 
> You mean an addition to only the top of the class definitions ? Mail me
> details of what you want and I'll have a look (doesn't sound hard to make
> in any case).
> 
> Thanks for your work!!!
> 
> Cheers,
> 
> Ric
> -- 
> -----+++++*****************************************************+++++++++-------
>     ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
> -----+++++*****************************************************+++++++++-------
>  'And this 'rebooting' business? Give it a good kicking, do you?' 'Oh, no,
>   of course, we ... that is ... well, yes, in fact,' said Ponder. 'Adrian
>     goes round the back and ... er ... prods it with his foot. But in a
>      technical way,' he added. --- From: Hogfather by Terry Pratchett.
> 
> 
>  
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20030210/18a10d46/attachment.html


More information about the antlr-interest mailing list