[antlr-interest] upgrading from 2.6.0 to 2.7.2

Mona Abhichandani monaabs at yahoo.com
Thu May 29 10:40:18 PDT 2003


Greetings!!!
 
I am in the process of updating from 2.6.0 to 2.7.2 .. i am running a c++ version so i replaced the ANTLR files with the newer versions . Hope i am going in the right direction .
 
There are three issues which i came across 
 
1)There are new functions added getNumtokens() , gettokenNames() .. what should be the code for the above functions?
 
2)What is the function which replaced SetTokenNames()
 
3)The errors which i encountered are 
  D:\DMATBuilds\Source\DM_Tools\bin\sxl\include\exception(40) : see declaration of 'exception'
COMPUTE_Lexer.cpp(16) : error C2664: '__thiscall antlr::CharScanner::antlr::CharScanner(const class antlr::CharScanner &)' : cannot convert parameter 1 from 'class antlr::CharBuffer *' to 'const class antlr::CharScanner &'
        Reason: cannot convert from 'class antlr::CharBuffer *' to 'const class antlr::CharScanner'
        No constructor could take the source type, or constructor overload resolution was ambiguous
COMPUTE_Lexer.cpp(23) : error C2664: '__thiscall antlr::CharScanner::antlr::CharScanner(const class antlr::CharScanner &)' : cannot convert parameter 1 from 'class antlr::InputBuffer' to 'const class antlr::CharScanner &'
        Reason: cannot convert from 'class antlr::InputBuffer' to 'const class antlr::CharScanner'
        No constructor could take the source type, or constructor overload resolution was ambiguous
COMPUTE_Lexer.cpp(30) : error C2664: '__thiscall antlr::CharScanner::antlr::CharScanner(const class antlr::CharScanner &)' : cannot convert parameter 1 from 'const class antlr::RefCount<class antlr::LexerInputState>' to 'const class antlr::CharScann
er &'
        Reason: cannot convert from 'const class antlr::RefCount<class antlr::LexerInputState>' to 'const class antlr::CharScanner'
        No constructor could take the source type, or constructor overload resolution was ambiguous
 
My source is 
COMPUTE_Lexer::COMPUTE_Lexer(ANTLR_USE_NAMESPACE(std)istream& in)
 : ANTLR_USE_NAMESPACE(antlr)CharScanner(new ANTLR_USE_NAMESPACE(antlr)CharBuffer(in))
{
 setCaseSensitive(true);
 initLiterals();
}
COMPUTE_Lexer::COMPUTE_Lexer(ANTLR_USE_NAMESPACE(antlr)InputBuffer& ib)
 : ANTLR_USE_NAMESPACE(antlr)CharScanner(ib)
{
 setCaseSensitive(true);
 initLiterals();
}
COMPUTE_Lexer::COMPUTE_Lexer(const ANTLR_USE_NAMESPACE(antlr)LexerSharedInputState& state)
 : ANTLR_USE_NAMESPACE(antlr)CharScanner(state)
{
 setCaseSensitive(true);
 initLiterals();
}
 
Looking forward to your response .
 
Best Regards
Mona


Terence Parr <parrt at jguru.com> wrote:
Hi. At minimum you must replace the jar and rerun antlr on your 
grammar(s). From there, try to compile and let us know what happens ;)

Ter

On Wednesday, May 28, 2003, at 10:06 AM, monaabs wrote:

> Hi,
> Thanks for the prompt response .
>
> Since i need to upgrade from 2.6.0 to 2.7.2 .. is there an easy way
> to do that? Will it be allright if i just replace the files used with
> the newer ones ?
> Mona
>
> Hi there. Ouch. I'd recommend moving to 2.7.2 as it is lightyears
> ahead in it's stability and unicode support.
>
> Ter
>
> On Wednesday, May 28, 2003, at 09:09 AM, monaabs wrote:
>
>> Hi,
>> I am using ANTLR version 2.6.0 Actually somebody in my group used it
>> to support parsing and he is laid off and i am stuck with providing
>> NLS support for japanese characters .
>> How do i go about it ?
>> Any input will be highly appreciated .
>>
>>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>
>
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Co-founder, http://www.peerscope.com link sharing, pure-n-simple
Lecturer in Comp. Sci., University of San Francisco




Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20030529/42aabff3/attachment.html


More information about the antlr-interest mailing list