~ubuntu-branches/ubuntu/oneiric/firebird2.1/oneiric

« back to all changes in this revision

Viewing changes to src/gpre/gpre.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2011-04-22 18:59:44 UTC
  • mfrom: (2.1.24 sid)
  • Revision ID: james.westby@ubuntu.com-20110422185944-egwy9r5xynjddku5
Tags: 2.1.4.18393-0.ds2-2
* apply patch from upstream SVN fixing ICU collations
* remove lintian overrides about manpages shipped in dependency package
* claim compliancy with Policy 3.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
static act* global_first_action;
125
125
static UCHAR classes_array[256];
126
126
 
127
 
inline UCHAR classes(int idx)
 
127
inline UCHAR get_classes(int idx)
128
128
{
129
129
        return classes_array[(UCHAR) idx];
130
130
}
131
131
 
132
 
inline UCHAR classes(UCHAR idx)
 
132
inline UCHAR get_classes(UCHAR idx)
133
133
{
134
134
        return classes_array[idx];
135
135
}
1234
1234
        while (c = get_char(input_file))
1235
1235
        {
1236
1236
                position++;
1237
 
                if ((classes(c) == CHR_WHITE) && sw_trace && token_string) {
 
1237
                if ((get_classes(c) == CHR_WHITE) && sw_trace && token_string) {
1238
1238
                        *p = 0;
1239
1239
                        puts(token_string);
1240
1240
                        token_string[0] = 0;
1252
1252
                }
1253
1253
                else {
1254
1254
                        line_position++;
1255
 
                        if (classes(c) != CHR_WHITE)
 
1255
                        if (get_classes(c) != CHR_WHITE)
1256
1256
                                continue_char = (gpreGlob.token_global.tok_keyword == KW_AMPERSAND);
1257
1257
                }
1258
1258
        }
1361
1361
static bool all_digits(const char* str1)
1362
1362
{
1363
1363
        for (; *str1; str1++)
1364
 
                if (!(classes(*str1) & CHR_DIGIT))
 
1364
                if (!(get_classes(*str1) & CHR_DIGIT))
1365
1365
                        return false;
1366
1366
 
1367
1367
        return true;
2098
2098
 
2099
2099
        gpreGlob.token_global.tok_position = position;
2100
2100
        gpreGlob.token_global.tok_white_space = 0;
2101
 
        UCHAR char_class = classes(c);
 
2101
        UCHAR char_class = get_classes(c);
2102
2102
 
2103
2103
#ifdef GPRE_ADA
2104
2104
        if ((gpreGlob.sw_language == lang_ada) && (c == '\'')) {
2115
2115
        bool label = false;
2116
2116
 
2117
2117
        if (gpreGlob.sw_sql && (char_class & CHR_INTRODUCER)) {
2118
 
                while (classes(c = nextchar()) & CHR_IDENT) {
 
2118
                while (get_classes(c = nextchar()) & CHR_IDENT) {
2119
2119
                        if (p < end) {
2120
2120
                                *p++ = (TEXT) c;
2121
2121
                        }
2125
2125
        }
2126
2126
        else if (char_class & CHR_LETTER) {
2127
2127
                while (true) {
2128
 
                        while (classes(c = nextchar()) & CHR_IDENT)
 
2128
                        while (get_classes(c = nextchar()) & CHR_IDENT)
2129
2129
                                *p++ = (TEXT) c;
2130
2130
                        if (c != '-' || gpreGlob.sw_language != lang_cobol)
2131
2131
                                break;
2142
2142
                if (gpreGlob.sw_language == lang_fortran && line_position < 7)
2143
2143
                        label = true;
2144
2144
#endif
2145
 
                while (classes(c = nextchar()) & CHR_DIGIT)
 
2145
                while (get_classes(c = nextchar()) & CHR_DIGIT)
2146
2146
                        *p++ = (TEXT) c;
2147
2147
                if (label) {
2148
2148
                        *p = 0;
2150
2150
                }
2151
2151
                if (c == '.') {
2152
2152
                        *p++ = (TEXT) c;
2153
 
                        while (classes(c = nextchar()) & CHR_DIGIT)
 
2153
                        while (get_classes(c = nextchar()) & CHR_DIGIT)
2154
2154
                                *p++ = (TEXT) c;
2155
2155
                }
2156
2156
                if (!label && (c == 'E' || c == 'e')) {
2160
2160
                                *p++ = (TEXT) c;
2161
2161
                        else
2162
2162
                                return_char(c);
2163
 
                        while (classes(c = nextchar()) & CHR_DIGIT)
 
2163
                        while (get_classes(c = nextchar()) & CHR_DIGIT)
2164
2164
                                *p++ = (TEXT) c;
2165
2165
                }
2166
2166
                return_char(c);
2239
2239
                }
2240
2240
        }
2241
2241
        else if (c == '.') {
2242
 
                if (classes(c = nextchar()) & CHR_DIGIT) {
 
2242
                if (get_classes(c = nextchar()) & CHR_DIGIT) {
2243
2243
                        *p++ = (TEXT) c;
2244
 
                        while (classes(c = nextchar()) & CHR_DIGIT)
 
2244
                        while (get_classes(c = nextchar()) & CHR_DIGIT)
2245
2245
                                *p++ = (TEXT) c;
2246
2246
                        if ((c == 'E' || c == 'e')) {
2247
2247
                                *p++ = (TEXT) c;
2250
2250
                                        *p++ = (TEXT) c;
2251
2251
                                else
2252
2252
                                        return_char(c);
2253
 
                                while (classes(c = nextchar()) & CHR_DIGIT)
 
2253
                                while (get_classes(c = nextchar()) & CHR_DIGIT)
2254
2254
                                        *p++ = (TEXT) c;
2255
2255
                        }
2256
2256
                        return_char(c);
2865
2865
                }
2866
2866
#endif
2867
2867
 
2868
 
                const UCHAR char_class = classes(c);
 
2868
                const UCHAR char_class = get_classes(c);
2869
2869
 
2870
2870
                if (char_class & CHR_WHITE) {
2871
2871
                        continue;