[antlr-interest] STLPort and EOF (from the TODO in $\lib\cpp)

Ric Klaren klaren at cs.utwente.nl
Wed Mar 5 02:09:06 PST 2003


On Wed, Mar 05, 2003 at 12:17:38AM -0000, ee_doright wrote:
> After several hours of sackcloth and ashes, I have realized that it 
> is an existing bug that ANTLR doesn't work with STLPort.  I really 
> want to abandon SGI's STL because it is such a pain in the butt, so I 
> was experimenting w/ STLPort, but have run into a problem with this 
> EOF thing:
> (from the TODO in $\lib\cpp):
> * On Thu, Sep 21, 2000 at 12:33:48AM -0700, John Lambert 
> <JohnL at jBASE.com> wrote:
>   > 1) The literal EOF is not defined and causes the define of 
> EOF_CHAR  in
>   > CharScanner.hpp to fail.
>   ANTLR with STL Port. Changing the EOF define to 
> char_traits<char>::eof()
>   breaks things for gcc-2.95.2. Fix this in next release portably.
>   http://www.egroups.com/message/antlr-interest/2520
> (end of snippet)
> In the 2.7.0 and 2.7.1 release, there is a "Fix this in the next 
> release" which I am afraid will never happen.  Is there a fix I can 
> do on my end, or is there a mere configuration switch I need to do, 
> or are there any plans to ever fix this?  I am new to the STL world, 
> but I had heard that everyone uses STLPort...obviously, not, because 
> at least some of us use antlr.  ;)

Well there are ppl using STLPort with antlr afaik. I'm not one of them
gcc's STL version works well enough for me.

> Should i be worried that this post is 30 months old, and it is still 
> not fixed??

Well fixing this portably turns out not to be that easy. Did you at least
try following the snippet and changing the EOF define to
char_traits<char>::eof() ? Would be nice if it's now supported on some more
platforms. If everything else fails wriggle in a #define of EOF to -1
somewhere. Or find out what STLPort uses for EOF anyway. Problem is that
almost all compiler builders are doing something different with this EOF
stuff. So basically if not many ppl complain don't fix it. And must say
you're the second or so.

Bug reports are also that much easier if information is supplied of say
compiler, platform, STLPort version. Though chances are not very high that
I have time to mess around with installing an STLPort version. So if you
email me with more detailed information I might help in resolving the issue
and indeed fixing it in a later release.


    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
  "You know how to use that thing?" [pointing to the sword]
  "Sure.. The pointy end goes into the other guy."
  --- The Mask of Zorro


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

More information about the antlr-interest mailing list