|
12 | 12 | #define ALEX_IF_GHC_GT_500 #if __GLASGOW_HASKELL__ > 500
|
13 | 13 | #define ALEX_IF_GHC_LT_503 #if __GLASGOW_HASKELL__ < 503
|
14 | 14 | #define ALEX_IF_GHC_GT_706 #if __GLASGOW_HASKELL__ > 706
|
| 15 | +#define ALEX_IF_GHC_GT_901 #if __GLASGOW_HASKELL__ > 901 |
15 | 16 | #define ALEX_ELIF_GHC_500 #elif __GLASGOW_HASKELL__ == 500
|
16 | 17 | #define ALEX_IF_BIGENDIAN #ifdef WORDS_BIGENDIAN
|
17 | 18 | #define ALEX_ELSE #else
|
@@ -163,13 +164,23 @@ alex_scan_tkn user__ orig_input len input__ s last_acc =
|
163 | 164 | #endif
|
164 | 165 | case fromIntegral c of { IBOX(ord_c) ->
|
165 | 166 | let
|
| 167 | +ALEX_IF_GHC_GT_901 |
| 168 | + base = int32ToInt# (alexIndexInt32OffAddr alex_base s) |
| 169 | + offset = PLUS(base,ord_c) |
| 170 | + check = int16ToInt# (alexIndexInt16OffAddr alex_check offset) |
| 171 | + |
| 172 | + new_s = if GTE(offset,ILIT(0)) && EQ(check,ord_c) |
| 173 | + then int16ToInt# (alexIndexInt16OffAddr alex_table offset) |
| 174 | + else int16ToInt# (alexIndexInt16OffAddr alex_deflt s) |
| 175 | +ALEX_ELSE |
166 | 176 | base = alexIndexInt32OffAddr alex_base s
|
167 | 177 | offset = PLUS(base,ord_c)
|
168 | 178 | check = alexIndexInt16OffAddr alex_check offset
|
169 | 179 |
|
170 | 180 | new_s = if GTE(offset,ILIT(0)) && EQ(check,ord_c)
|
171 | 181 | then alexIndexInt16OffAddr alex_table offset
|
172 | 182 | else alexIndexInt16OffAddr alex_deflt s
|
| 183 | +ALEX_ENDIF |
173 | 184 | in
|
174 | 185 | case new_s of
|
175 | 186 | ILIT(-1) -> (new_acc, input__)
|
|
0 commit comments