ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/antlr/CharScanner.hpp
(Generate patch)

Comparing:
trunk/src/antlr/CharScanner.hpp (file contents), Revision 1401 by jmarr, Wed Jan 6 21:06:59 2010 UTC vs.
branches/development/src/antlr/CharScanner.hpp (file contents), Revision 1633 by gezelter, Thu Sep 15 13:39:36 2011 UTC

# Line 5 | Line 5
5   * Project led by Terence Parr at http://www.jGuru.com
6   * Software rights: http://www.antlr.org/license.html
7   *
8 < * $Id: CharScanner.hpp,v 1.2 2005-12-15 14:48:26 gezelter Exp $
8 > * $Id$
9   */
10  
11   #include <antlr/config.hpp>
12  
13   #include <map>
14 #include <cstdio>
14  
15   #ifdef HAS_NOT_CCTYPE_H
16   #include <ctype.h>
# Line 41 | Line 40 | ANTLR_C_USING(tolower)
40  
41   ANTLR_C_USING(tolower)
42  
43 < #if !defined(HAVE_STRCASECMP) && defined(HAVE_STRICMP) && !defined(stricmp)
44 < #define strcasecmp stricmp
45 < #endif
47 < #if !defined(HAVE_STRNCASECMP) && defined(HAVE_STRNICMP) && !defined(strnicmp)
48 < #define strncasecmp strnicmp
49 < #endif
50 <
51 <
52 < #if !defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP)
43 > #ifdef ANTLR_REALLY_NO_STRCASECMP
44 > // Apparently, neither strcasecmp nor stricmp is standard, and Codewarrior
45 > // on the mac has neither...
46   inline int strcasecmp(const char *s1, const char *s2)
47   {
48          while (true)
# Line 61 | Line 54 | inline int strcasecmp(const char *s1, const char *s2)
54                  if (c1 == 0) return 0;
55          }
56   }
57 + #else
58 + #ifdef NO_STRCASECMP
59 + ANTLR_C_USING(stricmp)
60 + #else
61 + ANTLR_C_USING(strcasecmp)
62   #endif
63 + #endif
64  
65   /** Functor for the literals map
66   */
# Line 122 | Line 121 | class ANTLR_API CharScanner : public TokenStream { (pu
121                  inputState->getInput().commit();
122          }
123  
124 +        /** called by the generated lexer to do error recovery, override to
125 +         * customize the behaviour.
126 +         */
127 +        virtual void recover(const RecognitionException& ex, const BitSet& tokenSet)
128 +        {
129 +                consume();
130 +                consumeUntil(tokenSet);
131 +        }
132 +
133          virtual void consume()
134          {
135                  if (inputState->guessing == 0)

Comparing:
trunk/src/antlr/CharScanner.hpp (property svn:keywords), Revision 1401 by jmarr, Wed Jan 6 21:06:59 2010 UTC vs.
branches/development/src/antlr/CharScanner.hpp (property svn:keywords), Revision 1633 by gezelter, Thu Sep 15 13:39:36 2011 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines