@@ -47,21 +47,21 @@ var caml_lex_engine_aux = (function (tbl, start_state, lexbuf, exn){
47
47
var lex_trans = 'lex_trans' ;
48
48
var lex_check = 'lex_check' ;
49
49
if ( ! tbl . processed ) {
50
- tbl . lex_base = caml_lex_array ( tbl [ lex_base ] ) ;
51
- tbl . lex_backtrk = caml_lex_array ( tbl [ lex_backtrk ] ) ;
52
- tbl . lex_check = caml_lex_array ( tbl [ lex_check ] ) ;
53
- tbl . lex_trans = caml_lex_array ( tbl [ lex_trans ] ) ;
54
- tbl . lex_default = caml_lex_array ( tbl [ lex_default ] ) ;
50
+ tbl . lex_base = caml_lex_array ( tbl . lex_base ) ;
51
+ tbl . lex_backtrk = caml_lex_array ( tbl . lex_backtrk ) ;
52
+ tbl . lex_check = caml_lex_array ( tbl . lex_check ) ;
53
+ tbl . lex_trans = caml_lex_array ( tbl . lex_trans ) ;
54
+ tbl . lex_default = caml_lex_array ( tbl . lex_default ) ;
55
55
tbl . processed = true ;
56
56
}
57
57
var c ;
58
58
var state = start_state ;
59
- //var buffer = bytes_of_string(lexbuf[ lex_buffer] );
60
- var buffer = lexbuf [ lex_buffer ] ;
59
+ //var buffer = bytes_of_string(lexbuf. lex_buffer);
60
+ var buffer = lexbuf . lex_buffer ;
61
61
if ( state >= 0 ) {
62
62
/* First entry */
63
- lexbuf [ lex_last_pos ] = lexbuf [ lex_start_pos ] = lexbuf [ lex_curr_pos ] ;
64
- lexbuf [ lex_last_action ] = - 1 ;
63
+ lexbuf . lex_last_pos = lexbuf . lex_start_pos = lexbuf . lex_curr_pos ;
64
+ lexbuf . lex_last_action = - 1 ;
65
65
}
66
66
else {
67
67
/* Reentry after refill */
@@ -75,20 +75,20 @@ var caml_lex_engine_aux = (function (tbl, start_state, lexbuf, exn){
75
75
/* See if it's a backtrack point */
76
76
var backtrk = tbl . lex_backtrk [ state ] ;
77
77
if ( backtrk >= 0 ) {
78
- lexbuf [ lex_last_pos ] = lexbuf [ lex_curr_pos ] ;
79
- lexbuf [ lex_last_action ] = backtrk ;
78
+ lexbuf . lex_last_pos = lexbuf . lex_curr_pos ;
79
+ lexbuf . lex_last_action = backtrk ;
80
80
}
81
81
/* See if we need a refill */
82
- if ( lexbuf [ lex_curr_pos ] >= lexbuf [ lex_buffer_len ] ) {
83
- if ( lexbuf [ lex_eof_reached ] === 0 )
82
+ if ( lexbuf . lex_curr_pos >= lexbuf . lex_buffer_len ) {
83
+ if ( lexbuf . lex_eof_reached === 0 )
84
84
return - state - 1 ;
85
85
else
86
86
c = 256 ;
87
87
}
88
88
else {
89
89
/* Read next input char */
90
- c = buffer [ lexbuf [ lex_curr_pos ] ] ;
91
- lexbuf [ lex_curr_pos ] ++ ;
90
+ c = buffer [ lexbuf . lex_curr_pos ] ;
91
+ lexbuf . lex_curr_pos ++ ;
92
92
}
93
93
/* Determine next state */
94
94
if ( tbl . lex_check [ base + c ] === state ) {
@@ -99,18 +99,18 @@ var caml_lex_engine_aux = (function (tbl, start_state, lexbuf, exn){
99
99
}
100
100
/* If no transition on this char, return to last backtrack point */
101
101
if ( state < 0 ) {
102
- lexbuf [ lex_curr_pos ] = lexbuf [ lex_last_pos ] ;
103
- if ( lexbuf [ lex_last_action ] == - 1 )
102
+ lexbuf . lex_curr_pos = lexbuf . lex_last_pos ;
103
+ if ( lexbuf . lex_last_action == - 1 )
104
104
throw exn
105
105
else
106
- return lexbuf [ lex_last_action ] ;
106
+ return lexbuf . lex_last_action ;
107
107
}
108
108
else {
109
109
/* Erase the EOF condition only if the EOF pseudo-character was
110
110
consumed by the automaton (i.e. there was no backtrack above)
111
111
*/
112
112
if ( c == 256 )
113
- lexbuf [ lex_eof_reached ] = 0 ;
113
+ lexbuf . lex_eof_reached = 0 ;
114
114
}
115
115
}
116
116
} ) ;
@@ -193,11 +193,11 @@ var caml_new_lex_engine_aux = (function (tbl, start_state, lexbuf, exn) {
193
193
var lex_check_code = 'lex_check_code' ;
194
194
var lex_code = 'lex_code' ;
195
195
if ( ! tbl . processed ) {
196
- tbl . lex_base = caml_lex_array ( tbl [ lex_base ] ) ;
197
- tbl . lex_backtrk = caml_lex_array ( tbl [ lex_backtrk ] ) ;
198
- tbl . lex_check = caml_lex_array ( tbl [ lex_check ] ) ;
199
- tbl . lex_trans = caml_lex_array ( tbl [ lex_trans ] ) ;
200
- tbl . lex_default = caml_lex_array ( tbl [ lex_default ] ) ;
196
+ tbl . lex_base = caml_lex_array ( tbl . lex_base ) ;
197
+ tbl . lex_backtrk = caml_lex_array ( tbl . lex_backtrk ) ;
198
+ tbl . lex_check = caml_lex_array ( tbl . lex_check ) ;
199
+ tbl . lex_trans = caml_lex_array ( tbl . lex_trans ) ;
200
+ tbl . lex_default = caml_lex_array ( tbl . lex_default ) ;
201
201
tbl . lex_base_code = caml_lex_array ( tbl [ lex_base_code ] ) ;
202
202
tbl . lex_backtrk_code = caml_lex_array ( tbl [ lex_backtrk_code ] ) ;
203
203
tbl . lex_check_code = caml_lex_array ( tbl [ lex_check_code ] ) ;
@@ -206,12 +206,12 @@ var caml_new_lex_engine_aux = (function (tbl, start_state, lexbuf, exn) {
206
206
tbl . processed = true ;
207
207
}
208
208
var c , state = start_state ;
209
- //var buffer = caml_bytes_of_string(lexbuf[ lex_buffer] );
210
- var buffer = lexbuf [ lex_buffer ] ;
209
+ //var buffer = caml_bytes_of_string(lexbuf. lex_buffer);
210
+ var buffer = lexbuf . lex_buffer ;
211
211
if ( state >= 0 ) {
212
212
/* First entry */
213
- lexbuf [ lex_last_pos ] = lexbuf [ lex_start_pos ] = lexbuf [ lex_curr_pos ] ;
214
- lexbuf [ lex_last_action ] = - 1 ;
213
+ lexbuf . lex_last_pos = lexbuf . lex_start_pos = lexbuf . lex_curr_pos ;
214
+ lexbuf . lex_last_action = - 1 ;
215
215
}
216
216
else {
217
217
/* Reentry after refill */
@@ -230,20 +230,20 @@ var caml_new_lex_engine_aux = (function (tbl, start_state, lexbuf, exn) {
230
230
if ( backtrk >= 0 ) {
231
231
var pc_off = tbl . lex_backtrk_code [ state ] ;
232
232
caml_lex_run_tag ( tbl . lex_code , pc_off , lexbuf [ lex_mem ] ) ;
233
- lexbuf [ lex_last_pos ] = lexbuf [ lex_curr_pos ] ;
234
- lexbuf [ lex_last_action ] = backtrk ;
233
+ lexbuf . lex_last_pos = lexbuf . lex_curr_pos ;
234
+ lexbuf . lex_last_action = backtrk ;
235
235
}
236
236
/* See if we need a refill */
237
- if ( lexbuf [ lex_curr_pos ] >= lexbuf [ lex_buffer_len ] ) {
238
- if ( lexbuf [ lex_eof_reached ] == 0 )
237
+ if ( lexbuf . lex_curr_pos >= lexbuf . lex_buffer_len ) {
238
+ if ( lexbuf . lex_eof_reached == 0 )
239
239
return - state - 1 ;
240
240
else
241
241
c = 256 ;
242
242
}
243
243
else {
244
244
/* Read next input char */
245
- c = buffer [ lexbuf [ lex_curr_pos ] ] ;
246
- lexbuf [ lex_curr_pos ] ++ ;
245
+ c = buffer [ lexbuf . lex_curr_pos ] ;
246
+ lexbuf . lex_curr_pos ++ ;
247
247
}
248
248
/* Determine next state */
249
249
var pstate = state ;
@@ -253,11 +253,11 @@ var caml_new_lex_engine_aux = (function (tbl, start_state, lexbuf, exn) {
253
253
state = tbl . lex_default [ state ] ;
254
254
/* If no transition on this char, return to last backtrack point */
255
255
if ( state < 0 ) {
256
- lexbuf [ lex_curr_pos ] = lexbuf [ lex_last_pos ] ;
257
- if ( lexbuf [ lex_last_action ] == - 1 )
256
+ lexbuf . lex_curr_pos = lexbuf . lex_last_pos ;
257
+ if ( lexbuf . lex_last_action == - 1 )
258
258
throw exn ;
259
259
else
260
- return lexbuf [ lex_last_action ] ;
260
+ return lexbuf . lex_last_action ;
261
261
}
262
262
else {
263
263
/* If some transition, get and perform memory moves */
@@ -267,12 +267,12 @@ var caml_new_lex_engine_aux = (function (tbl, start_state, lexbuf, exn) {
267
267
else
268
268
pc_off = tbl . lex_default_code [ pstate ] ;
269
269
if ( pc_off > 0 )
270
- caml_lex_run_mem ( tbl . lex_code , pc_off , lexbuf [ lex_mem ] , lexbuf [ lex_curr_pos ] ) ;
270
+ caml_lex_run_mem ( tbl . lex_code , pc_off , lexbuf [ lex_mem ] , lexbuf . lex_curr_pos ) ;
271
271
/* Erase the EOF condition only if the EOF pseudo-character was
272
272
consumed by the automaton (i.e. there was no backtrack above)
273
273
*/
274
274
if ( c == 256 )
275
- lexbuf [ lex_eof_reached ] = 0 ;
275
+ lexbuf . lex_eof_reached = 0 ;
276
276
}
277
277
}
278
278
} ) ;
0 commit comments