1 |
wakaba |
1.1 |
package What::HTML; |
2 |
|
|
use strict; |
3 |
wakaba |
1.2 |
our $VERSION=do{my @r=(q$Revision: 1.1 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
4 |
wakaba |
1.1 |
|
5 |
|
|
## This is a very, very early version of an HTML parser. |
6 |
|
|
|
7 |
|
|
my $permitted_slash_tag_name = { |
8 |
|
|
base => 1, |
9 |
|
|
link => 1, |
10 |
|
|
meta => 1, |
11 |
|
|
hr => 1, |
12 |
|
|
br => 1, |
13 |
|
|
img=> 1, |
14 |
|
|
embed => 1, |
15 |
|
|
param => 1, |
16 |
|
|
area => 1, |
17 |
|
|
col => 1, |
18 |
|
|
input => 1, |
19 |
|
|
}; |
20 |
|
|
|
21 |
|
|
sub new ($) { |
22 |
|
|
my $class = shift; |
23 |
|
|
my $self = bless {}, $class; |
24 |
|
|
$self->{set_next_input_character} = sub { |
25 |
|
|
$self->{next_input_character} = -1; |
26 |
|
|
}; |
27 |
|
|
$self->{parse_error} = sub { |
28 |
|
|
# |
29 |
|
|
}; |
30 |
|
|
return $self; |
31 |
|
|
} # new |
32 |
|
|
|
33 |
|
|
## Implementations MUST act as if state machine in the spec |
34 |
|
|
|
35 |
|
|
sub _initialize_tokenizer ($) { |
36 |
|
|
my $self = shift; |
37 |
|
|
$self->{state} = 'data'; # MUST |
38 |
|
|
$self->{content_model_flag} = 'PCDATA'; # be |
39 |
|
|
undef $self->{current_token}; # start tag, end tag, comment, or DOCTYPE |
40 |
|
|
undef $self->{current_attribute}; |
41 |
|
|
undef $self->{last_emitted_start_tag_name}; |
42 |
|
|
undef $self->{last_attribute_value_state}; |
43 |
|
|
$self->{char} = []; |
44 |
|
|
# $self->{next_input_character} |
45 |
|
|
|
46 |
|
|
if (@{$self->{char}}) { |
47 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
48 |
|
|
} else { |
49 |
|
|
$self->{set_next_input_character}->($self); |
50 |
|
|
} |
51 |
|
|
|
52 |
|
|
$self->{token} = []; |
53 |
|
|
} # _initialize_tokenizer |
54 |
|
|
|
55 |
|
|
## A token has: |
56 |
|
|
## ->{type} eq 'DOCTYPE', 'start tag', 'end tag', 'comment', |
57 |
|
|
## 'character', or 'end-of-file' |
58 |
|
|
## ->{name} (DOCTYPE, start tag (tagname), end tag (tagname)) |
59 |
|
|
## ISSUE: the spec need s/tagname/tag name/ |
60 |
|
|
## ->{error} == 1 or 0 (DOCTYPE) |
61 |
|
|
## ->{attributes} isa HASH (start tag, end tag) |
62 |
|
|
## ->{data} (comment, character) |
63 |
|
|
|
64 |
|
|
## Macros |
65 |
|
|
## Macros MUST be preceded by three EXCLAMATION MARKs. |
66 |
|
|
## emit ($token) |
67 |
|
|
## Emits the specified token. |
68 |
|
|
|
69 |
|
|
## Emitted token MUST immediately be handled by the tree construction state. |
70 |
|
|
|
71 |
|
|
## Before each step, UA MAY check to see if either one of the scripts in |
72 |
|
|
## "list of scripts that will execute as soon as possible" or the first |
73 |
|
|
## script in the "list of scripts that will execute asynchronously", |
74 |
|
|
## has completed loading. If one has, then it MUST be executed |
75 |
|
|
## and removed from the list. |
76 |
|
|
|
77 |
|
|
sub _get_next_token ($) { |
78 |
|
|
my $self = shift; |
79 |
|
|
if (@{$self->{token}}) { |
80 |
|
|
return shift @{$self->{token}}; |
81 |
|
|
} |
82 |
|
|
|
83 |
|
|
A: { |
84 |
|
|
if ($self->{state} eq 'data') { |
85 |
|
|
if ($self->{next_input_character} == 0x0026) { # & |
86 |
|
|
if ($self->{content_model_flag} eq 'PCDATA' or |
87 |
|
|
$self->{content_model_flag} eq 'RCDATA') { |
88 |
|
|
$self->{state} = 'entity data'; |
89 |
|
|
|
90 |
|
|
if (@{$self->{char}}) { |
91 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
92 |
|
|
} else { |
93 |
|
|
$self->{set_next_input_character}->($self); |
94 |
|
|
} |
95 |
|
|
|
96 |
|
|
redo A; |
97 |
|
|
} else { |
98 |
|
|
# |
99 |
|
|
} |
100 |
|
|
} elsif ($self->{next_input_character} == 0x003C) { # < |
101 |
|
|
if ($self->{content_model_flag} ne 'PLAINTEXT') { |
102 |
|
|
$self->{state} = 'tag open'; |
103 |
|
|
|
104 |
|
|
if (@{$self->{char}}) { |
105 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
106 |
|
|
} else { |
107 |
|
|
$self->{set_next_input_character}->($self); |
108 |
|
|
} |
109 |
|
|
|
110 |
|
|
redo A; |
111 |
|
|
} else { |
112 |
|
|
# |
113 |
|
|
} |
114 |
|
|
} elsif ($self->{next_input_character} == -1) { |
115 |
|
|
return ({type => 'end-of-file'}); |
116 |
|
|
last A; ## TODO: ok? |
117 |
|
|
} |
118 |
|
|
# Anything else |
119 |
|
|
my $token = {type => 'character', |
120 |
|
|
data => chr $self->{next_input_character}}; |
121 |
|
|
## Stay in the data state |
122 |
|
|
|
123 |
|
|
if (@{$self->{char}}) { |
124 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
125 |
|
|
} else { |
126 |
|
|
$self->{set_next_input_character}->($self); |
127 |
|
|
} |
128 |
|
|
|
129 |
|
|
|
130 |
|
|
return ($token); |
131 |
|
|
|
132 |
|
|
redo A; |
133 |
|
|
} elsif ($self->{state} eq 'entity data') { |
134 |
|
|
## (cannot happen in CDATA state) |
135 |
|
|
|
136 |
|
|
my $token = $self->_tokenize_attempt_to_consume_an_entity; |
137 |
|
|
|
138 |
|
|
$self->{state} = 'data'; |
139 |
|
|
# next-input-character is already done |
140 |
|
|
|
141 |
|
|
unless (defined $token) { |
142 |
|
|
return ({type => 'character', data => '&'}); |
143 |
|
|
} else { |
144 |
|
|
return ($token); |
145 |
|
|
} |
146 |
|
|
|
147 |
|
|
redo A; |
148 |
|
|
} elsif ($self->{state} eq 'tag open') { |
149 |
|
|
if ($self->{content_model_flag} eq 'RCDATA' or |
150 |
|
|
$self->{content_model_flag} eq 'CDATA') { |
151 |
|
|
if ($self->{next_input_character} == 0x002F) { # / |
152 |
|
|
|
153 |
|
|
if (@{$self->{char}}) { |
154 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
155 |
|
|
} else { |
156 |
|
|
$self->{set_next_input_character}->($self); |
157 |
|
|
} |
158 |
|
|
|
159 |
|
|
$self->{state} = 'close tag open'; |
160 |
|
|
redo A; |
161 |
|
|
} else { |
162 |
|
|
## reconsume |
163 |
|
|
$self->{state} = 'data'; |
164 |
|
|
|
165 |
|
|
return (type => 'character', data => {'/'}); |
166 |
|
|
|
167 |
|
|
redo A; |
168 |
|
|
} |
169 |
|
|
} elsif ($self->{content_model_flag} eq 'PCDATA') { |
170 |
|
|
if ($self->{next_input_character} == 0x0021) { # ! |
171 |
|
|
$self->{state} = 'markup declaration open'; |
172 |
|
|
|
173 |
|
|
if (@{$self->{char}}) { |
174 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
175 |
|
|
} else { |
176 |
|
|
$self->{set_next_input_character}->($self); |
177 |
|
|
} |
178 |
|
|
|
179 |
|
|
redo A; |
180 |
|
|
} elsif ($self->{next_input_character} == 0x002F) { # / |
181 |
|
|
$self->{state} = 'close tag open'; |
182 |
|
|
|
183 |
|
|
if (@{$self->{char}}) { |
184 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
185 |
|
|
} else { |
186 |
|
|
$self->{set_next_input_character}->($self); |
187 |
|
|
} |
188 |
|
|
|
189 |
|
|
redo A; |
190 |
|
|
} elsif (0x0041 <= $self->{next_input_character} and |
191 |
|
|
$self->{next_input_character} <= 0x005A) { # A..Z |
192 |
|
|
$self->{current_token} |
193 |
|
|
= {type => 'start tag', |
194 |
|
|
tag_name => chr ($self->{next_input_character} + 0x0020)}; |
195 |
|
|
$self->{state} = 'tag name'; |
196 |
|
|
|
197 |
|
|
if (@{$self->{char}}) { |
198 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
199 |
|
|
} else { |
200 |
|
|
$self->{set_next_input_character}->($self); |
201 |
|
|
} |
202 |
|
|
|
203 |
|
|
redo A; |
204 |
|
|
} elsif (0x0061 <= $self->{next_input_character} and |
205 |
|
|
$self->{next_input_character} <= 0x007A) { # a..z |
206 |
|
|
$self->{current_token} = {type => 'start tag', |
207 |
|
|
tag_name => chr ($self->{next_input_character})}; |
208 |
|
|
$self->{state} = 'tag name'; |
209 |
|
|
|
210 |
|
|
if (@{$self->{char}}) { |
211 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
212 |
|
|
} else { |
213 |
|
|
$self->{set_next_input_character}->($self); |
214 |
|
|
} |
215 |
|
|
|
216 |
|
|
redo A; |
217 |
|
|
} elsif ($self->{next_input_character} == 0x003E) { # > |
218 |
|
|
$self->{parse_error}->(); |
219 |
|
|
$self->{state} = 'data'; |
220 |
|
|
|
221 |
|
|
if (@{$self->{char}}) { |
222 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
223 |
|
|
} else { |
224 |
|
|
$self->{set_next_input_character}->($self); |
225 |
|
|
} |
226 |
|
|
|
227 |
|
|
|
228 |
|
|
return ({type => 'character', data => '>'}); |
229 |
|
|
|
230 |
|
|
redo A; |
231 |
|
|
} elsif ($self->{next_input_character} == 0x003F) { # ? |
232 |
|
|
$self->{parse_error}->(); |
233 |
|
|
$self->{state} = 'bogus comment'; |
234 |
|
|
## $self->{next_input_character} is intentionally left as is |
235 |
|
|
redo A; |
236 |
|
|
} else { |
237 |
|
|
$self->{parse_error}->(); |
238 |
|
|
$self->{state} = 'data'; |
239 |
|
|
## reconsume |
240 |
|
|
|
241 |
|
|
return ({type => 'character', data => '<'}); |
242 |
|
|
|
243 |
|
|
redo A; |
244 |
|
|
} |
245 |
|
|
} else { |
246 |
|
|
die "$0: $self->{content_model_flag}: Unknown content model flag"; |
247 |
|
|
} |
248 |
|
|
} elsif ($self->{state} eq 'close tag open') { |
249 |
|
|
if ($self->{content_model_flag} eq 'RCDATA' or |
250 |
|
|
$self->{content_model_flag} eq 'CDATA') { |
251 |
|
|
my @next_char; |
252 |
|
|
TAGNAME: for (my $i = 0; $i < length $self->{last_emitted_start_tag_name}; $i++) { |
253 |
|
|
push @next_char, $self->{next_input_character}; |
254 |
|
|
my $c = ord substr ($self->{last_emitted_start_tag_name}, $i, 1); |
255 |
|
|
my $C = 0x0061 <= $c && $c <= 0x007A ? $c - 0x0020 : $c; |
256 |
|
|
if ($self->{next_input_character} == $c or $self->{next_input_character} == $C) { |
257 |
|
|
|
258 |
|
|
if (@{$self->{char}}) { |
259 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
260 |
|
|
} else { |
261 |
|
|
$self->{set_next_input_character}->($self); |
262 |
|
|
} |
263 |
|
|
|
264 |
|
|
next TAGNAME; |
265 |
|
|
} else { |
266 |
|
|
$self->{parse_error}->(); |
267 |
|
|
$self->{next_input_character} = shift @next_char; # reconsume |
268 |
|
|
unshift @{$self->{char}}, (@next_char); |
269 |
|
|
$self->{state} = 'data'; |
270 |
|
|
|
271 |
|
|
return ({type => 'character', data => '</'}); |
272 |
|
|
|
273 |
|
|
redo A; |
274 |
|
|
} |
275 |
|
|
} |
276 |
|
|
|
277 |
|
|
unless ($self->{next_input_character} == 0x0009 or |
278 |
|
|
$self->{next_input_character} == 0x000A or |
279 |
|
|
$self->{next_input_character} == 0x000B or |
280 |
|
|
$self->{next_input_character} == 0x000C or |
281 |
|
|
$self->{next_input_character} == 0x0020 or |
282 |
|
|
$self->{next_input_character} == 0x003E or |
283 |
|
|
$self->{next_input_character} == 0x002F or |
284 |
|
|
$self->{next_input_character} == 0x003C or |
285 |
|
|
$self->{next_input_character} == -1) { |
286 |
|
|
$self->{parse_error}->(); |
287 |
|
|
$self->{next_input_character} = shift @next_char; # reconsume |
288 |
|
|
unshift @{$self->{char}}, (@next_char); |
289 |
|
|
$self->{state} = 'data'; |
290 |
|
|
|
291 |
|
|
return ({type => 'character', data => '</'}); |
292 |
|
|
|
293 |
|
|
redo A; |
294 |
|
|
} else { |
295 |
|
|
$self->{next_input_character} = shift @next_char; |
296 |
|
|
unshift @{$self->{char}}, (@next_char); |
297 |
|
|
# and consume... |
298 |
|
|
} |
299 |
|
|
} |
300 |
|
|
|
301 |
|
|
if (0x0041 <= $self->{next_input_character} and |
302 |
|
|
$self->{next_input_character} <= 0x005A) { # A..Z |
303 |
|
|
$self->{current_token} = {type => 'end tag', |
304 |
|
|
tag_name => chr ($self->{next_input_character} + 0x0020)}; |
305 |
|
|
$self->{state} = 'tag name'; |
306 |
|
|
|
307 |
|
|
if (@{$self->{char}}) { |
308 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
309 |
|
|
} else { |
310 |
|
|
$self->{set_next_input_character}->($self); |
311 |
|
|
} |
312 |
|
|
|
313 |
|
|
redo A; |
314 |
|
|
} elsif (0x0061 <= $self->{next_input_character} and |
315 |
|
|
$self->{next_input_character} <= 0x007A) { # a..z |
316 |
|
|
$self->{current_token} = {type => 'end tag', |
317 |
|
|
tag_name => chr ($self->{next_input_character})}; |
318 |
|
|
$self->{state} = 'tag name'; |
319 |
|
|
|
320 |
|
|
if (@{$self->{char}}) { |
321 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
322 |
|
|
} else { |
323 |
|
|
$self->{set_next_input_character}->($self); |
324 |
|
|
} |
325 |
|
|
|
326 |
|
|
redo A; |
327 |
|
|
} elsif ($self->{next_input_character} == 0x003E) { # > |
328 |
|
|
$self->{parse_error}->(); |
329 |
|
|
$self->{state} = 'data'; |
330 |
|
|
|
331 |
|
|
if (@{$self->{char}}) { |
332 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
333 |
|
|
} else { |
334 |
|
|
$self->{set_next_input_character}->($self); |
335 |
|
|
} |
336 |
|
|
|
337 |
|
|
redo A; |
338 |
|
|
} elsif ($self->{next_input_character} == -1) { |
339 |
|
|
$self->{parse_error}->(); |
340 |
|
|
$self->{state} = 'data'; |
341 |
|
|
# reconsume |
342 |
|
|
|
343 |
|
|
return ({type => 'character', data => '</'}); |
344 |
|
|
|
345 |
|
|
redo A; |
346 |
|
|
} else { |
347 |
|
|
$self->{parse_error}->(); |
348 |
|
|
$self->{state} = 'bogus comment'; |
349 |
|
|
## $self->{next_input_character} is intentionally left as is |
350 |
|
|
redo A; |
351 |
|
|
} |
352 |
|
|
} elsif ($self->{state} eq 'tag name') { |
353 |
|
|
if ($self->{next_input_character} == 0x0009 or # HT |
354 |
|
|
$self->{next_input_character} == 0x000A or # LF |
355 |
|
|
$self->{next_input_character} == 0x000B or # VT |
356 |
|
|
$self->{next_input_character} == 0x000C or # FF |
357 |
|
|
$self->{next_input_character} == 0x0020) { # SP |
358 |
|
|
$self->{state} = 'before attribute name'; |
359 |
|
|
|
360 |
|
|
if (@{$self->{char}}) { |
361 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
362 |
|
|
} else { |
363 |
|
|
$self->{set_next_input_character}->($self); |
364 |
|
|
} |
365 |
|
|
|
366 |
|
|
redo A; |
367 |
|
|
} elsif ($self->{next_input_character} == 0x003E) { # > |
368 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
369 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
370 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
371 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
372 |
|
|
if ($self->{current_token}->{attribute}) { |
373 |
|
|
$self->{parse_error}->(); |
374 |
|
|
} |
375 |
|
|
} else { |
376 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
377 |
|
|
} |
378 |
|
|
$self->{state} = 'data'; |
379 |
|
|
|
380 |
|
|
if (@{$self->{char}}) { |
381 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
382 |
|
|
} else { |
383 |
|
|
$self->{set_next_input_character}->($self); |
384 |
|
|
} |
385 |
|
|
|
386 |
|
|
|
387 |
|
|
return ($self->{current_token}); # start tag or end tag |
388 |
|
|
undef $self->{current_token}; |
389 |
|
|
|
390 |
|
|
redo A; |
391 |
|
|
} elsif (0x0041 <= $self->{next_input_character} and |
392 |
|
|
$self->{next_input_character} <= 0x005A) { # A..Z |
393 |
|
|
$self->{current_token}->{tag_name} .= chr ($self->{next_input_character} + 0x0020); |
394 |
|
|
# start tag or end tag |
395 |
|
|
## Stay in this state |
396 |
|
|
|
397 |
|
|
if (@{$self->{char}}) { |
398 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
399 |
|
|
} else { |
400 |
|
|
$self->{set_next_input_character}->($self); |
401 |
|
|
} |
402 |
|
|
|
403 |
|
|
redo A; |
404 |
|
|
} elsif ($self->{next_input_character} == 0x003C or # < |
405 |
|
|
$self->{next_input_character} == -1) { |
406 |
|
|
$self->{parse_error}->(); |
407 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
408 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
409 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
410 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
411 |
|
|
if ($self->{current_token}->{attribute}) { |
412 |
|
|
$self->{parse_error}->(); |
413 |
|
|
} |
414 |
|
|
} else { |
415 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
416 |
|
|
} |
417 |
|
|
$self->{state} = 'data'; |
418 |
|
|
# reconsume |
419 |
|
|
|
420 |
|
|
return ($self->{current_token}); # start tag or end tag |
421 |
|
|
undef $self->{current_token}; |
422 |
|
|
|
423 |
|
|
redo A; |
424 |
|
|
} elsif ($self->{next_input_character} == 0x002F) { # / |
425 |
|
|
|
426 |
|
|
if (@{$self->{char}}) { |
427 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
428 |
|
|
} else { |
429 |
|
|
$self->{set_next_input_character}->($self); |
430 |
|
|
} |
431 |
|
|
|
432 |
|
|
if ($self->{next_input_character} == 0x003E and # > |
433 |
|
|
$self->{current_token}->{type} eq 'start tag' and |
434 |
|
|
$permitted_slash_tag_name->{$self->{current_token}->{tag_name}}) { |
435 |
|
|
# permitted slash |
436 |
|
|
# |
437 |
|
|
} else { |
438 |
|
|
$self->{parse_error}->(); |
439 |
|
|
} |
440 |
|
|
$self->{state} = 'before attribute name'; |
441 |
|
|
# next-input-character is already done |
442 |
|
|
redo A; |
443 |
|
|
} else { |
444 |
|
|
$self->{current_token}->{tag_name} .= chr $self->{next_input_character}; |
445 |
|
|
# start tag or end tag |
446 |
|
|
## Stay in the state |
447 |
|
|
|
448 |
|
|
if (@{$self->{char}}) { |
449 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
450 |
|
|
} else { |
451 |
|
|
$self->{set_next_input_character}->($self); |
452 |
|
|
} |
453 |
|
|
|
454 |
|
|
redo A; |
455 |
|
|
} |
456 |
|
|
} elsif ($self->{state} eq 'before attribute name') { |
457 |
|
|
if ($self->{next_input_character} == 0x0009 or # HT |
458 |
|
|
$self->{next_input_character} == 0x000A or # LF |
459 |
|
|
$self->{next_input_character} == 0x000B or # VT |
460 |
|
|
$self->{next_input_character} == 0x000C or # FF |
461 |
|
|
$self->{next_input_character} == 0x0020) { # SP |
462 |
|
|
## Stay in the state |
463 |
|
|
|
464 |
|
|
if (@{$self->{char}}) { |
465 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
466 |
|
|
} else { |
467 |
|
|
$self->{set_next_input_character}->($self); |
468 |
|
|
} |
469 |
|
|
|
470 |
|
|
redo A; |
471 |
|
|
} elsif ($self->{next_input_character} == 0x003E) { # > |
472 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
473 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
474 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
475 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
476 |
|
|
if ($self->{current_token}->{attribute}) { |
477 |
|
|
$self->{parse_error}->(); |
478 |
|
|
} |
479 |
|
|
} else { |
480 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
481 |
|
|
} |
482 |
|
|
$self->{state} = 'data'; |
483 |
|
|
|
484 |
|
|
if (@{$self->{char}}) { |
485 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
486 |
|
|
} else { |
487 |
|
|
$self->{set_next_input_character}->($self); |
488 |
|
|
} |
489 |
|
|
|
490 |
|
|
|
491 |
|
|
return ($self->{current_token}); # start tag or end tag |
492 |
|
|
undef $self->{current_token}; |
493 |
|
|
|
494 |
|
|
redo A; |
495 |
|
|
} elsif (0x0041 <= $self->{next_input_character} and |
496 |
|
|
$self->{next_input_character} <= 0x005A) { # A..Z |
497 |
|
|
$self->{current_attribute} = {name => chr ($self->{next_input_character} + 0x0020), |
498 |
|
|
value => ''}; |
499 |
|
|
$self->{state} = 'attribute name'; |
500 |
|
|
|
501 |
|
|
if (@{$self->{char}}) { |
502 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
503 |
|
|
} else { |
504 |
|
|
$self->{set_next_input_character}->($self); |
505 |
|
|
} |
506 |
|
|
|
507 |
|
|
redo A; |
508 |
|
|
} elsif ($self->{next_input_character} == 0x002F) { # / |
509 |
|
|
|
510 |
|
|
if (@{$self->{char}}) { |
511 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
512 |
|
|
} else { |
513 |
|
|
$self->{set_next_input_character}->($self); |
514 |
|
|
} |
515 |
|
|
|
516 |
|
|
if ($self->{next_input_character} == 0x003E and # > |
517 |
|
|
$self->{current_token}->{type} eq 'start tag' and |
518 |
|
|
$permitted_slash_tag_name->{$self->{current_token}->{tag_name}}) { |
519 |
|
|
# permitted slash |
520 |
|
|
# |
521 |
|
|
} else { |
522 |
|
|
$self->{parse_error}->(); |
523 |
|
|
} |
524 |
|
|
## Stay in the state |
525 |
|
|
# next-input-character is already done |
526 |
|
|
redo A; |
527 |
|
|
} elsif ($self->{next_input_character} == 0x003C or # < |
528 |
|
|
$self->{next_input_character} == -1) { |
529 |
|
|
$self->{parse_error}->(); |
530 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
531 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
532 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
533 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
534 |
|
|
if ($self->{current_token}->{attribute}) { |
535 |
|
|
$self->{parse_error}->(); |
536 |
|
|
} |
537 |
|
|
} else { |
538 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
539 |
|
|
} |
540 |
|
|
$self->{state} = 'data'; |
541 |
|
|
# reconsume |
542 |
|
|
|
543 |
|
|
return ($self->{current_token}); # start tag or end tag |
544 |
|
|
undef $self->{current_token}; |
545 |
|
|
|
546 |
|
|
redo A; |
547 |
|
|
} else { |
548 |
|
|
$self->{current_attribute} = {name => chr ($self->{next_input_character}), |
549 |
|
|
value => ''}; |
550 |
|
|
$self->{state} = 'attribute name'; |
551 |
|
|
|
552 |
|
|
if (@{$self->{char}}) { |
553 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
554 |
|
|
} else { |
555 |
|
|
$self->{set_next_input_character}->($self); |
556 |
|
|
} |
557 |
|
|
|
558 |
|
|
redo A; |
559 |
|
|
} |
560 |
|
|
} elsif ($self->{state} eq 'attribute name') { |
561 |
|
|
my $before_leave = sub { |
562 |
|
|
if (exists $self->{current_token}->{attribute} # start tag or end tag |
563 |
|
|
->{$self->{current_attribute}->{name}}) { # MUST |
564 |
|
|
$self->{parse_error}->(); |
565 |
|
|
## Discard $self->{current_attribute} # MUST |
566 |
|
|
} else { |
567 |
|
|
$self->{current_token}->{attribute}->{$self->{current_attribute}->{name}} |
568 |
|
|
= $self->{current_attribute}; |
569 |
|
|
} |
570 |
|
|
undef $self->{current_attribute}; |
571 |
|
|
}; # $before_leave |
572 |
|
|
|
573 |
|
|
if ($self->{next_input_character} == 0x0009 or # HT |
574 |
|
|
$self->{next_input_character} == 0x000A or # LF |
575 |
|
|
$self->{next_input_character} == 0x000B or # VT |
576 |
|
|
$self->{next_input_character} == 0x000C or # FF |
577 |
|
|
$self->{next_input_character} == 0x0020) { # SP |
578 |
|
|
$before_leave->(); |
579 |
|
|
$self->{state} = 'after attribute name'; |
580 |
|
|
|
581 |
|
|
if (@{$self->{char}}) { |
582 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
583 |
|
|
} else { |
584 |
|
|
$self->{set_next_input_character}->($self); |
585 |
|
|
} |
586 |
|
|
|
587 |
|
|
redo A; |
588 |
|
|
} elsif ($self->{next_input_character} == 0x003D) { # = |
589 |
|
|
$before_leave->(); |
590 |
|
|
$self->{state} = 'before attribute value'; |
591 |
|
|
|
592 |
|
|
if (@{$self->{char}}) { |
593 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
594 |
|
|
} else { |
595 |
|
|
$self->{set_next_input_character}->($self); |
596 |
|
|
} |
597 |
|
|
|
598 |
|
|
redo A; |
599 |
|
|
} elsif ($self->{next_input_character} == 0x003E) { # > |
600 |
|
|
$before_leave->(); |
601 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
602 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
603 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
604 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
605 |
|
|
if ($self->{current_token}->{attribute}) { |
606 |
|
|
$self->{parse_error}->(); |
607 |
|
|
} |
608 |
|
|
} else { |
609 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
610 |
|
|
} |
611 |
|
|
$self->{state} = 'data'; |
612 |
|
|
|
613 |
|
|
if (@{$self->{char}}) { |
614 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
615 |
|
|
} else { |
616 |
|
|
$self->{set_next_input_character}->($self); |
617 |
|
|
} |
618 |
|
|
|
619 |
|
|
|
620 |
|
|
return ($self->{current_token}); # start tag or end tag |
621 |
|
|
undef $self->{current_token}; |
622 |
|
|
|
623 |
|
|
redo A; |
624 |
|
|
} elsif (0x0041 <= $self->{next_input_character} and |
625 |
|
|
$self->{next_input_character} <= 0x005A) { # A..Z |
626 |
|
|
$self->{current_attribute}->{name} .= chr ($self->{next_input_character} + 0x0020); |
627 |
|
|
## Stay in the state |
628 |
|
|
|
629 |
|
|
if (@{$self->{char}}) { |
630 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
631 |
|
|
} else { |
632 |
|
|
$self->{set_next_input_character}->($self); |
633 |
|
|
} |
634 |
|
|
|
635 |
|
|
redo A; |
636 |
|
|
} elsif ($self->{next_input_character} == 0x002F) { # / |
637 |
|
|
$before_leave->(); |
638 |
|
|
|
639 |
|
|
if (@{$self->{char}}) { |
640 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
641 |
|
|
} else { |
642 |
|
|
$self->{set_next_input_character}->($self); |
643 |
|
|
} |
644 |
|
|
|
645 |
|
|
if ($self->{next_input_character} == 0x003E and # > |
646 |
|
|
$self->{current_token}->{type} eq 'start tag' and |
647 |
|
|
$permitted_slash_tag_name->{$self->{current_token}->{tag_name}}) { |
648 |
|
|
# permitted slash |
649 |
|
|
# |
650 |
|
|
} else { |
651 |
|
|
$self->{parse_error}->(); |
652 |
|
|
} |
653 |
|
|
$self->{state} = 'before attribute name'; |
654 |
|
|
# next-input-character is already done |
655 |
|
|
redo A; |
656 |
|
|
} elsif ($self->{next_input_character} == 0x003C or # < |
657 |
|
|
$self->{next_input_character} == -1) { |
658 |
|
|
$self->{parse_error}->(); |
659 |
|
|
$before_leave->(); |
660 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
661 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
662 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
663 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
664 |
|
|
if ($self->{current_token}->{attribute}) { |
665 |
|
|
$self->{parse_error}->(); |
666 |
|
|
} |
667 |
|
|
} else { |
668 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
669 |
|
|
} |
670 |
|
|
$self->{state} = 'data'; |
671 |
|
|
# reconsume |
672 |
|
|
|
673 |
|
|
return ($self->{current_token}); # start tag or end tag |
674 |
|
|
undef $self->{current_token}; |
675 |
|
|
|
676 |
|
|
redo A; |
677 |
|
|
} else { |
678 |
|
|
$self->{current_attribute}->{name} .= chr ($self->{next_input_character}); |
679 |
|
|
## Stay in the state |
680 |
|
|
|
681 |
|
|
if (@{$self->{char}}) { |
682 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
683 |
|
|
} else { |
684 |
|
|
$self->{set_next_input_character}->($self); |
685 |
|
|
} |
686 |
|
|
|
687 |
|
|
redo A; |
688 |
|
|
} |
689 |
|
|
} elsif ($self->{state} eq 'after attribute name') { |
690 |
|
|
if ($self->{next_input_character} == 0x0009 or # HT |
691 |
|
|
$self->{next_input_character} == 0x000A or # LF |
692 |
|
|
$self->{next_input_character} == 0x000B or # VT |
693 |
|
|
$self->{next_input_character} == 0x000C or # FF |
694 |
|
|
$self->{next_input_character} == 0x0020) { # SP |
695 |
|
|
## Stay in the state |
696 |
|
|
|
697 |
|
|
if (@{$self->{char}}) { |
698 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
699 |
|
|
} else { |
700 |
|
|
$self->{set_next_input_character}->($self); |
701 |
|
|
} |
702 |
|
|
|
703 |
|
|
redo A; |
704 |
|
|
} elsif ($self->{next_input_character} == 0x003D) { # = |
705 |
|
|
$self->{state} = 'before attribute value'; |
706 |
|
|
|
707 |
|
|
if (@{$self->{char}}) { |
708 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
709 |
|
|
} else { |
710 |
|
|
$self->{set_next_input_character}->($self); |
711 |
|
|
} |
712 |
|
|
|
713 |
|
|
redo A; |
714 |
|
|
} elsif ($self->{next_input_character} == 0x003E) { # > |
715 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
716 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
717 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
718 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
719 |
|
|
if ($self->{current_token}->{attribute}) { |
720 |
|
|
$self->{parse_error}->(); |
721 |
|
|
} |
722 |
|
|
} else { |
723 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
724 |
|
|
} |
725 |
|
|
$self->{state} = 'data'; |
726 |
|
|
|
727 |
|
|
if (@{$self->{char}}) { |
728 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
729 |
|
|
} else { |
730 |
|
|
$self->{set_next_input_character}->($self); |
731 |
|
|
} |
732 |
|
|
|
733 |
|
|
|
734 |
|
|
return ($self->{current_token}); # start tag or end tag |
735 |
|
|
undef $self->{current_token}; |
736 |
|
|
|
737 |
|
|
redo A; |
738 |
|
|
} elsif (0x0041 <= $self->{next_input_character} and |
739 |
|
|
$self->{next_input_character} <= 0x005A) { # A..Z |
740 |
|
|
$self->{current_attribute} = {name => chr ($self->{next_input_character} + 0x0020), |
741 |
|
|
value => ''}; |
742 |
|
|
$self->{state} = 'attribute name'; |
743 |
|
|
|
744 |
|
|
if (@{$self->{char}}) { |
745 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
746 |
|
|
} else { |
747 |
|
|
$self->{set_next_input_character}->($self); |
748 |
|
|
} |
749 |
|
|
|
750 |
|
|
redo A; |
751 |
|
|
} elsif ($self->{next_input_character} == 0x002F) { # / |
752 |
|
|
|
753 |
|
|
if (@{$self->{char}}) { |
754 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
755 |
|
|
} else { |
756 |
|
|
$self->{set_next_input_character}->($self); |
757 |
|
|
} |
758 |
|
|
|
759 |
|
|
if ($self->{next_input_character} == 0x003E and # > |
760 |
|
|
$self->{current_token}->{type} eq 'start tag' and |
761 |
|
|
$permitted_slash_tag_name->{$self->{current_token}->{tag_name}}) { |
762 |
|
|
# permitted slash |
763 |
|
|
# |
764 |
|
|
} else { |
765 |
|
|
$self->{parse_error}->(); |
766 |
|
|
} |
767 |
|
|
$self->{state} = 'before attribute name'; |
768 |
|
|
# next-input-character is already done |
769 |
|
|
redo A; |
770 |
|
|
} elsif ($self->{next_input_character} == 0x003C or # < |
771 |
|
|
$self->{next_input_character} == -1) { |
772 |
|
|
$self->{parse_error}->(); |
773 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
774 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
775 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
776 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
777 |
|
|
if ($self->{current_token}->{attribute}) { |
778 |
|
|
$self->{parse_error}->(); |
779 |
|
|
} |
780 |
|
|
} else { |
781 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
782 |
|
|
} |
783 |
|
|
$self->{state} = 'data'; |
784 |
|
|
# reconsume |
785 |
|
|
|
786 |
|
|
return ($self->{current_token}); # start tag or end tag |
787 |
|
|
undef $self->{current_token}; |
788 |
|
|
|
789 |
|
|
redo A; |
790 |
|
|
} else { |
791 |
|
|
$self->{current_attribute} = {name => chr ($self->{next_input_character}), |
792 |
|
|
value => ''}; |
793 |
|
|
$self->{state} = 'attribute name'; |
794 |
|
|
|
795 |
|
|
if (@{$self->{char}}) { |
796 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
797 |
|
|
} else { |
798 |
|
|
$self->{set_next_input_character}->($self); |
799 |
|
|
} |
800 |
|
|
|
801 |
|
|
redo A; |
802 |
|
|
} |
803 |
|
|
} elsif ($self->{state} eq 'before attribute value') { |
804 |
|
|
if ($self->{next_input_character} == 0x0009 or # HT |
805 |
|
|
$self->{next_input_character} == 0x000A or # LF |
806 |
|
|
$self->{next_input_character} == 0x000B or # VT |
807 |
|
|
$self->{next_input_character} == 0x000C or # FF |
808 |
|
|
$self->{next_input_character} == 0x0020) { # SP |
809 |
|
|
## Stay in the state |
810 |
|
|
|
811 |
|
|
if (@{$self->{char}}) { |
812 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
813 |
|
|
} else { |
814 |
|
|
$self->{set_next_input_character}->($self); |
815 |
|
|
} |
816 |
|
|
|
817 |
|
|
redo A; |
818 |
|
|
} elsif ($self->{next_input_character} == 0x0022) { # " |
819 |
|
|
$self->{state} = 'attribute value (double-quoted)'; |
820 |
|
|
|
821 |
|
|
if (@{$self->{char}}) { |
822 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
823 |
|
|
} else { |
824 |
|
|
$self->{set_next_input_character}->($self); |
825 |
|
|
} |
826 |
|
|
|
827 |
|
|
redo A; |
828 |
|
|
} elsif ($self->{next_input_character} == 0x0026) { # & |
829 |
|
|
$self->{state} = 'attribute value (unquoted)'; |
830 |
|
|
## reconsume |
831 |
|
|
redo A; |
832 |
|
|
} elsif ($self->{next_input_character} == 0x0027) { # ' |
833 |
|
|
$self->{state} = 'attribute value (single-quoted)'; |
834 |
|
|
|
835 |
|
|
if (@{$self->{char}}) { |
836 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
837 |
|
|
} else { |
838 |
|
|
$self->{set_next_input_character}->($self); |
839 |
|
|
} |
840 |
|
|
|
841 |
|
|
redo A; |
842 |
|
|
} elsif ($self->{next_input_character} == 0x003E) { # > |
843 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
844 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
845 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
846 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
847 |
|
|
if ($self->{current_token}->{attribute}) { |
848 |
|
|
$self->{parse_error}->(); |
849 |
|
|
} |
850 |
|
|
} else { |
851 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
852 |
|
|
} |
853 |
|
|
$self->{state} = 'data'; |
854 |
|
|
|
855 |
|
|
if (@{$self->{char}}) { |
856 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
857 |
|
|
} else { |
858 |
|
|
$self->{set_next_input_character}->($self); |
859 |
|
|
} |
860 |
|
|
|
861 |
|
|
|
862 |
|
|
return ($self->{current_token}); # start tag or end tag |
863 |
|
|
undef $self->{current_token}; |
864 |
|
|
|
865 |
|
|
redo A; |
866 |
|
|
} elsif ($self->{next_input_character} == 0x003C or # < |
867 |
|
|
$self->{next_input_character} == -1) { |
868 |
|
|
$self->{parse_error}->(); |
869 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
870 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
871 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
872 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
873 |
|
|
if ($self->{current_token}->{attribute}) { |
874 |
|
|
$self->{parse_error}->(); |
875 |
|
|
} |
876 |
|
|
} else { |
877 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
878 |
|
|
} |
879 |
|
|
$self->{state} = 'data'; |
880 |
|
|
## reconsume |
881 |
|
|
|
882 |
|
|
return ($self->{current_token}); # start tag or end tag |
883 |
|
|
undef $self->{current_token}; |
884 |
|
|
|
885 |
|
|
redo A; |
886 |
|
|
} else { |
887 |
|
|
$self->{current_attribute}->{value} .= chr ($self->{next_input_character}); |
888 |
|
|
$self->{state} = 'attribute value (unquoted)'; |
889 |
|
|
|
890 |
|
|
if (@{$self->{char}}) { |
891 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
892 |
|
|
} else { |
893 |
|
|
$self->{set_next_input_character}->($self); |
894 |
|
|
} |
895 |
|
|
|
896 |
|
|
redo A; |
897 |
|
|
} |
898 |
|
|
} elsif ($self->{state} eq 'attribute value (double-quoted)') { |
899 |
|
|
if ($self->{next_input_character} == 0x0022) { # " |
900 |
|
|
$self->{state} = 'before attribute name'; |
901 |
|
|
|
902 |
|
|
if (@{$self->{char}}) { |
903 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
904 |
|
|
} else { |
905 |
|
|
$self->{set_next_input_character}->($self); |
906 |
|
|
} |
907 |
|
|
|
908 |
|
|
redo A; |
909 |
|
|
} elsif ($self->{next_input_character} == 0x0026) { # & |
910 |
|
|
$self->{last_attribute_value_state} = 'attribute value (double-quoted)'; |
911 |
|
|
$self->{state} = 'entity in attribute value'; |
912 |
|
|
|
913 |
|
|
if (@{$self->{char}}) { |
914 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
915 |
|
|
} else { |
916 |
|
|
$self->{set_next_input_character}->($self); |
917 |
|
|
} |
918 |
|
|
|
919 |
|
|
redo A; |
920 |
|
|
} elsif ($self->{next_input_character} == -1) { |
921 |
|
|
$self->{parse_error}->(); |
922 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
923 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
924 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
925 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
926 |
|
|
if ($self->{current_token}->{attribute}) { |
927 |
|
|
$self->{parse_error}->(); |
928 |
|
|
} |
929 |
|
|
} else { |
930 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
931 |
|
|
} |
932 |
|
|
$self->{state} = 'data'; |
933 |
|
|
## reconsume |
934 |
|
|
|
935 |
|
|
return ($self->{current_token}); # start tag or end tag |
936 |
|
|
undef $self->{current_token}; |
937 |
|
|
|
938 |
|
|
redo A; |
939 |
|
|
} else { |
940 |
|
|
$self->{current_attribute}->{value} .= chr ($self->{next_input_character}); |
941 |
|
|
## Stay in the state |
942 |
|
|
|
943 |
|
|
if (@{$self->{char}}) { |
944 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
945 |
|
|
} else { |
946 |
|
|
$self->{set_next_input_character}->($self); |
947 |
|
|
} |
948 |
|
|
|
949 |
|
|
redo A; |
950 |
|
|
} |
951 |
|
|
} elsif ($self->{state} eq 'attribute value (single-quoted)') { |
952 |
|
|
if ($self->{next_input_character} == 0x0027) { # ' |
953 |
|
|
$self->{state} = 'before attribute name'; |
954 |
|
|
|
955 |
|
|
if (@{$self->{char}}) { |
956 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
957 |
|
|
} else { |
958 |
|
|
$self->{set_next_input_character}->($self); |
959 |
|
|
} |
960 |
|
|
|
961 |
|
|
redo A; |
962 |
|
|
} elsif ($self->{next_input_character} == 0x0026) { # & |
963 |
|
|
$self->{last_attribute_value_state} = 'attribute value (single-quoted)'; |
964 |
|
|
$self->{state} = 'entity in attribute value'; |
965 |
|
|
|
966 |
|
|
if (@{$self->{char}}) { |
967 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
968 |
|
|
} else { |
969 |
|
|
$self->{set_next_input_character}->($self); |
970 |
|
|
} |
971 |
|
|
|
972 |
|
|
redo A; |
973 |
|
|
} elsif ($self->{next_input_character} == -1) { |
974 |
|
|
$self->{parse_error}->(); |
975 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
976 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
977 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
978 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
979 |
|
|
if ($self->{current_token}->{attribute}) { |
980 |
|
|
$self->{parse_error}->(); |
981 |
|
|
} |
982 |
|
|
} else { |
983 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
984 |
|
|
} |
985 |
|
|
$self->{state} = 'data'; |
986 |
|
|
## reconsume |
987 |
|
|
|
988 |
|
|
return ($self->{current_token}); # start tag or end tag |
989 |
|
|
undef $self->{current_token}; |
990 |
|
|
|
991 |
|
|
redo A; |
992 |
|
|
} else { |
993 |
|
|
$self->{current_attribute}->{value} .= chr ($self->{next_input_character}); |
994 |
|
|
## Stay in the state |
995 |
|
|
|
996 |
|
|
if (@{$self->{char}}) { |
997 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
998 |
|
|
} else { |
999 |
|
|
$self->{set_next_input_character}->($self); |
1000 |
|
|
} |
1001 |
|
|
|
1002 |
|
|
redo A; |
1003 |
|
|
} |
1004 |
|
|
} elsif ($self->{state} eq 'attribute value (unquoted)') { |
1005 |
|
|
if ($self->{next_input_character} == 0x0009 or # HT |
1006 |
|
|
$self->{next_input_character} == 0x000A or # LF |
1007 |
|
|
$self->{next_input_character} == 0x000B or # HT |
1008 |
|
|
$self->{next_input_character} == 0x000C or # FF |
1009 |
|
|
$self->{next_input_character} == 0x0020) { # SP |
1010 |
|
|
$self->{state} = 'before attribute name'; |
1011 |
|
|
|
1012 |
|
|
if (@{$self->{char}}) { |
1013 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1014 |
|
|
} else { |
1015 |
|
|
$self->{set_next_input_character}->($self); |
1016 |
|
|
} |
1017 |
|
|
|
1018 |
|
|
redo A; |
1019 |
|
|
} elsif ($self->{next_input_character} == 0x0026) { # & |
1020 |
|
|
$self->{last_attribute_value_state} = 'attribute value (unquoted)'; |
1021 |
|
|
$self->{state} = 'entity in attribute value'; |
1022 |
|
|
|
1023 |
|
|
if (@{$self->{char}}) { |
1024 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1025 |
|
|
} else { |
1026 |
|
|
$self->{set_next_input_character}->($self); |
1027 |
|
|
} |
1028 |
|
|
|
1029 |
|
|
redo A; |
1030 |
|
|
} elsif ($self->{next_input_character} == 0x003E) { # > |
1031 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
1032 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
1033 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
1034 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
1035 |
|
|
if ($self->{current_token}->{attribute}) { |
1036 |
|
|
$self->{parse_error}->(); |
1037 |
|
|
} |
1038 |
|
|
} else { |
1039 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
1040 |
|
|
} |
1041 |
|
|
$self->{state} = 'data'; |
1042 |
|
|
|
1043 |
|
|
if (@{$self->{char}}) { |
1044 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1045 |
|
|
} else { |
1046 |
|
|
$self->{set_next_input_character}->($self); |
1047 |
|
|
} |
1048 |
|
|
|
1049 |
|
|
|
1050 |
|
|
return ($self->{current_token}); # start tag or end tag |
1051 |
|
|
undef $self->{current_token}; |
1052 |
|
|
|
1053 |
|
|
redo A; |
1054 |
|
|
} elsif ($self->{next_input_character} == 0x003C or # < |
1055 |
|
|
$self->{next_input_character} == -1) { |
1056 |
|
|
$self->{parse_error}->(); |
1057 |
|
|
if ($self->{current_token}->{type} eq 'start tag') { |
1058 |
|
|
$self->{last_emitted_start_tag_name} = $self->{current_token}->{tag_name}; |
1059 |
|
|
} elsif ($self->{current_token}->{type} eq 'end tag') { |
1060 |
|
|
$self->{content_model_flag} = 'PCDATA'; # MUST |
1061 |
|
|
if ($self->{current_token}->{attribute}) { |
1062 |
|
|
$self->{parse_error}->(); |
1063 |
|
|
} |
1064 |
|
|
} else { |
1065 |
|
|
die "$0: $self->{current_token}->{type}: Unknown token type"; |
1066 |
|
|
} |
1067 |
|
|
$self->{state} = 'data'; |
1068 |
|
|
## reconsume |
1069 |
|
|
|
1070 |
|
|
return ($self->{current_token}); # start tag or end tag |
1071 |
|
|
undef $self->{current_token}; |
1072 |
|
|
|
1073 |
|
|
redo A; |
1074 |
|
|
} else { |
1075 |
|
|
$self->{current_attribute}->{value} .= chr ($self->{next_input_character}); |
1076 |
|
|
## Stay in the state |
1077 |
|
|
|
1078 |
|
|
if (@{$self->{char}}) { |
1079 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1080 |
|
|
} else { |
1081 |
|
|
$self->{set_next_input_character}->($self); |
1082 |
|
|
} |
1083 |
|
|
|
1084 |
|
|
redo A; |
1085 |
|
|
} |
1086 |
|
|
} elsif ($self->{state} eq 'entity in attribute value') { |
1087 |
|
|
my $token = $self->_tokenize_attempt_to_consume_an_entity; |
1088 |
|
|
|
1089 |
|
|
unless (defined $token) { |
1090 |
|
|
$self->{current_attribute}->{value} .= '&'; |
1091 |
|
|
} else { |
1092 |
|
|
$self->{current_attribute}->{value} .= $token->{data}; |
1093 |
|
|
## ISSUE: spec says "append the returned character token to the current attribute's value" |
1094 |
|
|
} |
1095 |
|
|
|
1096 |
|
|
$self->{state} = $self->{last_attribute_value_state}; |
1097 |
|
|
# next-input-character is already done |
1098 |
|
|
redo A; |
1099 |
|
|
} elsif ($self->{state} eq 'bogus comment') { |
1100 |
|
|
## (only happen if PCDATA state) |
1101 |
|
|
|
1102 |
|
|
my $token = {type => 'comment', data => ''}; |
1103 |
|
|
|
1104 |
|
|
BC: { |
1105 |
|
|
if ($self->{next_input_character} == 0x003E) { # > |
1106 |
|
|
$self->{state} = 'data'; |
1107 |
|
|
|
1108 |
|
|
if (@{$self->{char}}) { |
1109 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1110 |
|
|
} else { |
1111 |
|
|
$self->{set_next_input_character}->($self); |
1112 |
|
|
} |
1113 |
|
|
|
1114 |
|
|
|
1115 |
|
|
return ($token); |
1116 |
|
|
|
1117 |
|
|
redo A; |
1118 |
|
|
} elsif ($self->{next_input_character} == -1) { |
1119 |
|
|
$self->{state} = 'data'; |
1120 |
|
|
## reconsume |
1121 |
|
|
|
1122 |
|
|
return ($token); |
1123 |
|
|
|
1124 |
|
|
redo A; |
1125 |
|
|
} else { |
1126 |
|
|
$token->{data} .= chr ($self->{next_input_character}); |
1127 |
|
|
|
1128 |
|
|
if (@{$self->{char}}) { |
1129 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1130 |
|
|
} else { |
1131 |
|
|
$self->{set_next_input_character}->($self); |
1132 |
|
|
} |
1133 |
|
|
|
1134 |
|
|
redo BC; |
1135 |
|
|
} |
1136 |
|
|
} # BC |
1137 |
|
|
} elsif ($self->{state} eq 'markup declaration open') { |
1138 |
|
|
## (only happen if PCDATA state) |
1139 |
|
|
|
1140 |
|
|
my @next_char; |
1141 |
|
|
push @next_char, $self->{next_input_character}; |
1142 |
|
|
|
1143 |
|
|
if ($self->{next_input_character} == 0x002D) { # - |
1144 |
|
|
|
1145 |
|
|
if (@{$self->{char}}) { |
1146 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1147 |
|
|
} else { |
1148 |
|
|
$self->{set_next_input_character}->($self); |
1149 |
|
|
} |
1150 |
|
|
|
1151 |
|
|
push @next_char, $self->{next_input_character}; |
1152 |
|
|
if ($self->{next_input_character} == 0x002D) { # - |
1153 |
|
|
$self->{current_token} = {type => 'comment', data => ''}; |
1154 |
|
|
$self->{state} = 'comment'; |
1155 |
|
|
|
1156 |
|
|
if (@{$self->{char}}) { |
1157 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1158 |
|
|
} else { |
1159 |
|
|
$self->{set_next_input_character}->($self); |
1160 |
|
|
} |
1161 |
|
|
|
1162 |
|
|
redo A; |
1163 |
|
|
} |
1164 |
|
|
} elsif ($self->{next_input_character} == 0x0044 or # D |
1165 |
|
|
$self->{next_input_character} == 0x0064) { # d |
1166 |
|
|
|
1167 |
|
|
if (@{$self->{char}}) { |
1168 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1169 |
|
|
} else { |
1170 |
|
|
$self->{set_next_input_character}->($self); |
1171 |
|
|
} |
1172 |
|
|
|
1173 |
|
|
push @next_char, $self->{next_input_character}; |
1174 |
|
|
if ($self->{next_input_character} == 0x004F or # O |
1175 |
|
|
$self->{next_input_character} == 0x006F) { # o |
1176 |
|
|
|
1177 |
|
|
if (@{$self->{char}}) { |
1178 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1179 |
|
|
} else { |
1180 |
|
|
$self->{set_next_input_character}->($self); |
1181 |
|
|
} |
1182 |
|
|
|
1183 |
|
|
push @next_char, $self->{next_input_character}; |
1184 |
|
|
if ($self->{next_input_character} == 0x0043 or # C |
1185 |
|
|
$self->{next_input_character} == 0x0063) { # c |
1186 |
|
|
|
1187 |
|
|
if (@{$self->{char}}) { |
1188 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1189 |
|
|
} else { |
1190 |
|
|
$self->{set_next_input_character}->($self); |
1191 |
|
|
} |
1192 |
|
|
|
1193 |
|
|
push @next_char, $self->{next_input_character}; |
1194 |
|
|
if ($self->{next_input_character} == 0x0054 or # T |
1195 |
|
|
$self->{next_input_character} == 0x0074) { # t |
1196 |
|
|
|
1197 |
|
|
if (@{$self->{char}}) { |
1198 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1199 |
|
|
} else { |
1200 |
|
|
$self->{set_next_input_character}->($self); |
1201 |
|
|
} |
1202 |
|
|
|
1203 |
|
|
push @next_char, $self->{next_input_character}; |
1204 |
|
|
if ($self->{next_input_character} == 0x0059 or # Y |
1205 |
|
|
$self->{next_input_character} == 0x0079) { # y |
1206 |
|
|
|
1207 |
|
|
if (@{$self->{char}}) { |
1208 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1209 |
|
|
} else { |
1210 |
|
|
$self->{set_next_input_character}->($self); |
1211 |
|
|
} |
1212 |
|
|
|
1213 |
|
|
push @next_char, $self->{next_input_character}; |
1214 |
|
|
if ($self->{next_input_character} == 0x0050 or # P |
1215 |
|
|
$self->{next_input_character} == 0x0070) { # p |
1216 |
|
|
|
1217 |
|
|
if (@{$self->{char}}) { |
1218 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1219 |
|
|
} else { |
1220 |
|
|
$self->{set_next_input_character}->($self); |
1221 |
|
|
} |
1222 |
|
|
|
1223 |
|
|
push @next_char, $self->{next_input_character}; |
1224 |
|
|
if ($self->{next_input_character} == 0x0045 or # E |
1225 |
|
|
$self->{next_input_character} == 0x0065) { # e |
1226 |
|
|
## ISSUE: What a stupid code this is! |
1227 |
|
|
$self->{state} = 'DOCTYPE'; |
1228 |
|
|
|
1229 |
|
|
if (@{$self->{char}}) { |
1230 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1231 |
|
|
} else { |
1232 |
|
|
$self->{set_next_input_character}->($self); |
1233 |
|
|
} |
1234 |
|
|
|
1235 |
|
|
redo A; |
1236 |
|
|
} |
1237 |
|
|
} |
1238 |
|
|
} |
1239 |
|
|
} |
1240 |
|
|
} |
1241 |
|
|
} |
1242 |
|
|
} |
1243 |
|
|
|
1244 |
|
|
$self->{parse_error}->(); |
1245 |
|
|
$self->{next_input_character} = shift @next_char; |
1246 |
|
|
unshift @{$self->{char}}, (@next_char); |
1247 |
|
|
$self->{state} = 'bogus comment'; |
1248 |
|
|
redo A; |
1249 |
|
|
|
1250 |
|
|
## ISSUE: typos in spec: chacacters, is is a parse error |
1251 |
|
|
## ISSUE: spec is somewhat unclear on "is the first character that will be in the comment"; what is "that will be in the comment" is what the algorithm defines, isn't it? |
1252 |
|
|
} elsif ($self->{state} eq 'comment') { |
1253 |
|
|
if ($self->{next_input_character} == 0x002D) { # - |
1254 |
|
|
$self->{state} = 'comment dash'; |
1255 |
|
|
|
1256 |
|
|
if (@{$self->{char}}) { |
1257 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1258 |
|
|
} else { |
1259 |
|
|
$self->{set_next_input_character}->($self); |
1260 |
|
|
} |
1261 |
|
|
|
1262 |
|
|
redo A; |
1263 |
|
|
} elsif ($self->{next_input_character} == -1) { |
1264 |
|
|
$self->{parse_error}->(); |
1265 |
|
|
$self->{state} = 'data'; |
1266 |
|
|
## reconsume |
1267 |
|
|
|
1268 |
|
|
return ($self->{current_token}); # comment |
1269 |
|
|
undef $self->{current_token}; |
1270 |
|
|
|
1271 |
|
|
redo A; |
1272 |
|
|
} else { |
1273 |
|
|
$self->{current_token}->{data} .= chr ($self->{next_input_character}); # comment |
1274 |
|
|
## Stay in the state |
1275 |
|
|
|
1276 |
|
|
if (@{$self->{char}}) { |
1277 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1278 |
|
|
} else { |
1279 |
|
|
$self->{set_next_input_character}->($self); |
1280 |
|
|
} |
1281 |
|
|
|
1282 |
|
|
redo A; |
1283 |
|
|
} |
1284 |
|
|
} elsif ($self->{state} eq 'comment dash') { |
1285 |
|
|
if ($self->{next_input_character} == 0x002D) { # - |
1286 |
|
|
$self->{state} = 'comment end'; |
1287 |
|
|
|
1288 |
|
|
if (@{$self->{char}}) { |
1289 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1290 |
|
|
} else { |
1291 |
|
|
$self->{set_next_input_character}->($self); |
1292 |
|
|
} |
1293 |
|
|
|
1294 |
|
|
redo A; |
1295 |
|
|
} elsif ($self->{next_input_character} == -1) { |
1296 |
|
|
$self->{parse_error}->(); |
1297 |
|
|
$self->{state} = 'data'; |
1298 |
|
|
## reconsume |
1299 |
|
|
|
1300 |
|
|
return ($self->{current_token}); # comment |
1301 |
|
|
undef $self->{current_token}; |
1302 |
|
|
|
1303 |
|
|
redo A; |
1304 |
|
|
} else { |
1305 |
|
|
$self->{current_token}->{data} .= '-' . chr ($self->{next_input_character}); # comment |
1306 |
|
|
$self->{state} = 'comment'; |
1307 |
|
|
|
1308 |
|
|
if (@{$self->{char}}) { |
1309 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1310 |
|
|
} else { |
1311 |
|
|
$self->{set_next_input_character}->($self); |
1312 |
|
|
} |
1313 |
|
|
|
1314 |
|
|
redo A; |
1315 |
|
|
} |
1316 |
|
|
} elsif ($self->{state} eq 'comment end') { |
1317 |
|
|
if ($self->{next_input_character} == 0x003E) { # > |
1318 |
|
|
$self->{state} = 'data'; |
1319 |
|
|
|
1320 |
|
|
if (@{$self->{char}}) { |
1321 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1322 |
|
|
} else { |
1323 |
|
|
$self->{set_next_input_character}->($self); |
1324 |
|
|
} |
1325 |
|
|
|
1326 |
|
|
|
1327 |
|
|
return ($self->{current_token}); # comment |
1328 |
|
|
undef $self->{current_token}; |
1329 |
|
|
|
1330 |
|
|
redo A; |
1331 |
|
|
} elsif ($self->{next_input_character} == 0x002D) { # - |
1332 |
|
|
$self->{parse_error}->(); |
1333 |
|
|
$self->{current_token}->{data} .= '-'; # comment |
1334 |
|
|
## Stay in the state |
1335 |
|
|
|
1336 |
|
|
if (@{$self->{char}}) { |
1337 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1338 |
|
|
} else { |
1339 |
|
|
$self->{set_next_input_character}->($self); |
1340 |
|
|
} |
1341 |
|
|
|
1342 |
|
|
redo A; |
1343 |
|
|
} elsif ($self->{next_input_character} == -1) { |
1344 |
|
|
$self->{parse_error}->(); |
1345 |
|
|
$self->{state} = 'data'; |
1346 |
|
|
## reconsume |
1347 |
|
|
|
1348 |
|
|
return ($self->{current_token}); # comment |
1349 |
|
|
undef $self->{current_token}; |
1350 |
|
|
|
1351 |
|
|
redo A; |
1352 |
|
|
} else { |
1353 |
|
|
$self->{parse_error}->(); |
1354 |
|
|
$self->{current_token}->{data} .= '--' . chr ($self->{next_input_character}); # comment |
1355 |
|
|
$self->{state} = 'comment'; |
1356 |
|
|
|
1357 |
|
|
if (@{$self->{char}}) { |
1358 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1359 |
|
|
} else { |
1360 |
|
|
$self->{set_next_input_character}->($self); |
1361 |
|
|
} |
1362 |
|
|
|
1363 |
|
|
redo A; |
1364 |
|
|
} |
1365 |
|
|
} elsif ($self->{state} eq 'DOCTYPE') { |
1366 |
|
|
if ($self->{next_input_character} == 0x0009 or # HT |
1367 |
|
|
$self->{next_input_character} == 0x000A or # LF |
1368 |
|
|
$self->{next_input_character} == 0x000B or # VT |
1369 |
|
|
$self->{next_input_character} == 0x000C or # FF |
1370 |
|
|
$self->{next_input_character} == 0x0020) { # SP |
1371 |
|
|
$self->{state} = 'before DOCTYPE name'; |
1372 |
|
|
|
1373 |
|
|
if (@{$self->{char}}) { |
1374 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1375 |
|
|
} else { |
1376 |
|
|
$self->{set_next_input_character}->($self); |
1377 |
|
|
} |
1378 |
|
|
|
1379 |
|
|
redo A; |
1380 |
|
|
} else { |
1381 |
|
|
$self->{parse_error}->(); |
1382 |
|
|
$self->{state} = 'before DOCTYPE name'; |
1383 |
|
|
## reconsume |
1384 |
|
|
redo A; |
1385 |
|
|
} |
1386 |
|
|
} elsif ($self->{state} eq 'before DOCTYPE name') { |
1387 |
|
|
if ($self->{next_input_character} == 0x0009 or # HT |
1388 |
|
|
$self->{next_input_character} == 0x000A or # LF |
1389 |
|
|
$self->{next_input_character} == 0x000B or # VT |
1390 |
|
|
$self->{next_input_character} == 0x000C or # FF |
1391 |
|
|
$self->{next_input_character} == 0x0020) { # SP |
1392 |
|
|
## Stay in the state |
1393 |
|
|
|
1394 |
|
|
if (@{$self->{char}}) { |
1395 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1396 |
|
|
} else { |
1397 |
|
|
$self->{set_next_input_character}->($self); |
1398 |
|
|
} |
1399 |
|
|
|
1400 |
|
|
redo A; |
1401 |
|
|
} elsif (0x0061 <= $self->{next_input_character} and |
1402 |
|
|
$self->{next_input_character} <= 0x007A) { # a..z |
1403 |
|
|
$self->{current_token} = {type => 'DOCTYPE', |
1404 |
|
|
name => chr ($self->{next_input_character} - 0x0020), |
1405 |
|
|
error => 1}; |
1406 |
|
|
$self->{state} = 'DOCTYPE name'; |
1407 |
|
|
|
1408 |
|
|
if (@{$self->{char}}) { |
1409 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1410 |
|
|
} else { |
1411 |
|
|
$self->{set_next_input_character}->($self); |
1412 |
|
|
} |
1413 |
|
|
|
1414 |
|
|
redo A; |
1415 |
|
|
} elsif ($self->{next_input_character} == 0x003E) { # > |
1416 |
|
|
$self->{parse_error}->(); |
1417 |
|
|
$self->{state} = 'data'; |
1418 |
|
|
|
1419 |
|
|
if (@{$self->{char}}) { |
1420 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1421 |
|
|
} else { |
1422 |
|
|
$self->{set_next_input_character}->($self); |
1423 |
|
|
} |
1424 |
|
|
|
1425 |
|
|
|
1426 |
|
|
return ({type => 'DOCTYPE', name => '', error => 1}); |
1427 |
|
|
|
1428 |
|
|
redo A; |
1429 |
|
|
} elsif ($self->{next_input_character} == -1) { |
1430 |
|
|
$self->{parse_error}->(); |
1431 |
|
|
$self->{state} = 'data'; |
1432 |
|
|
## reconsume |
1433 |
|
|
|
1434 |
|
|
return ({type => 'DOCTYPE', name => '', error => 1}); |
1435 |
|
|
|
1436 |
|
|
redo A; |
1437 |
|
|
} else { |
1438 |
|
|
$self->{current_token} = {type => 'DOCTYPE', |
1439 |
|
|
name => chr ($self->{next_input_character}), |
1440 |
|
|
error => 1}; |
1441 |
|
|
$self->{state} = 'DOCTYPE name'; |
1442 |
|
|
|
1443 |
|
|
if (@{$self->{char}}) { |
1444 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1445 |
|
|
} else { |
1446 |
|
|
$self->{set_next_input_character}->($self); |
1447 |
|
|
} |
1448 |
|
|
|
1449 |
|
|
redo A; |
1450 |
|
|
} |
1451 |
|
|
} elsif ($self->{state} eq 'DOCTYPE name') { |
1452 |
|
|
if ($self->{next_input_character} == 0x0009 or # HT |
1453 |
|
|
$self->{next_input_character} == 0x000A or # LF |
1454 |
|
|
$self->{next_input_character} == 0x000B or # VT |
1455 |
|
|
$self->{next_input_character} == 0x000C or # FF |
1456 |
|
|
$self->{next_input_character} == 0x0020) { # SP |
1457 |
|
|
$self->{current_token}->{error} = ($self->{current_token}->{name} ne 'HTML'); # DOCTYPE |
1458 |
|
|
$self->{state} = 'after DOCTYPE name'; |
1459 |
|
|
|
1460 |
|
|
if (@{$self->{char}}) { |
1461 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1462 |
|
|
} else { |
1463 |
|
|
$self->{set_next_input_character}->($self); |
1464 |
|
|
} |
1465 |
|
|
|
1466 |
|
|
redo A; |
1467 |
|
|
} elsif ($self->{next_input_character} == 0x003E) { # > |
1468 |
|
|
$self->{current_token}->{error} = ($self->{current_token}->{name} ne 'HTML'); # DOCTYPE |
1469 |
|
|
$self->{state} = 'data'; |
1470 |
|
|
|
1471 |
|
|
if (@{$self->{char}}) { |
1472 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1473 |
|
|
} else { |
1474 |
|
|
$self->{set_next_input_character}->($self); |
1475 |
|
|
} |
1476 |
|
|
|
1477 |
|
|
|
1478 |
|
|
return ($self->{current_token}); # DOCTYPE |
1479 |
|
|
undef $self->{current_token}; |
1480 |
|
|
|
1481 |
|
|
redo A; |
1482 |
|
|
} elsif (0x0061 <= $self->{next_input_character} and |
1483 |
|
|
$self->{next_input_character} <= 0x007A) { # a..z |
1484 |
|
|
$self->{current_token}->{name} .= chr ($self->{next_input_character} - 0x0020); # DOCTYPE |
1485 |
|
|
#$self->{current_token}->{error} = ($self->{current_token}->{name} ne 'HTML'); |
1486 |
|
|
## Stay in the state |
1487 |
|
|
|
1488 |
|
|
if (@{$self->{char}}) { |
1489 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1490 |
|
|
} else { |
1491 |
|
|
$self->{set_next_input_character}->($self); |
1492 |
|
|
} |
1493 |
|
|
|
1494 |
|
|
redo A; |
1495 |
|
|
} elsif ($self->{next_input_character} == -1) { |
1496 |
|
|
$self->{parse_error}->(); |
1497 |
|
|
$self->{current_token}->{error} = ($self->{current_token}->{name} ne 'HTML'); # DOCTYPE |
1498 |
|
|
$self->{state} = 'data'; |
1499 |
|
|
## reconsume |
1500 |
|
|
|
1501 |
|
|
return ($self->{current_token}); |
1502 |
|
|
undef $self->{current_token}; |
1503 |
|
|
|
1504 |
|
|
redo A; |
1505 |
|
|
} else { |
1506 |
|
|
$self->{current_token}->{name} .= chr ($self->{next_input_character} - 0x0020); # DOCTYPE |
1507 |
|
|
#$self->{current_token}->{error} = ($self->{current_token}->{name} ne 'HTML'); |
1508 |
|
|
## Stay in the state |
1509 |
|
|
|
1510 |
|
|
if (@{$self->{char}}) { |
1511 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1512 |
|
|
} else { |
1513 |
|
|
$self->{set_next_input_character}->($self); |
1514 |
|
|
} |
1515 |
|
|
|
1516 |
|
|
redo A; |
1517 |
|
|
} |
1518 |
|
|
} elsif ($self->{state} eq 'after DOCTYPE name') { |
1519 |
|
|
if ($self->{next_input_character} == 0x0009 or # HT |
1520 |
|
|
$self->{next_input_character} == 0x000A or # LF |
1521 |
|
|
$self->{next_input_character} == 0x000B or # VT |
1522 |
|
|
$self->{next_input_character} == 0x000C or # FF |
1523 |
|
|
$self->{next_input_character} == 0x0020) { # SP |
1524 |
|
|
## Stay in the state |
1525 |
|
|
|
1526 |
|
|
if (@{$self->{char}}) { |
1527 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1528 |
|
|
} else { |
1529 |
|
|
$self->{set_next_input_character}->($self); |
1530 |
|
|
} |
1531 |
|
|
|
1532 |
|
|
redo A; |
1533 |
|
|
} elsif ($self->{next_input_character} == 0x003E) { # > |
1534 |
|
|
$self->{state} = 'data'; |
1535 |
|
|
|
1536 |
|
|
if (@{$self->{char}}) { |
1537 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1538 |
|
|
} else { |
1539 |
|
|
$self->{set_next_input_character}->($self); |
1540 |
|
|
} |
1541 |
|
|
|
1542 |
|
|
|
1543 |
|
|
return ($self->{current_token}); # DOCTYPE |
1544 |
|
|
undef $self->{current_token}; |
1545 |
|
|
|
1546 |
|
|
redo A; |
1547 |
|
|
} elsif ($self->{next_input_character} == -1) { |
1548 |
|
|
$self->{parse_error}->(); |
1549 |
|
|
$self->{state} = 'data'; |
1550 |
|
|
## reconsume |
1551 |
|
|
|
1552 |
|
|
return ($self->{current_token}); # DOCTYPE |
1553 |
|
|
undef $self->{current_token}; |
1554 |
|
|
|
1555 |
|
|
redo A; |
1556 |
|
|
} else { |
1557 |
|
|
$self->{parse_error}->(); |
1558 |
|
|
$self->{current_token}->{error} = 1; # DOCTYPE |
1559 |
|
|
$self->{state} = 'bogus DOCTYPE'; |
1560 |
|
|
|
1561 |
|
|
if (@{$self->{char}}) { |
1562 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1563 |
|
|
} else { |
1564 |
|
|
$self->{set_next_input_character}->($self); |
1565 |
|
|
} |
1566 |
|
|
|
1567 |
|
|
redo A; |
1568 |
|
|
} |
1569 |
|
|
} elsif ($self->{state} eq 'bogus DOCTYPE') { |
1570 |
|
|
if ($self->{next_input_character} == 0x003E) { # > |
1571 |
|
|
$self->{state} = 'data'; |
1572 |
|
|
|
1573 |
|
|
if (@{$self->{char}}) { |
1574 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1575 |
|
|
} else { |
1576 |
|
|
$self->{set_next_input_character}->($self); |
1577 |
|
|
} |
1578 |
|
|
|
1579 |
|
|
|
1580 |
|
|
return ($self->{current_token}); # DOCTYPE |
1581 |
|
|
undef $self->{current_token}; |
1582 |
|
|
|
1583 |
|
|
redo A; |
1584 |
|
|
} elsif ($self->{next_input_character} == -1) { |
1585 |
|
|
$self->{parse_error}->(); |
1586 |
|
|
$self->{state} = 'data'; |
1587 |
|
|
## reconsume |
1588 |
|
|
|
1589 |
|
|
return ($self->{current_token}); # DOCTYPE |
1590 |
|
|
undef $self->{current_token}; |
1591 |
|
|
|
1592 |
|
|
redo A; |
1593 |
|
|
} else { |
1594 |
|
|
## Stay in the state |
1595 |
|
|
|
1596 |
|
|
if (@{$self->{char}}) { |
1597 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1598 |
|
|
} else { |
1599 |
|
|
$self->{set_next_input_character}->($self); |
1600 |
|
|
} |
1601 |
|
|
|
1602 |
|
|
redo A; |
1603 |
|
|
} |
1604 |
|
|
} else { |
1605 |
|
|
die "$0: $self->{state}: Unknown state"; |
1606 |
|
|
} |
1607 |
|
|
} # A |
1608 |
|
|
|
1609 |
|
|
die "$0: _get_next_token: unexpected case"; |
1610 |
|
|
} # _get_next_token |
1611 |
|
|
|
1612 |
|
|
sub _tokenize_attempt_to_consume_an_entity ($) { |
1613 |
|
|
my $self = shift; |
1614 |
|
|
my $r; |
1615 |
|
|
|
1616 |
|
|
if ($self->{next_input_character} == 0x0023) { # # |
1617 |
|
|
|
1618 |
|
|
if (@{$self->{char}}) { |
1619 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1620 |
|
|
} else { |
1621 |
|
|
$self->{set_next_input_character}->($self); |
1622 |
|
|
} |
1623 |
|
|
|
1624 |
|
|
my $num; |
1625 |
|
|
if ($self->{next_input_character} == 0x0078 or # x |
1626 |
|
|
$self->{next_input_character} == 0x0058) { # X |
1627 |
|
|
X: { |
1628 |
|
|
my $x_char = $self->{next_input_character}; |
1629 |
|
|
|
1630 |
|
|
if (@{$self->{char}}) { |
1631 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1632 |
|
|
} else { |
1633 |
|
|
$self->{set_next_input_character}->($self); |
1634 |
|
|
} |
1635 |
|
|
|
1636 |
|
|
if (0x0030 <= $self->{next_input_character} and |
1637 |
|
|
$self->{next_input_character} <= 0x0039) { # 0..9 |
1638 |
|
|
$num ||= 0; |
1639 |
|
|
$num *= 0x10; |
1640 |
|
|
$num += $self->{next_input_character} - 0x0030; |
1641 |
|
|
redo X; |
1642 |
|
|
} elsif (0x0061 <= $self->{next_input_character} and |
1643 |
|
|
$self->{next_input_character} <= 0x0066) { # a..f |
1644 |
|
|
## ISSUE: the spec says U+0078, which is apparently incorrect |
1645 |
|
|
$num ||= 0; |
1646 |
|
|
$num *= 0x10; |
1647 |
|
|
$num += $self->{next_input_character} - 0x0060 + 9; |
1648 |
|
|
redo X; |
1649 |
|
|
} elsif (0x0041 <= $self->{next_input_character} and |
1650 |
|
|
$self->{next_input_character} <= 0x0046) { # A..F |
1651 |
|
|
## ISSUE: the spec says U+0058, which is apparently incorrect |
1652 |
|
|
$num ||= 0; |
1653 |
|
|
$num *= 0x10; |
1654 |
|
|
$num += $self->{next_input_character} - 0x0040 + 9; |
1655 |
|
|
redo X; |
1656 |
|
|
} elsif (not defined $num) { # no hexadecimal digit |
1657 |
|
|
$self->{parse_error}->(); |
1658 |
|
|
$self->{next_input_character} = 0x0023; # # |
1659 |
|
|
unshift @{$self->{char}}, ($x_char); |
1660 |
|
|
last X; ## nothing is returned |
1661 |
|
|
} elsif ($self->{next_input_character} == 0x003B) { # ; |
1662 |
|
|
|
1663 |
|
|
if (@{$self->{char}}) { |
1664 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1665 |
|
|
} else { |
1666 |
|
|
$self->{set_next_input_character}->($self); |
1667 |
|
|
} |
1668 |
|
|
|
1669 |
|
|
} else { |
1670 |
|
|
$self->{parse_error}->(); |
1671 |
|
|
} |
1672 |
|
|
|
1673 |
|
|
## TODO: check the definition for |a valid Unicode character|. |
1674 |
|
|
if ($num > 1114111 or $num == 0) { |
1675 |
|
|
$num = 0xFFFD; # REPLACEMENT CHARACTER |
1676 |
|
|
## ISSUE: Why this is not an error? |
1677 |
|
|
} |
1678 |
|
|
|
1679 |
|
|
$r = {type => 'character', data => chr $num}; |
1680 |
|
|
} # X |
1681 |
|
|
} else { |
1682 |
|
|
D: { |
1683 |
|
|
if (0x0030 <= $self->{next_input_character} and |
1684 |
|
|
$self->{next_input_character} <= 0x0039) { # 0..9 |
1685 |
|
|
$num *= 10; |
1686 |
|
|
$num += $self->{next_input_character} - 0x0030; |
1687 |
|
|
|
1688 |
|
|
if (@{$self->{char}}) { |
1689 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1690 |
|
|
} else { |
1691 |
|
|
$self->{set_next_input_character}->($self); |
1692 |
|
|
} |
1693 |
|
|
|
1694 |
|
|
redo D; |
1695 |
|
|
} else { |
1696 |
|
|
$self->{parse_error}->(); |
1697 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
1698 |
|
|
$self->{next_input_character} = 0x0023; # # |
1699 |
|
|
last D; ## nothing is returned |
1700 |
|
|
} |
1701 |
|
|
|
1702 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
1703 |
|
|
|
1704 |
|
|
if (@{$self->{char}}) { |
1705 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1706 |
|
|
} else { |
1707 |
|
|
$self->{set_next_input_character}->($self); |
1708 |
|
|
} |
1709 |
|
|
|
1710 |
|
|
} else { |
1711 |
|
|
$self->{parse_error}->(); |
1712 |
|
|
} |
1713 |
|
|
|
1714 |
|
|
## TODO: check the definition for |a valid Unicode character|. |
1715 |
|
|
if ($num > 1114111 or $num == 0) { |
1716 |
|
|
$num = 0xFFFD; # REPLACEMENT CHARACTER |
1717 |
|
|
## ISSUE: Why this is not an error? |
1718 |
|
|
} |
1719 |
|
|
|
1720 |
|
|
$r = {type => 'character', data => chr $num}; |
1721 |
|
|
} # D |
1722 |
|
|
} |
1723 |
|
|
} elsif ($self->{next_input_character} == 65) { # A |
1724 |
|
|
|
1725 |
|
|
if (@{$self->{char}}) { |
1726 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1727 |
|
|
} else { |
1728 |
|
|
$self->{set_next_input_character}->($self); |
1729 |
|
|
} |
1730 |
|
|
|
1731 |
|
|
if ($self->{next_input_character} == 69) { # E |
1732 |
|
|
|
1733 |
|
|
if (@{$self->{char}}) { |
1734 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1735 |
|
|
} else { |
1736 |
|
|
$self->{set_next_input_character}->($self); |
1737 |
|
|
} |
1738 |
|
|
|
1739 |
|
|
if ($self->{next_input_character} == 108) { # l |
1740 |
|
|
|
1741 |
|
|
if (@{$self->{char}}) { |
1742 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1743 |
|
|
} else { |
1744 |
|
|
$self->{set_next_input_character}->($self); |
1745 |
|
|
} |
1746 |
|
|
|
1747 |
|
|
if ($self->{next_input_character} == 105) { # i |
1748 |
|
|
|
1749 |
|
|
if (@{$self->{char}}) { |
1750 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1751 |
|
|
} else { |
1752 |
|
|
$self->{set_next_input_character}->($self); |
1753 |
|
|
} |
1754 |
|
|
|
1755 |
|
|
if ($self->{next_input_character} == 103) { # g |
1756 |
|
|
|
1757 |
|
|
if (@{$self->{char}}) { |
1758 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1759 |
|
|
} else { |
1760 |
|
|
$self->{set_next_input_character}->($self); |
1761 |
|
|
} |
1762 |
|
|
|
1763 |
|
|
{ |
1764 |
|
|
$r = {type => 'character', data => qq<\x{00C6}>}; # AElig |
1765 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
1766 |
|
|
|
1767 |
|
|
if (@{$self->{char}}) { |
1768 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1769 |
|
|
} else { |
1770 |
|
|
$self->{set_next_input_character}->($self); |
1771 |
|
|
} |
1772 |
|
|
|
1773 |
|
|
} else { |
1774 |
|
|
$self->{parse_error}->(); |
1775 |
|
|
## reconsume |
1776 |
|
|
} |
1777 |
|
|
} |
1778 |
|
|
} else { |
1779 |
|
|
$self->{parse_error}->(); |
1780 |
|
|
unshift @{$self->{char}}, (69, 108, 105, $self->{next_input_character}); |
1781 |
|
|
$self->{next_input_character} = 65; |
1782 |
|
|
} |
1783 |
|
|
} else { |
1784 |
|
|
$self->{parse_error}->(); |
1785 |
|
|
unshift @{$self->{char}}, (69, 108, $self->{next_input_character}); |
1786 |
|
|
$self->{next_input_character} = 65; |
1787 |
|
|
} |
1788 |
|
|
} else { |
1789 |
|
|
$self->{parse_error}->(); |
1790 |
|
|
unshift @{$self->{char}}, (69, $self->{next_input_character}); |
1791 |
|
|
$self->{next_input_character} = 65; |
1792 |
|
|
} |
1793 |
|
|
} elsif ($self->{next_input_character} == 97) { # a |
1794 |
|
|
|
1795 |
|
|
if (@{$self->{char}}) { |
1796 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1797 |
|
|
} else { |
1798 |
|
|
$self->{set_next_input_character}->($self); |
1799 |
|
|
} |
1800 |
|
|
|
1801 |
|
|
if ($self->{next_input_character} == 99) { # c |
1802 |
|
|
|
1803 |
|
|
if (@{$self->{char}}) { |
1804 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1805 |
|
|
} else { |
1806 |
|
|
$self->{set_next_input_character}->($self); |
1807 |
|
|
} |
1808 |
|
|
|
1809 |
|
|
if ($self->{next_input_character} == 117) { # u |
1810 |
|
|
|
1811 |
|
|
if (@{$self->{char}}) { |
1812 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1813 |
|
|
} else { |
1814 |
|
|
$self->{set_next_input_character}->($self); |
1815 |
|
|
} |
1816 |
|
|
|
1817 |
|
|
if ($self->{next_input_character} == 116) { # t |
1818 |
|
|
|
1819 |
|
|
if (@{$self->{char}}) { |
1820 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1821 |
|
|
} else { |
1822 |
|
|
$self->{set_next_input_character}->($self); |
1823 |
|
|
} |
1824 |
|
|
|
1825 |
|
|
if ($self->{next_input_character} == 101) { # e |
1826 |
|
|
|
1827 |
|
|
if (@{$self->{char}}) { |
1828 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1829 |
|
|
} else { |
1830 |
|
|
$self->{set_next_input_character}->($self); |
1831 |
|
|
} |
1832 |
|
|
|
1833 |
|
|
{ |
1834 |
|
|
$r = {type => 'character', data => qq<\x{00C1}>}; # Aacute |
1835 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
1836 |
|
|
|
1837 |
|
|
if (@{$self->{char}}) { |
1838 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1839 |
|
|
} else { |
1840 |
|
|
$self->{set_next_input_character}->($self); |
1841 |
|
|
} |
1842 |
|
|
|
1843 |
|
|
} else { |
1844 |
|
|
$self->{parse_error}->(); |
1845 |
|
|
## reconsume |
1846 |
|
|
} |
1847 |
|
|
} |
1848 |
|
|
} else { |
1849 |
|
|
$self->{parse_error}->(); |
1850 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
1851 |
|
|
$self->{next_input_character} = 65; |
1852 |
|
|
} |
1853 |
|
|
} else { |
1854 |
|
|
$self->{parse_error}->(); |
1855 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
1856 |
|
|
$self->{next_input_character} = 65; |
1857 |
|
|
} |
1858 |
|
|
} else { |
1859 |
|
|
$self->{parse_error}->(); |
1860 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
1861 |
|
|
$self->{next_input_character} = 65; |
1862 |
|
|
} |
1863 |
|
|
} else { |
1864 |
|
|
$self->{parse_error}->(); |
1865 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
1866 |
|
|
$self->{next_input_character} = 65; |
1867 |
|
|
} |
1868 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
1869 |
|
|
|
1870 |
|
|
if (@{$self->{char}}) { |
1871 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1872 |
|
|
} else { |
1873 |
|
|
$self->{set_next_input_character}->($self); |
1874 |
|
|
} |
1875 |
|
|
|
1876 |
|
|
if ($self->{next_input_character} == 105) { # i |
1877 |
|
|
|
1878 |
|
|
if (@{$self->{char}}) { |
1879 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1880 |
|
|
} else { |
1881 |
|
|
$self->{set_next_input_character}->($self); |
1882 |
|
|
} |
1883 |
|
|
|
1884 |
|
|
if ($self->{next_input_character} == 114) { # r |
1885 |
|
|
|
1886 |
|
|
if (@{$self->{char}}) { |
1887 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1888 |
|
|
} else { |
1889 |
|
|
$self->{set_next_input_character}->($self); |
1890 |
|
|
} |
1891 |
|
|
|
1892 |
|
|
if ($self->{next_input_character} == 99) { # c |
1893 |
|
|
|
1894 |
|
|
if (@{$self->{char}}) { |
1895 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1896 |
|
|
} else { |
1897 |
|
|
$self->{set_next_input_character}->($self); |
1898 |
|
|
} |
1899 |
|
|
|
1900 |
|
|
{ |
1901 |
|
|
$r = {type => 'character', data => qq<\x{00C2}>}; # Acirc |
1902 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
1903 |
|
|
|
1904 |
|
|
if (@{$self->{char}}) { |
1905 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1906 |
|
|
} else { |
1907 |
|
|
$self->{set_next_input_character}->($self); |
1908 |
|
|
} |
1909 |
|
|
|
1910 |
|
|
} else { |
1911 |
|
|
$self->{parse_error}->(); |
1912 |
|
|
## reconsume |
1913 |
|
|
} |
1914 |
|
|
} |
1915 |
|
|
} else { |
1916 |
|
|
$self->{parse_error}->(); |
1917 |
|
|
unshift @{$self->{char}}, (99, 105, 114, $self->{next_input_character}); |
1918 |
|
|
$self->{next_input_character} = 65; |
1919 |
|
|
} |
1920 |
|
|
} else { |
1921 |
|
|
$self->{parse_error}->(); |
1922 |
|
|
unshift @{$self->{char}}, (99, 105, $self->{next_input_character}); |
1923 |
|
|
$self->{next_input_character} = 65; |
1924 |
|
|
} |
1925 |
|
|
} else { |
1926 |
|
|
$self->{parse_error}->(); |
1927 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
1928 |
|
|
$self->{next_input_character} = 65; |
1929 |
|
|
} |
1930 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
1931 |
|
|
|
1932 |
|
|
if (@{$self->{char}}) { |
1933 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1934 |
|
|
} else { |
1935 |
|
|
$self->{set_next_input_character}->($self); |
1936 |
|
|
} |
1937 |
|
|
|
1938 |
|
|
if ($self->{next_input_character} == 114) { # r |
1939 |
|
|
|
1940 |
|
|
if (@{$self->{char}}) { |
1941 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1942 |
|
|
} else { |
1943 |
|
|
$self->{set_next_input_character}->($self); |
1944 |
|
|
} |
1945 |
|
|
|
1946 |
|
|
if ($self->{next_input_character} == 97) { # a |
1947 |
|
|
|
1948 |
|
|
if (@{$self->{char}}) { |
1949 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1950 |
|
|
} else { |
1951 |
|
|
$self->{set_next_input_character}->($self); |
1952 |
|
|
} |
1953 |
|
|
|
1954 |
|
|
if ($self->{next_input_character} == 118) { # v |
1955 |
|
|
|
1956 |
|
|
if (@{$self->{char}}) { |
1957 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1958 |
|
|
} else { |
1959 |
|
|
$self->{set_next_input_character}->($self); |
1960 |
|
|
} |
1961 |
|
|
|
1962 |
|
|
if ($self->{next_input_character} == 101) { # e |
1963 |
|
|
|
1964 |
|
|
if (@{$self->{char}}) { |
1965 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1966 |
|
|
} else { |
1967 |
|
|
$self->{set_next_input_character}->($self); |
1968 |
|
|
} |
1969 |
|
|
|
1970 |
|
|
{ |
1971 |
|
|
$r = {type => 'character', data => qq<\x{00C0}>}; # Agrave |
1972 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
1973 |
|
|
|
1974 |
|
|
if (@{$self->{char}}) { |
1975 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
1976 |
|
|
} else { |
1977 |
|
|
$self->{set_next_input_character}->($self); |
1978 |
|
|
} |
1979 |
|
|
|
1980 |
|
|
} else { |
1981 |
|
|
$self->{parse_error}->(); |
1982 |
|
|
## reconsume |
1983 |
|
|
} |
1984 |
|
|
} |
1985 |
|
|
} else { |
1986 |
|
|
$self->{parse_error}->(); |
1987 |
|
|
unshift @{$self->{char}}, (103, 114, 97, 118, $self->{next_input_character}); |
1988 |
|
|
$self->{next_input_character} = 65; |
1989 |
|
|
} |
1990 |
|
|
} else { |
1991 |
|
|
$self->{parse_error}->(); |
1992 |
|
|
unshift @{$self->{char}}, (103, 114, 97, $self->{next_input_character}); |
1993 |
|
|
$self->{next_input_character} = 65; |
1994 |
|
|
} |
1995 |
|
|
} else { |
1996 |
|
|
$self->{parse_error}->(); |
1997 |
|
|
unshift @{$self->{char}}, (103, 114, $self->{next_input_character}); |
1998 |
|
|
$self->{next_input_character} = 65; |
1999 |
|
|
} |
2000 |
|
|
} else { |
2001 |
|
|
$self->{parse_error}->(); |
2002 |
|
|
unshift @{$self->{char}}, (103, $self->{next_input_character}); |
2003 |
|
|
$self->{next_input_character} = 65; |
2004 |
|
|
} |
2005 |
|
|
} elsif ($self->{next_input_character} == 108) { # l |
2006 |
|
|
|
2007 |
|
|
if (@{$self->{char}}) { |
2008 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2009 |
|
|
} else { |
2010 |
|
|
$self->{set_next_input_character}->($self); |
2011 |
|
|
} |
2012 |
|
|
|
2013 |
|
|
if ($self->{next_input_character} == 112) { # p |
2014 |
|
|
|
2015 |
|
|
if (@{$self->{char}}) { |
2016 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2017 |
|
|
} else { |
2018 |
|
|
$self->{set_next_input_character}->($self); |
2019 |
|
|
} |
2020 |
|
|
|
2021 |
|
|
if ($self->{next_input_character} == 104) { # h |
2022 |
|
|
|
2023 |
|
|
if (@{$self->{char}}) { |
2024 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2025 |
|
|
} else { |
2026 |
|
|
$self->{set_next_input_character}->($self); |
2027 |
|
|
} |
2028 |
|
|
|
2029 |
|
|
if ($self->{next_input_character} == 97) { # a |
2030 |
|
|
|
2031 |
|
|
if (@{$self->{char}}) { |
2032 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2033 |
|
|
} else { |
2034 |
|
|
$self->{set_next_input_character}->($self); |
2035 |
|
|
} |
2036 |
|
|
|
2037 |
|
|
{ |
2038 |
|
|
$r = {type => 'character', data => qq<\x{0391}>}; # Alpha |
2039 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2040 |
|
|
|
2041 |
|
|
if (@{$self->{char}}) { |
2042 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2043 |
|
|
} else { |
2044 |
|
|
$self->{set_next_input_character}->($self); |
2045 |
|
|
} |
2046 |
|
|
|
2047 |
|
|
} else { |
2048 |
|
|
$self->{parse_error}->(); |
2049 |
|
|
## reconsume |
2050 |
|
|
} |
2051 |
|
|
} |
2052 |
|
|
} else { |
2053 |
|
|
$self->{parse_error}->(); |
2054 |
|
|
unshift @{$self->{char}}, (108, 112, 104, $self->{next_input_character}); |
2055 |
|
|
$self->{next_input_character} = 65; |
2056 |
|
|
} |
2057 |
|
|
} else { |
2058 |
|
|
$self->{parse_error}->(); |
2059 |
|
|
unshift @{$self->{char}}, (108, 112, $self->{next_input_character}); |
2060 |
|
|
$self->{next_input_character} = 65; |
2061 |
|
|
} |
2062 |
|
|
} else { |
2063 |
|
|
$self->{parse_error}->(); |
2064 |
|
|
unshift @{$self->{char}}, (108, $self->{next_input_character}); |
2065 |
|
|
$self->{next_input_character} = 65; |
2066 |
|
|
} |
2067 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
2068 |
|
|
|
2069 |
|
|
if (@{$self->{char}}) { |
2070 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2071 |
|
|
} else { |
2072 |
|
|
$self->{set_next_input_character}->($self); |
2073 |
|
|
} |
2074 |
|
|
|
2075 |
|
|
if ($self->{next_input_character} == 105) { # i |
2076 |
|
|
|
2077 |
|
|
if (@{$self->{char}}) { |
2078 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2079 |
|
|
} else { |
2080 |
|
|
$self->{set_next_input_character}->($self); |
2081 |
|
|
} |
2082 |
|
|
|
2083 |
|
|
if ($self->{next_input_character} == 110) { # n |
2084 |
|
|
|
2085 |
|
|
if (@{$self->{char}}) { |
2086 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2087 |
|
|
} else { |
2088 |
|
|
$self->{set_next_input_character}->($self); |
2089 |
|
|
} |
2090 |
|
|
|
2091 |
|
|
if ($self->{next_input_character} == 103) { # g |
2092 |
|
|
|
2093 |
|
|
if (@{$self->{char}}) { |
2094 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2095 |
|
|
} else { |
2096 |
|
|
$self->{set_next_input_character}->($self); |
2097 |
|
|
} |
2098 |
|
|
|
2099 |
|
|
{ |
2100 |
|
|
$r = {type => 'character', data => qq<\x{00C5}>}; # Aring |
2101 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2102 |
|
|
|
2103 |
|
|
if (@{$self->{char}}) { |
2104 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2105 |
|
|
} else { |
2106 |
|
|
$self->{set_next_input_character}->($self); |
2107 |
|
|
} |
2108 |
|
|
|
2109 |
|
|
} else { |
2110 |
|
|
$self->{parse_error}->(); |
2111 |
|
|
## reconsume |
2112 |
|
|
} |
2113 |
|
|
} |
2114 |
|
|
} else { |
2115 |
|
|
$self->{parse_error}->(); |
2116 |
|
|
unshift @{$self->{char}}, (114, 105, 110, $self->{next_input_character}); |
2117 |
|
|
$self->{next_input_character} = 65; |
2118 |
|
|
} |
2119 |
|
|
} else { |
2120 |
|
|
$self->{parse_error}->(); |
2121 |
|
|
unshift @{$self->{char}}, (114, 105, $self->{next_input_character}); |
2122 |
|
|
$self->{next_input_character} = 65; |
2123 |
|
|
} |
2124 |
|
|
} else { |
2125 |
|
|
$self->{parse_error}->(); |
2126 |
|
|
unshift @{$self->{char}}, (114, $self->{next_input_character}); |
2127 |
|
|
$self->{next_input_character} = 65; |
2128 |
|
|
} |
2129 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
2130 |
|
|
|
2131 |
|
|
if (@{$self->{char}}) { |
2132 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2133 |
|
|
} else { |
2134 |
|
|
$self->{set_next_input_character}->($self); |
2135 |
|
|
} |
2136 |
|
|
|
2137 |
|
|
if ($self->{next_input_character} == 105) { # i |
2138 |
|
|
|
2139 |
|
|
if (@{$self->{char}}) { |
2140 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2141 |
|
|
} else { |
2142 |
|
|
$self->{set_next_input_character}->($self); |
2143 |
|
|
} |
2144 |
|
|
|
2145 |
|
|
if ($self->{next_input_character} == 108) { # l |
2146 |
|
|
|
2147 |
|
|
if (@{$self->{char}}) { |
2148 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2149 |
|
|
} else { |
2150 |
|
|
$self->{set_next_input_character}->($self); |
2151 |
|
|
} |
2152 |
|
|
|
2153 |
|
|
if ($self->{next_input_character} == 100) { # d |
2154 |
|
|
|
2155 |
|
|
if (@{$self->{char}}) { |
2156 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2157 |
|
|
} else { |
2158 |
|
|
$self->{set_next_input_character}->($self); |
2159 |
|
|
} |
2160 |
|
|
|
2161 |
|
|
if ($self->{next_input_character} == 101) { # e |
2162 |
|
|
|
2163 |
|
|
if (@{$self->{char}}) { |
2164 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2165 |
|
|
} else { |
2166 |
|
|
$self->{set_next_input_character}->($self); |
2167 |
|
|
} |
2168 |
|
|
|
2169 |
|
|
{ |
2170 |
|
|
$r = {type => 'character', data => qq<\x{00C3}>}; # Atilde |
2171 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2172 |
|
|
|
2173 |
|
|
if (@{$self->{char}}) { |
2174 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2175 |
|
|
} else { |
2176 |
|
|
$self->{set_next_input_character}->($self); |
2177 |
|
|
} |
2178 |
|
|
|
2179 |
|
|
} else { |
2180 |
|
|
$self->{parse_error}->(); |
2181 |
|
|
## reconsume |
2182 |
|
|
} |
2183 |
|
|
} |
2184 |
|
|
} else { |
2185 |
|
|
$self->{parse_error}->(); |
2186 |
|
|
unshift @{$self->{char}}, (116, 105, 108, 100, $self->{next_input_character}); |
2187 |
|
|
$self->{next_input_character} = 65; |
2188 |
|
|
} |
2189 |
|
|
} else { |
2190 |
|
|
$self->{parse_error}->(); |
2191 |
|
|
unshift @{$self->{char}}, (116, 105, 108, $self->{next_input_character}); |
2192 |
|
|
$self->{next_input_character} = 65; |
2193 |
|
|
} |
2194 |
|
|
} else { |
2195 |
|
|
$self->{parse_error}->(); |
2196 |
|
|
unshift @{$self->{char}}, (116, 105, $self->{next_input_character}); |
2197 |
|
|
$self->{next_input_character} = 65; |
2198 |
|
|
} |
2199 |
|
|
} else { |
2200 |
|
|
$self->{parse_error}->(); |
2201 |
|
|
unshift @{$self->{char}}, (116, $self->{next_input_character}); |
2202 |
|
|
$self->{next_input_character} = 65; |
2203 |
|
|
} |
2204 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
2205 |
|
|
|
2206 |
|
|
if (@{$self->{char}}) { |
2207 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2208 |
|
|
} else { |
2209 |
|
|
$self->{set_next_input_character}->($self); |
2210 |
|
|
} |
2211 |
|
|
|
2212 |
|
|
if ($self->{next_input_character} == 109) { # m |
2213 |
|
|
|
2214 |
|
|
if (@{$self->{char}}) { |
2215 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2216 |
|
|
} else { |
2217 |
|
|
$self->{set_next_input_character}->($self); |
2218 |
|
|
} |
2219 |
|
|
|
2220 |
|
|
if ($self->{next_input_character} == 108) { # l |
2221 |
|
|
|
2222 |
|
|
if (@{$self->{char}}) { |
2223 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2224 |
|
|
} else { |
2225 |
|
|
$self->{set_next_input_character}->($self); |
2226 |
|
|
} |
2227 |
|
|
|
2228 |
|
|
{ |
2229 |
|
|
$r = {type => 'character', data => qq<\x{00C4}>}; # Auml |
2230 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2231 |
|
|
|
2232 |
|
|
if (@{$self->{char}}) { |
2233 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2234 |
|
|
} else { |
2235 |
|
|
$self->{set_next_input_character}->($self); |
2236 |
|
|
} |
2237 |
|
|
|
2238 |
|
|
} else { |
2239 |
|
|
$self->{parse_error}->(); |
2240 |
|
|
## reconsume |
2241 |
|
|
} |
2242 |
|
|
} |
2243 |
|
|
} else { |
2244 |
|
|
$self->{parse_error}->(); |
2245 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
2246 |
|
|
$self->{next_input_character} = 65; |
2247 |
|
|
} |
2248 |
|
|
} else { |
2249 |
|
|
$self->{parse_error}->(); |
2250 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
2251 |
|
|
$self->{next_input_character} = 65; |
2252 |
|
|
} |
2253 |
|
|
} elsif ($self->{next_input_character} == 77) { # M |
2254 |
|
|
|
2255 |
|
|
if (@{$self->{char}}) { |
2256 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2257 |
|
|
} else { |
2258 |
|
|
$self->{set_next_input_character}->($self); |
2259 |
|
|
} |
2260 |
|
|
|
2261 |
|
|
if ($self->{next_input_character} == 80) { # P |
2262 |
|
|
|
2263 |
|
|
if (@{$self->{char}}) { |
2264 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2265 |
|
|
} else { |
2266 |
|
|
$self->{set_next_input_character}->($self); |
2267 |
|
|
} |
2268 |
|
|
|
2269 |
|
|
{ |
2270 |
|
|
$r = {type => 'character', data => qq<\x{0026}>}; # AMP |
2271 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2272 |
|
|
|
2273 |
|
|
if (@{$self->{char}}) { |
2274 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2275 |
|
|
} else { |
2276 |
|
|
$self->{set_next_input_character}->($self); |
2277 |
|
|
} |
2278 |
|
|
|
2279 |
|
|
} else { |
2280 |
|
|
$self->{parse_error}->(); |
2281 |
|
|
## reconsume |
2282 |
|
|
} |
2283 |
|
|
} |
2284 |
|
|
} else { |
2285 |
|
|
$self->{parse_error}->(); |
2286 |
|
|
unshift @{$self->{char}}, (77, $self->{next_input_character}); |
2287 |
|
|
$self->{next_input_character} = 65; |
2288 |
|
|
} |
2289 |
|
|
} else { |
2290 |
|
|
$self->{parse_error}->(); |
2291 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
2292 |
|
|
$self->{next_input_character} = 65; |
2293 |
|
|
} |
2294 |
|
|
} elsif ($self->{next_input_character} == 66) { # B |
2295 |
|
|
|
2296 |
|
|
if (@{$self->{char}}) { |
2297 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2298 |
|
|
} else { |
2299 |
|
|
$self->{set_next_input_character}->($self); |
2300 |
|
|
} |
2301 |
|
|
|
2302 |
|
|
if ($self->{next_input_character} == 101) { # e |
2303 |
|
|
|
2304 |
|
|
if (@{$self->{char}}) { |
2305 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2306 |
|
|
} else { |
2307 |
|
|
$self->{set_next_input_character}->($self); |
2308 |
|
|
} |
2309 |
|
|
|
2310 |
|
|
if ($self->{next_input_character} == 116) { # t |
2311 |
|
|
|
2312 |
|
|
if (@{$self->{char}}) { |
2313 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2314 |
|
|
} else { |
2315 |
|
|
$self->{set_next_input_character}->($self); |
2316 |
|
|
} |
2317 |
|
|
|
2318 |
|
|
if ($self->{next_input_character} == 97) { # a |
2319 |
|
|
|
2320 |
|
|
if (@{$self->{char}}) { |
2321 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2322 |
|
|
} else { |
2323 |
|
|
$self->{set_next_input_character}->($self); |
2324 |
|
|
} |
2325 |
|
|
|
2326 |
|
|
{ |
2327 |
|
|
$r = {type => 'character', data => qq<\x{0392}>}; # Beta |
2328 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2329 |
|
|
|
2330 |
|
|
if (@{$self->{char}}) { |
2331 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2332 |
|
|
} else { |
2333 |
|
|
$self->{set_next_input_character}->($self); |
2334 |
|
|
} |
2335 |
|
|
|
2336 |
|
|
} else { |
2337 |
|
|
$self->{parse_error}->(); |
2338 |
|
|
## reconsume |
2339 |
|
|
} |
2340 |
|
|
} |
2341 |
|
|
} else { |
2342 |
|
|
$self->{parse_error}->(); |
2343 |
|
|
unshift @{$self->{char}}, (101, 116, $self->{next_input_character}); |
2344 |
|
|
$self->{next_input_character} = 66; |
2345 |
|
|
} |
2346 |
|
|
} else { |
2347 |
|
|
$self->{parse_error}->(); |
2348 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
2349 |
|
|
$self->{next_input_character} = 66; |
2350 |
|
|
} |
2351 |
|
|
} else { |
2352 |
|
|
$self->{parse_error}->(); |
2353 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
2354 |
|
|
$self->{next_input_character} = 66; |
2355 |
|
|
} |
2356 |
|
|
} elsif ($self->{next_input_character} == 67) { # C |
2357 |
|
|
|
2358 |
|
|
if (@{$self->{char}}) { |
2359 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2360 |
|
|
} else { |
2361 |
|
|
$self->{set_next_input_character}->($self); |
2362 |
|
|
} |
2363 |
|
|
|
2364 |
|
|
if ($self->{next_input_character} == 99) { # c |
2365 |
|
|
|
2366 |
|
|
if (@{$self->{char}}) { |
2367 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2368 |
|
|
} else { |
2369 |
|
|
$self->{set_next_input_character}->($self); |
2370 |
|
|
} |
2371 |
|
|
|
2372 |
|
|
if ($self->{next_input_character} == 101) { # e |
2373 |
|
|
|
2374 |
|
|
if (@{$self->{char}}) { |
2375 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2376 |
|
|
} else { |
2377 |
|
|
$self->{set_next_input_character}->($self); |
2378 |
|
|
} |
2379 |
|
|
|
2380 |
|
|
if ($self->{next_input_character} == 100) { # d |
2381 |
|
|
|
2382 |
|
|
if (@{$self->{char}}) { |
2383 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2384 |
|
|
} else { |
2385 |
|
|
$self->{set_next_input_character}->($self); |
2386 |
|
|
} |
2387 |
|
|
|
2388 |
|
|
if ($self->{next_input_character} == 105) { # i |
2389 |
|
|
|
2390 |
|
|
if (@{$self->{char}}) { |
2391 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2392 |
|
|
} else { |
2393 |
|
|
$self->{set_next_input_character}->($self); |
2394 |
|
|
} |
2395 |
|
|
|
2396 |
|
|
if ($self->{next_input_character} == 108) { # l |
2397 |
|
|
|
2398 |
|
|
if (@{$self->{char}}) { |
2399 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2400 |
|
|
} else { |
2401 |
|
|
$self->{set_next_input_character}->($self); |
2402 |
|
|
} |
2403 |
|
|
|
2404 |
|
|
{ |
2405 |
|
|
$r = {type => 'character', data => qq<\x{00C7}>}; # Ccedil |
2406 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2407 |
|
|
|
2408 |
|
|
if (@{$self->{char}}) { |
2409 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2410 |
|
|
} else { |
2411 |
|
|
$self->{set_next_input_character}->($self); |
2412 |
|
|
} |
2413 |
|
|
|
2414 |
|
|
} else { |
2415 |
|
|
$self->{parse_error}->(); |
2416 |
|
|
## reconsume |
2417 |
|
|
} |
2418 |
|
|
} |
2419 |
|
|
} else { |
2420 |
|
|
$self->{parse_error}->(); |
2421 |
|
|
unshift @{$self->{char}}, (99, 101, 100, 105, $self->{next_input_character}); |
2422 |
|
|
$self->{next_input_character} = 67; |
2423 |
|
|
} |
2424 |
|
|
} else { |
2425 |
|
|
$self->{parse_error}->(); |
2426 |
|
|
unshift @{$self->{char}}, (99, 101, 100, $self->{next_input_character}); |
2427 |
|
|
$self->{next_input_character} = 67; |
2428 |
|
|
} |
2429 |
|
|
} else { |
2430 |
|
|
$self->{parse_error}->(); |
2431 |
|
|
unshift @{$self->{char}}, (99, 101, $self->{next_input_character}); |
2432 |
|
|
$self->{next_input_character} = 67; |
2433 |
|
|
} |
2434 |
|
|
} else { |
2435 |
|
|
$self->{parse_error}->(); |
2436 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
2437 |
|
|
$self->{next_input_character} = 67; |
2438 |
|
|
} |
2439 |
|
|
} elsif ($self->{next_input_character} == 104) { # h |
2440 |
|
|
|
2441 |
|
|
if (@{$self->{char}}) { |
2442 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2443 |
|
|
} else { |
2444 |
|
|
$self->{set_next_input_character}->($self); |
2445 |
|
|
} |
2446 |
|
|
|
2447 |
|
|
if ($self->{next_input_character} == 105) { # i |
2448 |
|
|
|
2449 |
|
|
if (@{$self->{char}}) { |
2450 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2451 |
|
|
} else { |
2452 |
|
|
$self->{set_next_input_character}->($self); |
2453 |
|
|
} |
2454 |
|
|
|
2455 |
|
|
{ |
2456 |
|
|
$r = {type => 'character', data => qq<\x{03A7}>}; # Chi |
2457 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2458 |
|
|
|
2459 |
|
|
if (@{$self->{char}}) { |
2460 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2461 |
|
|
} else { |
2462 |
|
|
$self->{set_next_input_character}->($self); |
2463 |
|
|
} |
2464 |
|
|
|
2465 |
|
|
} else { |
2466 |
|
|
$self->{parse_error}->(); |
2467 |
|
|
## reconsume |
2468 |
|
|
} |
2469 |
|
|
} |
2470 |
|
|
} else { |
2471 |
|
|
$self->{parse_error}->(); |
2472 |
|
|
unshift @{$self->{char}}, (104, $self->{next_input_character}); |
2473 |
|
|
$self->{next_input_character} = 67; |
2474 |
|
|
} |
2475 |
|
|
} elsif ($self->{next_input_character} == 79) { # O |
2476 |
|
|
|
2477 |
|
|
if (@{$self->{char}}) { |
2478 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2479 |
|
|
} else { |
2480 |
|
|
$self->{set_next_input_character}->($self); |
2481 |
|
|
} |
2482 |
|
|
|
2483 |
|
|
if ($self->{next_input_character} == 80) { # P |
2484 |
|
|
|
2485 |
|
|
if (@{$self->{char}}) { |
2486 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2487 |
|
|
} else { |
2488 |
|
|
$self->{set_next_input_character}->($self); |
2489 |
|
|
} |
2490 |
|
|
|
2491 |
|
|
if ($self->{next_input_character} == 89) { # Y |
2492 |
|
|
|
2493 |
|
|
if (@{$self->{char}}) { |
2494 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2495 |
|
|
} else { |
2496 |
|
|
$self->{set_next_input_character}->($self); |
2497 |
|
|
} |
2498 |
|
|
|
2499 |
|
|
{ |
2500 |
|
|
$r = {type => 'character', data => qq<\x{00A9}>}; # COPY |
2501 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2502 |
|
|
|
2503 |
|
|
if (@{$self->{char}}) { |
2504 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2505 |
|
|
} else { |
2506 |
|
|
$self->{set_next_input_character}->($self); |
2507 |
|
|
} |
2508 |
|
|
|
2509 |
|
|
} else { |
2510 |
|
|
$self->{parse_error}->(); |
2511 |
|
|
## reconsume |
2512 |
|
|
} |
2513 |
|
|
} |
2514 |
|
|
} else { |
2515 |
|
|
$self->{parse_error}->(); |
2516 |
|
|
unshift @{$self->{char}}, (79, 80, $self->{next_input_character}); |
2517 |
|
|
$self->{next_input_character} = 67; |
2518 |
|
|
} |
2519 |
|
|
} else { |
2520 |
|
|
$self->{parse_error}->(); |
2521 |
|
|
unshift @{$self->{char}}, (79, $self->{next_input_character}); |
2522 |
|
|
$self->{next_input_character} = 67; |
2523 |
|
|
} |
2524 |
|
|
} else { |
2525 |
|
|
$self->{parse_error}->(); |
2526 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
2527 |
|
|
$self->{next_input_character} = 67; |
2528 |
|
|
} |
2529 |
|
|
} elsif ($self->{next_input_character} == 68) { # D |
2530 |
|
|
|
2531 |
|
|
if (@{$self->{char}}) { |
2532 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2533 |
|
|
} else { |
2534 |
|
|
$self->{set_next_input_character}->($self); |
2535 |
|
|
} |
2536 |
|
|
|
2537 |
|
|
if ($self->{next_input_character} == 97) { # a |
2538 |
|
|
|
2539 |
|
|
if (@{$self->{char}}) { |
2540 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2541 |
|
|
} else { |
2542 |
|
|
$self->{set_next_input_character}->($self); |
2543 |
|
|
} |
2544 |
|
|
|
2545 |
|
|
if ($self->{next_input_character} == 103) { # g |
2546 |
|
|
|
2547 |
|
|
if (@{$self->{char}}) { |
2548 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2549 |
|
|
} else { |
2550 |
|
|
$self->{set_next_input_character}->($self); |
2551 |
|
|
} |
2552 |
|
|
|
2553 |
|
|
if ($self->{next_input_character} == 103) { # g |
2554 |
|
|
|
2555 |
|
|
if (@{$self->{char}}) { |
2556 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2557 |
|
|
} else { |
2558 |
|
|
$self->{set_next_input_character}->($self); |
2559 |
|
|
} |
2560 |
|
|
|
2561 |
|
|
if ($self->{next_input_character} == 101) { # e |
2562 |
|
|
|
2563 |
|
|
if (@{$self->{char}}) { |
2564 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2565 |
|
|
} else { |
2566 |
|
|
$self->{set_next_input_character}->($self); |
2567 |
|
|
} |
2568 |
|
|
|
2569 |
|
|
if ($self->{next_input_character} == 114) { # r |
2570 |
|
|
|
2571 |
|
|
if (@{$self->{char}}) { |
2572 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2573 |
|
|
} else { |
2574 |
|
|
$self->{set_next_input_character}->($self); |
2575 |
|
|
} |
2576 |
|
|
|
2577 |
|
|
{ |
2578 |
|
|
$r = {type => 'character', data => qq<\x{2021}>}; # Dagger |
2579 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2580 |
|
|
|
2581 |
|
|
if (@{$self->{char}}) { |
2582 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2583 |
|
|
} else { |
2584 |
|
|
$self->{set_next_input_character}->($self); |
2585 |
|
|
} |
2586 |
|
|
|
2587 |
|
|
} else { |
2588 |
|
|
$self->{parse_error}->(); |
2589 |
|
|
## reconsume |
2590 |
|
|
} |
2591 |
|
|
} |
2592 |
|
|
} else { |
2593 |
|
|
$self->{parse_error}->(); |
2594 |
|
|
unshift @{$self->{char}}, (97, 103, 103, 101, $self->{next_input_character}); |
2595 |
|
|
$self->{next_input_character} = 68; |
2596 |
|
|
} |
2597 |
|
|
} else { |
2598 |
|
|
$self->{parse_error}->(); |
2599 |
|
|
unshift @{$self->{char}}, (97, 103, 103, $self->{next_input_character}); |
2600 |
|
|
$self->{next_input_character} = 68; |
2601 |
|
|
} |
2602 |
|
|
} else { |
2603 |
|
|
$self->{parse_error}->(); |
2604 |
|
|
unshift @{$self->{char}}, (97, 103, $self->{next_input_character}); |
2605 |
|
|
$self->{next_input_character} = 68; |
2606 |
|
|
} |
2607 |
|
|
} else { |
2608 |
|
|
$self->{parse_error}->(); |
2609 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
2610 |
|
|
$self->{next_input_character} = 68; |
2611 |
|
|
} |
2612 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
2613 |
|
|
|
2614 |
|
|
if (@{$self->{char}}) { |
2615 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2616 |
|
|
} else { |
2617 |
|
|
$self->{set_next_input_character}->($self); |
2618 |
|
|
} |
2619 |
|
|
|
2620 |
|
|
if ($self->{next_input_character} == 108) { # l |
2621 |
|
|
|
2622 |
|
|
if (@{$self->{char}}) { |
2623 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2624 |
|
|
} else { |
2625 |
|
|
$self->{set_next_input_character}->($self); |
2626 |
|
|
} |
2627 |
|
|
|
2628 |
|
|
if ($self->{next_input_character} == 116) { # t |
2629 |
|
|
|
2630 |
|
|
if (@{$self->{char}}) { |
2631 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2632 |
|
|
} else { |
2633 |
|
|
$self->{set_next_input_character}->($self); |
2634 |
|
|
} |
2635 |
|
|
|
2636 |
|
|
if ($self->{next_input_character} == 97) { # a |
2637 |
|
|
|
2638 |
|
|
if (@{$self->{char}}) { |
2639 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2640 |
|
|
} else { |
2641 |
|
|
$self->{set_next_input_character}->($self); |
2642 |
|
|
} |
2643 |
|
|
|
2644 |
|
|
{ |
2645 |
|
|
$r = {type => 'character', data => qq<\x{0394}>}; # Delta |
2646 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2647 |
|
|
|
2648 |
|
|
if (@{$self->{char}}) { |
2649 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2650 |
|
|
} else { |
2651 |
|
|
$self->{set_next_input_character}->($self); |
2652 |
|
|
} |
2653 |
|
|
|
2654 |
|
|
} else { |
2655 |
|
|
$self->{parse_error}->(); |
2656 |
|
|
## reconsume |
2657 |
|
|
} |
2658 |
|
|
} |
2659 |
|
|
} else { |
2660 |
|
|
$self->{parse_error}->(); |
2661 |
|
|
unshift @{$self->{char}}, (101, 108, 116, $self->{next_input_character}); |
2662 |
|
|
$self->{next_input_character} = 68; |
2663 |
|
|
} |
2664 |
|
|
} else { |
2665 |
|
|
$self->{parse_error}->(); |
2666 |
|
|
unshift @{$self->{char}}, (101, 108, $self->{next_input_character}); |
2667 |
|
|
$self->{next_input_character} = 68; |
2668 |
|
|
} |
2669 |
|
|
} else { |
2670 |
|
|
$self->{parse_error}->(); |
2671 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
2672 |
|
|
$self->{next_input_character} = 68; |
2673 |
|
|
} |
2674 |
|
|
} else { |
2675 |
|
|
$self->{parse_error}->(); |
2676 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
2677 |
|
|
$self->{next_input_character} = 68; |
2678 |
|
|
} |
2679 |
|
|
} elsif ($self->{next_input_character} == 69) { # E |
2680 |
|
|
|
2681 |
|
|
if (@{$self->{char}}) { |
2682 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2683 |
|
|
} else { |
2684 |
|
|
$self->{set_next_input_character}->($self); |
2685 |
|
|
} |
2686 |
|
|
|
2687 |
|
|
if ($self->{next_input_character} == 84) { # T |
2688 |
|
|
|
2689 |
|
|
if (@{$self->{char}}) { |
2690 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2691 |
|
|
} else { |
2692 |
|
|
$self->{set_next_input_character}->($self); |
2693 |
|
|
} |
2694 |
|
|
|
2695 |
|
|
if ($self->{next_input_character} == 72) { # H |
2696 |
|
|
|
2697 |
|
|
if (@{$self->{char}}) { |
2698 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2699 |
|
|
} else { |
2700 |
|
|
$self->{set_next_input_character}->($self); |
2701 |
|
|
} |
2702 |
|
|
|
2703 |
|
|
{ |
2704 |
|
|
$r = {type => 'character', data => qq<\x{00D0}>}; # ETH |
2705 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2706 |
|
|
|
2707 |
|
|
if (@{$self->{char}}) { |
2708 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2709 |
|
|
} else { |
2710 |
|
|
$self->{set_next_input_character}->($self); |
2711 |
|
|
} |
2712 |
|
|
|
2713 |
|
|
} else { |
2714 |
|
|
$self->{parse_error}->(); |
2715 |
|
|
## reconsume |
2716 |
|
|
} |
2717 |
|
|
} |
2718 |
|
|
} else { |
2719 |
|
|
$self->{parse_error}->(); |
2720 |
|
|
unshift @{$self->{char}}, (84, $self->{next_input_character}); |
2721 |
|
|
$self->{next_input_character} = 69; |
2722 |
|
|
} |
2723 |
|
|
} elsif ($self->{next_input_character} == 97) { # a |
2724 |
|
|
|
2725 |
|
|
if (@{$self->{char}}) { |
2726 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2727 |
|
|
} else { |
2728 |
|
|
$self->{set_next_input_character}->($self); |
2729 |
|
|
} |
2730 |
|
|
|
2731 |
|
|
if ($self->{next_input_character} == 99) { # c |
2732 |
|
|
|
2733 |
|
|
if (@{$self->{char}}) { |
2734 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2735 |
|
|
} else { |
2736 |
|
|
$self->{set_next_input_character}->($self); |
2737 |
|
|
} |
2738 |
|
|
|
2739 |
|
|
if ($self->{next_input_character} == 117) { # u |
2740 |
|
|
|
2741 |
|
|
if (@{$self->{char}}) { |
2742 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2743 |
|
|
} else { |
2744 |
|
|
$self->{set_next_input_character}->($self); |
2745 |
|
|
} |
2746 |
|
|
|
2747 |
|
|
if ($self->{next_input_character} == 116) { # t |
2748 |
|
|
|
2749 |
|
|
if (@{$self->{char}}) { |
2750 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2751 |
|
|
} else { |
2752 |
|
|
$self->{set_next_input_character}->($self); |
2753 |
|
|
} |
2754 |
|
|
|
2755 |
|
|
if ($self->{next_input_character} == 101) { # e |
2756 |
|
|
|
2757 |
|
|
if (@{$self->{char}}) { |
2758 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2759 |
|
|
} else { |
2760 |
|
|
$self->{set_next_input_character}->($self); |
2761 |
|
|
} |
2762 |
|
|
|
2763 |
|
|
{ |
2764 |
|
|
$r = {type => 'character', data => qq<\x{00C9}>}; # Eacute |
2765 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2766 |
|
|
|
2767 |
|
|
if (@{$self->{char}}) { |
2768 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2769 |
|
|
} else { |
2770 |
|
|
$self->{set_next_input_character}->($self); |
2771 |
|
|
} |
2772 |
|
|
|
2773 |
|
|
} else { |
2774 |
|
|
$self->{parse_error}->(); |
2775 |
|
|
## reconsume |
2776 |
|
|
} |
2777 |
|
|
} |
2778 |
|
|
} else { |
2779 |
|
|
$self->{parse_error}->(); |
2780 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
2781 |
|
|
$self->{next_input_character} = 69; |
2782 |
|
|
} |
2783 |
|
|
} else { |
2784 |
|
|
$self->{parse_error}->(); |
2785 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
2786 |
|
|
$self->{next_input_character} = 69; |
2787 |
|
|
} |
2788 |
|
|
} else { |
2789 |
|
|
$self->{parse_error}->(); |
2790 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
2791 |
|
|
$self->{next_input_character} = 69; |
2792 |
|
|
} |
2793 |
|
|
} else { |
2794 |
|
|
$self->{parse_error}->(); |
2795 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
2796 |
|
|
$self->{next_input_character} = 69; |
2797 |
|
|
} |
2798 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
2799 |
|
|
|
2800 |
|
|
if (@{$self->{char}}) { |
2801 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2802 |
|
|
} else { |
2803 |
|
|
$self->{set_next_input_character}->($self); |
2804 |
|
|
} |
2805 |
|
|
|
2806 |
|
|
if ($self->{next_input_character} == 105) { # i |
2807 |
|
|
|
2808 |
|
|
if (@{$self->{char}}) { |
2809 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2810 |
|
|
} else { |
2811 |
|
|
$self->{set_next_input_character}->($self); |
2812 |
|
|
} |
2813 |
|
|
|
2814 |
|
|
if ($self->{next_input_character} == 114) { # r |
2815 |
|
|
|
2816 |
|
|
if (@{$self->{char}}) { |
2817 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2818 |
|
|
} else { |
2819 |
|
|
$self->{set_next_input_character}->($self); |
2820 |
|
|
} |
2821 |
|
|
|
2822 |
|
|
if ($self->{next_input_character} == 99) { # c |
2823 |
|
|
|
2824 |
|
|
if (@{$self->{char}}) { |
2825 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2826 |
|
|
} else { |
2827 |
|
|
$self->{set_next_input_character}->($self); |
2828 |
|
|
} |
2829 |
|
|
|
2830 |
|
|
{ |
2831 |
|
|
$r = {type => 'character', data => qq<\x{00CA}>}; # Ecirc |
2832 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2833 |
|
|
|
2834 |
|
|
if (@{$self->{char}}) { |
2835 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2836 |
|
|
} else { |
2837 |
|
|
$self->{set_next_input_character}->($self); |
2838 |
|
|
} |
2839 |
|
|
|
2840 |
|
|
} else { |
2841 |
|
|
$self->{parse_error}->(); |
2842 |
|
|
## reconsume |
2843 |
|
|
} |
2844 |
|
|
} |
2845 |
|
|
} else { |
2846 |
|
|
$self->{parse_error}->(); |
2847 |
|
|
unshift @{$self->{char}}, (99, 105, 114, $self->{next_input_character}); |
2848 |
|
|
$self->{next_input_character} = 69; |
2849 |
|
|
} |
2850 |
|
|
} else { |
2851 |
|
|
$self->{parse_error}->(); |
2852 |
|
|
unshift @{$self->{char}}, (99, 105, $self->{next_input_character}); |
2853 |
|
|
$self->{next_input_character} = 69; |
2854 |
|
|
} |
2855 |
|
|
} else { |
2856 |
|
|
$self->{parse_error}->(); |
2857 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
2858 |
|
|
$self->{next_input_character} = 69; |
2859 |
|
|
} |
2860 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
2861 |
|
|
|
2862 |
|
|
if (@{$self->{char}}) { |
2863 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2864 |
|
|
} else { |
2865 |
|
|
$self->{set_next_input_character}->($self); |
2866 |
|
|
} |
2867 |
|
|
|
2868 |
|
|
if ($self->{next_input_character} == 114) { # r |
2869 |
|
|
|
2870 |
|
|
if (@{$self->{char}}) { |
2871 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2872 |
|
|
} else { |
2873 |
|
|
$self->{set_next_input_character}->($self); |
2874 |
|
|
} |
2875 |
|
|
|
2876 |
|
|
if ($self->{next_input_character} == 97) { # a |
2877 |
|
|
|
2878 |
|
|
if (@{$self->{char}}) { |
2879 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2880 |
|
|
} else { |
2881 |
|
|
$self->{set_next_input_character}->($self); |
2882 |
|
|
} |
2883 |
|
|
|
2884 |
|
|
if ($self->{next_input_character} == 118) { # v |
2885 |
|
|
|
2886 |
|
|
if (@{$self->{char}}) { |
2887 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2888 |
|
|
} else { |
2889 |
|
|
$self->{set_next_input_character}->($self); |
2890 |
|
|
} |
2891 |
|
|
|
2892 |
|
|
if ($self->{next_input_character} == 101) { # e |
2893 |
|
|
|
2894 |
|
|
if (@{$self->{char}}) { |
2895 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2896 |
|
|
} else { |
2897 |
|
|
$self->{set_next_input_character}->($self); |
2898 |
|
|
} |
2899 |
|
|
|
2900 |
|
|
{ |
2901 |
|
|
$r = {type => 'character', data => qq<\x{00C8}>}; # Egrave |
2902 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2903 |
|
|
|
2904 |
|
|
if (@{$self->{char}}) { |
2905 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2906 |
|
|
} else { |
2907 |
|
|
$self->{set_next_input_character}->($self); |
2908 |
|
|
} |
2909 |
|
|
|
2910 |
|
|
} else { |
2911 |
|
|
$self->{parse_error}->(); |
2912 |
|
|
## reconsume |
2913 |
|
|
} |
2914 |
|
|
} |
2915 |
|
|
} else { |
2916 |
|
|
$self->{parse_error}->(); |
2917 |
|
|
unshift @{$self->{char}}, (103, 114, 97, 118, $self->{next_input_character}); |
2918 |
|
|
$self->{next_input_character} = 69; |
2919 |
|
|
} |
2920 |
|
|
} else { |
2921 |
|
|
$self->{parse_error}->(); |
2922 |
|
|
unshift @{$self->{char}}, (103, 114, 97, $self->{next_input_character}); |
2923 |
|
|
$self->{next_input_character} = 69; |
2924 |
|
|
} |
2925 |
|
|
} else { |
2926 |
|
|
$self->{parse_error}->(); |
2927 |
|
|
unshift @{$self->{char}}, (103, 114, $self->{next_input_character}); |
2928 |
|
|
$self->{next_input_character} = 69; |
2929 |
|
|
} |
2930 |
|
|
} else { |
2931 |
|
|
$self->{parse_error}->(); |
2932 |
|
|
unshift @{$self->{char}}, (103, $self->{next_input_character}); |
2933 |
|
|
$self->{next_input_character} = 69; |
2934 |
|
|
} |
2935 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
2936 |
|
|
|
2937 |
|
|
if (@{$self->{char}}) { |
2938 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2939 |
|
|
} else { |
2940 |
|
|
$self->{set_next_input_character}->($self); |
2941 |
|
|
} |
2942 |
|
|
|
2943 |
|
|
if ($self->{next_input_character} == 115) { # s |
2944 |
|
|
|
2945 |
|
|
if (@{$self->{char}}) { |
2946 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2947 |
|
|
} else { |
2948 |
|
|
$self->{set_next_input_character}->($self); |
2949 |
|
|
} |
2950 |
|
|
|
2951 |
|
|
if ($self->{next_input_character} == 105) { # i |
2952 |
|
|
|
2953 |
|
|
if (@{$self->{char}}) { |
2954 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2955 |
|
|
} else { |
2956 |
|
|
$self->{set_next_input_character}->($self); |
2957 |
|
|
} |
2958 |
|
|
|
2959 |
|
|
if ($self->{next_input_character} == 108) { # l |
2960 |
|
|
|
2961 |
|
|
if (@{$self->{char}}) { |
2962 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2963 |
|
|
} else { |
2964 |
|
|
$self->{set_next_input_character}->($self); |
2965 |
|
|
} |
2966 |
|
|
|
2967 |
|
|
if ($self->{next_input_character} == 111) { # o |
2968 |
|
|
|
2969 |
|
|
if (@{$self->{char}}) { |
2970 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2971 |
|
|
} else { |
2972 |
|
|
$self->{set_next_input_character}->($self); |
2973 |
|
|
} |
2974 |
|
|
|
2975 |
|
|
if ($self->{next_input_character} == 110) { # n |
2976 |
|
|
|
2977 |
|
|
if (@{$self->{char}}) { |
2978 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2979 |
|
|
} else { |
2980 |
|
|
$self->{set_next_input_character}->($self); |
2981 |
|
|
} |
2982 |
|
|
|
2983 |
|
|
{ |
2984 |
|
|
$r = {type => 'character', data => qq<\x{0395}>}; # Epsilon |
2985 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
2986 |
|
|
|
2987 |
|
|
if (@{$self->{char}}) { |
2988 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
2989 |
|
|
} else { |
2990 |
|
|
$self->{set_next_input_character}->($self); |
2991 |
|
|
} |
2992 |
|
|
|
2993 |
|
|
} else { |
2994 |
|
|
$self->{parse_error}->(); |
2995 |
|
|
## reconsume |
2996 |
|
|
} |
2997 |
|
|
} |
2998 |
|
|
} else { |
2999 |
|
|
$self->{parse_error}->(); |
3000 |
|
|
unshift @{$self->{char}}, (112, 115, 105, 108, 111, $self->{next_input_character}); |
3001 |
|
|
$self->{next_input_character} = 69; |
3002 |
|
|
} |
3003 |
|
|
} else { |
3004 |
|
|
$self->{parse_error}->(); |
3005 |
|
|
unshift @{$self->{char}}, (112, 115, 105, 108, $self->{next_input_character}); |
3006 |
|
|
$self->{next_input_character} = 69; |
3007 |
|
|
} |
3008 |
|
|
} else { |
3009 |
|
|
$self->{parse_error}->(); |
3010 |
|
|
unshift @{$self->{char}}, (112, 115, 105, $self->{next_input_character}); |
3011 |
|
|
$self->{next_input_character} = 69; |
3012 |
|
|
} |
3013 |
|
|
} else { |
3014 |
|
|
$self->{parse_error}->(); |
3015 |
|
|
unshift @{$self->{char}}, (112, 115, $self->{next_input_character}); |
3016 |
|
|
$self->{next_input_character} = 69; |
3017 |
|
|
} |
3018 |
|
|
} else { |
3019 |
|
|
$self->{parse_error}->(); |
3020 |
|
|
unshift @{$self->{char}}, (112, $self->{next_input_character}); |
3021 |
|
|
$self->{next_input_character} = 69; |
3022 |
|
|
} |
3023 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
3024 |
|
|
|
3025 |
|
|
if (@{$self->{char}}) { |
3026 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3027 |
|
|
} else { |
3028 |
|
|
$self->{set_next_input_character}->($self); |
3029 |
|
|
} |
3030 |
|
|
|
3031 |
|
|
if ($self->{next_input_character} == 97) { # a |
3032 |
|
|
|
3033 |
|
|
if (@{$self->{char}}) { |
3034 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3035 |
|
|
} else { |
3036 |
|
|
$self->{set_next_input_character}->($self); |
3037 |
|
|
} |
3038 |
|
|
|
3039 |
|
|
{ |
3040 |
|
|
$r = {type => 'character', data => qq<\x{0397}>}; # Eta |
3041 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3042 |
|
|
|
3043 |
|
|
if (@{$self->{char}}) { |
3044 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3045 |
|
|
} else { |
3046 |
|
|
$self->{set_next_input_character}->($self); |
3047 |
|
|
} |
3048 |
|
|
|
3049 |
|
|
} else { |
3050 |
|
|
$self->{parse_error}->(); |
3051 |
|
|
## reconsume |
3052 |
|
|
} |
3053 |
|
|
} |
3054 |
|
|
} else { |
3055 |
|
|
$self->{parse_error}->(); |
3056 |
|
|
unshift @{$self->{char}}, (116, $self->{next_input_character}); |
3057 |
|
|
$self->{next_input_character} = 69; |
3058 |
|
|
} |
3059 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
3060 |
|
|
|
3061 |
|
|
if (@{$self->{char}}) { |
3062 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3063 |
|
|
} else { |
3064 |
|
|
$self->{set_next_input_character}->($self); |
3065 |
|
|
} |
3066 |
|
|
|
3067 |
|
|
if ($self->{next_input_character} == 109) { # m |
3068 |
|
|
|
3069 |
|
|
if (@{$self->{char}}) { |
3070 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3071 |
|
|
} else { |
3072 |
|
|
$self->{set_next_input_character}->($self); |
3073 |
|
|
} |
3074 |
|
|
|
3075 |
|
|
if ($self->{next_input_character} == 108) { # l |
3076 |
|
|
|
3077 |
|
|
if (@{$self->{char}}) { |
3078 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3079 |
|
|
} else { |
3080 |
|
|
$self->{set_next_input_character}->($self); |
3081 |
|
|
} |
3082 |
|
|
|
3083 |
|
|
{ |
3084 |
|
|
$r = {type => 'character', data => qq<\x{00CB}>}; # Euml |
3085 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3086 |
|
|
|
3087 |
|
|
if (@{$self->{char}}) { |
3088 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3089 |
|
|
} else { |
3090 |
|
|
$self->{set_next_input_character}->($self); |
3091 |
|
|
} |
3092 |
|
|
|
3093 |
|
|
} else { |
3094 |
|
|
$self->{parse_error}->(); |
3095 |
|
|
## reconsume |
3096 |
|
|
} |
3097 |
|
|
} |
3098 |
|
|
} else { |
3099 |
|
|
$self->{parse_error}->(); |
3100 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
3101 |
|
|
$self->{next_input_character} = 69; |
3102 |
|
|
} |
3103 |
|
|
} else { |
3104 |
|
|
$self->{parse_error}->(); |
3105 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
3106 |
|
|
$self->{next_input_character} = 69; |
3107 |
|
|
} |
3108 |
|
|
} else { |
3109 |
|
|
$self->{parse_error}->(); |
3110 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
3111 |
|
|
$self->{next_input_character} = 69; |
3112 |
|
|
} |
3113 |
|
|
} elsif ($self->{next_input_character} == 71) { # G |
3114 |
|
|
|
3115 |
|
|
if (@{$self->{char}}) { |
3116 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3117 |
|
|
} else { |
3118 |
|
|
$self->{set_next_input_character}->($self); |
3119 |
|
|
} |
3120 |
|
|
|
3121 |
|
|
if ($self->{next_input_character} == 97) { # a |
3122 |
|
|
|
3123 |
|
|
if (@{$self->{char}}) { |
3124 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3125 |
|
|
} else { |
3126 |
|
|
$self->{set_next_input_character}->($self); |
3127 |
|
|
} |
3128 |
|
|
|
3129 |
|
|
if ($self->{next_input_character} == 109) { # m |
3130 |
|
|
|
3131 |
|
|
if (@{$self->{char}}) { |
3132 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3133 |
|
|
} else { |
3134 |
|
|
$self->{set_next_input_character}->($self); |
3135 |
|
|
} |
3136 |
|
|
|
3137 |
|
|
if ($self->{next_input_character} == 109) { # m |
3138 |
|
|
|
3139 |
|
|
if (@{$self->{char}}) { |
3140 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3141 |
|
|
} else { |
3142 |
|
|
$self->{set_next_input_character}->($self); |
3143 |
|
|
} |
3144 |
|
|
|
3145 |
|
|
if ($self->{next_input_character} == 97) { # a |
3146 |
|
|
|
3147 |
|
|
if (@{$self->{char}}) { |
3148 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3149 |
|
|
} else { |
3150 |
|
|
$self->{set_next_input_character}->($self); |
3151 |
|
|
} |
3152 |
|
|
|
3153 |
|
|
{ |
3154 |
|
|
$r = {type => 'character', data => qq<\x{0393}>}; # Gamma |
3155 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3156 |
|
|
|
3157 |
|
|
if (@{$self->{char}}) { |
3158 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3159 |
|
|
} else { |
3160 |
|
|
$self->{set_next_input_character}->($self); |
3161 |
|
|
} |
3162 |
|
|
|
3163 |
|
|
} else { |
3164 |
|
|
$self->{parse_error}->(); |
3165 |
|
|
## reconsume |
3166 |
|
|
} |
3167 |
|
|
} |
3168 |
|
|
} else { |
3169 |
|
|
$self->{parse_error}->(); |
3170 |
|
|
unshift @{$self->{char}}, (97, 109, 109, $self->{next_input_character}); |
3171 |
|
|
$self->{next_input_character} = 71; |
3172 |
|
|
} |
3173 |
|
|
} else { |
3174 |
|
|
$self->{parse_error}->(); |
3175 |
|
|
unshift @{$self->{char}}, (97, 109, $self->{next_input_character}); |
3176 |
|
|
$self->{next_input_character} = 71; |
3177 |
|
|
} |
3178 |
|
|
} else { |
3179 |
|
|
$self->{parse_error}->(); |
3180 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
3181 |
|
|
$self->{next_input_character} = 71; |
3182 |
|
|
} |
3183 |
|
|
} elsif ($self->{next_input_character} == 84) { # T |
3184 |
|
|
|
3185 |
|
|
if (@{$self->{char}}) { |
3186 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3187 |
|
|
} else { |
3188 |
|
|
$self->{set_next_input_character}->($self); |
3189 |
|
|
} |
3190 |
|
|
|
3191 |
|
|
{ |
3192 |
|
|
$r = {type => 'character', data => qq<\x{003E}>}; # GT |
3193 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3194 |
|
|
|
3195 |
|
|
if (@{$self->{char}}) { |
3196 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3197 |
|
|
} else { |
3198 |
|
|
$self->{set_next_input_character}->($self); |
3199 |
|
|
} |
3200 |
|
|
|
3201 |
|
|
} else { |
3202 |
|
|
$self->{parse_error}->(); |
3203 |
|
|
## reconsume |
3204 |
|
|
} |
3205 |
|
|
} |
3206 |
|
|
} else { |
3207 |
|
|
$self->{parse_error}->(); |
3208 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
3209 |
|
|
$self->{next_input_character} = 71; |
3210 |
|
|
} |
3211 |
|
|
} elsif ($self->{next_input_character} == 73) { # I |
3212 |
|
|
|
3213 |
|
|
if (@{$self->{char}}) { |
3214 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3215 |
|
|
} else { |
3216 |
|
|
$self->{set_next_input_character}->($self); |
3217 |
|
|
} |
3218 |
|
|
|
3219 |
|
|
if ($self->{next_input_character} == 97) { # a |
3220 |
|
|
|
3221 |
|
|
if (@{$self->{char}}) { |
3222 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3223 |
|
|
} else { |
3224 |
|
|
$self->{set_next_input_character}->($self); |
3225 |
|
|
} |
3226 |
|
|
|
3227 |
|
|
if ($self->{next_input_character} == 99) { # c |
3228 |
|
|
|
3229 |
|
|
if (@{$self->{char}}) { |
3230 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3231 |
|
|
} else { |
3232 |
|
|
$self->{set_next_input_character}->($self); |
3233 |
|
|
} |
3234 |
|
|
|
3235 |
|
|
if ($self->{next_input_character} == 117) { # u |
3236 |
|
|
|
3237 |
|
|
if (@{$self->{char}}) { |
3238 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3239 |
|
|
} else { |
3240 |
|
|
$self->{set_next_input_character}->($self); |
3241 |
|
|
} |
3242 |
|
|
|
3243 |
|
|
if ($self->{next_input_character} == 116) { # t |
3244 |
|
|
|
3245 |
|
|
if (@{$self->{char}}) { |
3246 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3247 |
|
|
} else { |
3248 |
|
|
$self->{set_next_input_character}->($self); |
3249 |
|
|
} |
3250 |
|
|
|
3251 |
|
|
if ($self->{next_input_character} == 101) { # e |
3252 |
|
|
|
3253 |
|
|
if (@{$self->{char}}) { |
3254 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3255 |
|
|
} else { |
3256 |
|
|
$self->{set_next_input_character}->($self); |
3257 |
|
|
} |
3258 |
|
|
|
3259 |
|
|
{ |
3260 |
|
|
$r = {type => 'character', data => qq<\x{00CD}>}; # Iacute |
3261 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3262 |
|
|
|
3263 |
|
|
if (@{$self->{char}}) { |
3264 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3265 |
|
|
} else { |
3266 |
|
|
$self->{set_next_input_character}->($self); |
3267 |
|
|
} |
3268 |
|
|
|
3269 |
|
|
} else { |
3270 |
|
|
$self->{parse_error}->(); |
3271 |
|
|
## reconsume |
3272 |
|
|
} |
3273 |
|
|
} |
3274 |
|
|
} else { |
3275 |
|
|
$self->{parse_error}->(); |
3276 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
3277 |
|
|
$self->{next_input_character} = 73; |
3278 |
|
|
} |
3279 |
|
|
} else { |
3280 |
|
|
$self->{parse_error}->(); |
3281 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
3282 |
|
|
$self->{next_input_character} = 73; |
3283 |
|
|
} |
3284 |
|
|
} else { |
3285 |
|
|
$self->{parse_error}->(); |
3286 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
3287 |
|
|
$self->{next_input_character} = 73; |
3288 |
|
|
} |
3289 |
|
|
} else { |
3290 |
|
|
$self->{parse_error}->(); |
3291 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
3292 |
|
|
$self->{next_input_character} = 73; |
3293 |
|
|
} |
3294 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
3295 |
|
|
|
3296 |
|
|
if (@{$self->{char}}) { |
3297 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3298 |
|
|
} else { |
3299 |
|
|
$self->{set_next_input_character}->($self); |
3300 |
|
|
} |
3301 |
|
|
|
3302 |
|
|
if ($self->{next_input_character} == 105) { # i |
3303 |
|
|
|
3304 |
|
|
if (@{$self->{char}}) { |
3305 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3306 |
|
|
} else { |
3307 |
|
|
$self->{set_next_input_character}->($self); |
3308 |
|
|
} |
3309 |
|
|
|
3310 |
|
|
if ($self->{next_input_character} == 114) { # r |
3311 |
|
|
|
3312 |
|
|
if (@{$self->{char}}) { |
3313 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3314 |
|
|
} else { |
3315 |
|
|
$self->{set_next_input_character}->($self); |
3316 |
|
|
} |
3317 |
|
|
|
3318 |
|
|
if ($self->{next_input_character} == 99) { # c |
3319 |
|
|
|
3320 |
|
|
if (@{$self->{char}}) { |
3321 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3322 |
|
|
} else { |
3323 |
|
|
$self->{set_next_input_character}->($self); |
3324 |
|
|
} |
3325 |
|
|
|
3326 |
|
|
{ |
3327 |
|
|
$r = {type => 'character', data => qq<\x{00CE}>}; # Icirc |
3328 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3329 |
|
|
|
3330 |
|
|
if (@{$self->{char}}) { |
3331 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3332 |
|
|
} else { |
3333 |
|
|
$self->{set_next_input_character}->($self); |
3334 |
|
|
} |
3335 |
|
|
|
3336 |
|
|
} else { |
3337 |
|
|
$self->{parse_error}->(); |
3338 |
|
|
## reconsume |
3339 |
|
|
} |
3340 |
|
|
} |
3341 |
|
|
} else { |
3342 |
|
|
$self->{parse_error}->(); |
3343 |
|
|
unshift @{$self->{char}}, (99, 105, 114, $self->{next_input_character}); |
3344 |
|
|
$self->{next_input_character} = 73; |
3345 |
|
|
} |
3346 |
|
|
} else { |
3347 |
|
|
$self->{parse_error}->(); |
3348 |
|
|
unshift @{$self->{char}}, (99, 105, $self->{next_input_character}); |
3349 |
|
|
$self->{next_input_character} = 73; |
3350 |
|
|
} |
3351 |
|
|
} else { |
3352 |
|
|
$self->{parse_error}->(); |
3353 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
3354 |
|
|
$self->{next_input_character} = 73; |
3355 |
|
|
} |
3356 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
3357 |
|
|
|
3358 |
|
|
if (@{$self->{char}}) { |
3359 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3360 |
|
|
} else { |
3361 |
|
|
$self->{set_next_input_character}->($self); |
3362 |
|
|
} |
3363 |
|
|
|
3364 |
|
|
if ($self->{next_input_character} == 114) { # r |
3365 |
|
|
|
3366 |
|
|
if (@{$self->{char}}) { |
3367 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3368 |
|
|
} else { |
3369 |
|
|
$self->{set_next_input_character}->($self); |
3370 |
|
|
} |
3371 |
|
|
|
3372 |
|
|
if ($self->{next_input_character} == 97) { # a |
3373 |
|
|
|
3374 |
|
|
if (@{$self->{char}}) { |
3375 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3376 |
|
|
} else { |
3377 |
|
|
$self->{set_next_input_character}->($self); |
3378 |
|
|
} |
3379 |
|
|
|
3380 |
|
|
if ($self->{next_input_character} == 118) { # v |
3381 |
|
|
|
3382 |
|
|
if (@{$self->{char}}) { |
3383 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3384 |
|
|
} else { |
3385 |
|
|
$self->{set_next_input_character}->($self); |
3386 |
|
|
} |
3387 |
|
|
|
3388 |
|
|
if ($self->{next_input_character} == 101) { # e |
3389 |
|
|
|
3390 |
|
|
if (@{$self->{char}}) { |
3391 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3392 |
|
|
} else { |
3393 |
|
|
$self->{set_next_input_character}->($self); |
3394 |
|
|
} |
3395 |
|
|
|
3396 |
|
|
{ |
3397 |
|
|
$r = {type => 'character', data => qq<\x{00CC}>}; # Igrave |
3398 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3399 |
|
|
|
3400 |
|
|
if (@{$self->{char}}) { |
3401 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3402 |
|
|
} else { |
3403 |
|
|
$self->{set_next_input_character}->($self); |
3404 |
|
|
} |
3405 |
|
|
|
3406 |
|
|
} else { |
3407 |
|
|
$self->{parse_error}->(); |
3408 |
|
|
## reconsume |
3409 |
|
|
} |
3410 |
|
|
} |
3411 |
|
|
} else { |
3412 |
|
|
$self->{parse_error}->(); |
3413 |
|
|
unshift @{$self->{char}}, (103, 114, 97, 118, $self->{next_input_character}); |
3414 |
|
|
$self->{next_input_character} = 73; |
3415 |
|
|
} |
3416 |
|
|
} else { |
3417 |
|
|
$self->{parse_error}->(); |
3418 |
|
|
unshift @{$self->{char}}, (103, 114, 97, $self->{next_input_character}); |
3419 |
|
|
$self->{next_input_character} = 73; |
3420 |
|
|
} |
3421 |
|
|
} else { |
3422 |
|
|
$self->{parse_error}->(); |
3423 |
|
|
unshift @{$self->{char}}, (103, 114, $self->{next_input_character}); |
3424 |
|
|
$self->{next_input_character} = 73; |
3425 |
|
|
} |
3426 |
|
|
} else { |
3427 |
|
|
$self->{parse_error}->(); |
3428 |
|
|
unshift @{$self->{char}}, (103, $self->{next_input_character}); |
3429 |
|
|
$self->{next_input_character} = 73; |
3430 |
|
|
} |
3431 |
|
|
} elsif ($self->{next_input_character} == 111) { # o |
3432 |
|
|
|
3433 |
|
|
if (@{$self->{char}}) { |
3434 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3435 |
|
|
} else { |
3436 |
|
|
$self->{set_next_input_character}->($self); |
3437 |
|
|
} |
3438 |
|
|
|
3439 |
|
|
if ($self->{next_input_character} == 116) { # t |
3440 |
|
|
|
3441 |
|
|
if (@{$self->{char}}) { |
3442 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3443 |
|
|
} else { |
3444 |
|
|
$self->{set_next_input_character}->($self); |
3445 |
|
|
} |
3446 |
|
|
|
3447 |
|
|
if ($self->{next_input_character} == 97) { # a |
3448 |
|
|
|
3449 |
|
|
if (@{$self->{char}}) { |
3450 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3451 |
|
|
} else { |
3452 |
|
|
$self->{set_next_input_character}->($self); |
3453 |
|
|
} |
3454 |
|
|
|
3455 |
|
|
{ |
3456 |
|
|
$r = {type => 'character', data => qq<\x{0399}>}; # Iota |
3457 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3458 |
|
|
|
3459 |
|
|
if (@{$self->{char}}) { |
3460 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3461 |
|
|
} else { |
3462 |
|
|
$self->{set_next_input_character}->($self); |
3463 |
|
|
} |
3464 |
|
|
|
3465 |
|
|
} else { |
3466 |
|
|
$self->{parse_error}->(); |
3467 |
|
|
## reconsume |
3468 |
|
|
} |
3469 |
|
|
} |
3470 |
|
|
} else { |
3471 |
|
|
$self->{parse_error}->(); |
3472 |
|
|
unshift @{$self->{char}}, (111, 116, $self->{next_input_character}); |
3473 |
|
|
$self->{next_input_character} = 73; |
3474 |
|
|
} |
3475 |
|
|
} else { |
3476 |
|
|
$self->{parse_error}->(); |
3477 |
|
|
unshift @{$self->{char}}, (111, $self->{next_input_character}); |
3478 |
|
|
$self->{next_input_character} = 73; |
3479 |
|
|
} |
3480 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
3481 |
|
|
|
3482 |
|
|
if (@{$self->{char}}) { |
3483 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3484 |
|
|
} else { |
3485 |
|
|
$self->{set_next_input_character}->($self); |
3486 |
|
|
} |
3487 |
|
|
|
3488 |
|
|
if ($self->{next_input_character} == 109) { # m |
3489 |
|
|
|
3490 |
|
|
if (@{$self->{char}}) { |
3491 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3492 |
|
|
} else { |
3493 |
|
|
$self->{set_next_input_character}->($self); |
3494 |
|
|
} |
3495 |
|
|
|
3496 |
|
|
if ($self->{next_input_character} == 108) { # l |
3497 |
|
|
|
3498 |
|
|
if (@{$self->{char}}) { |
3499 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3500 |
|
|
} else { |
3501 |
|
|
$self->{set_next_input_character}->($self); |
3502 |
|
|
} |
3503 |
|
|
|
3504 |
|
|
{ |
3505 |
|
|
$r = {type => 'character', data => qq<\x{00CF}>}; # Iuml |
3506 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3507 |
|
|
|
3508 |
|
|
if (@{$self->{char}}) { |
3509 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3510 |
|
|
} else { |
3511 |
|
|
$self->{set_next_input_character}->($self); |
3512 |
|
|
} |
3513 |
|
|
|
3514 |
|
|
} else { |
3515 |
|
|
$self->{parse_error}->(); |
3516 |
|
|
## reconsume |
3517 |
|
|
} |
3518 |
|
|
} |
3519 |
|
|
} else { |
3520 |
|
|
$self->{parse_error}->(); |
3521 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
3522 |
|
|
$self->{next_input_character} = 73; |
3523 |
|
|
} |
3524 |
|
|
} else { |
3525 |
|
|
$self->{parse_error}->(); |
3526 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
3527 |
|
|
$self->{next_input_character} = 73; |
3528 |
|
|
} |
3529 |
|
|
} else { |
3530 |
|
|
$self->{parse_error}->(); |
3531 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
3532 |
|
|
$self->{next_input_character} = 73; |
3533 |
|
|
} |
3534 |
|
|
} elsif ($self->{next_input_character} == 75) { # K |
3535 |
|
|
|
3536 |
|
|
if (@{$self->{char}}) { |
3537 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3538 |
|
|
} else { |
3539 |
|
|
$self->{set_next_input_character}->($self); |
3540 |
|
|
} |
3541 |
|
|
|
3542 |
|
|
if ($self->{next_input_character} == 97) { # a |
3543 |
|
|
|
3544 |
|
|
if (@{$self->{char}}) { |
3545 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3546 |
|
|
} else { |
3547 |
|
|
$self->{set_next_input_character}->($self); |
3548 |
|
|
} |
3549 |
|
|
|
3550 |
|
|
if ($self->{next_input_character} == 112) { # p |
3551 |
|
|
|
3552 |
|
|
if (@{$self->{char}}) { |
3553 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3554 |
|
|
} else { |
3555 |
|
|
$self->{set_next_input_character}->($self); |
3556 |
|
|
} |
3557 |
|
|
|
3558 |
|
|
if ($self->{next_input_character} == 112) { # p |
3559 |
|
|
|
3560 |
|
|
if (@{$self->{char}}) { |
3561 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3562 |
|
|
} else { |
3563 |
|
|
$self->{set_next_input_character}->($self); |
3564 |
|
|
} |
3565 |
|
|
|
3566 |
|
|
if ($self->{next_input_character} == 97) { # a |
3567 |
|
|
|
3568 |
|
|
if (@{$self->{char}}) { |
3569 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3570 |
|
|
} else { |
3571 |
|
|
$self->{set_next_input_character}->($self); |
3572 |
|
|
} |
3573 |
|
|
|
3574 |
|
|
{ |
3575 |
|
|
$r = {type => 'character', data => qq<\x{039A}>}; # Kappa |
3576 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3577 |
|
|
|
3578 |
|
|
if (@{$self->{char}}) { |
3579 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3580 |
|
|
} else { |
3581 |
|
|
$self->{set_next_input_character}->($self); |
3582 |
|
|
} |
3583 |
|
|
|
3584 |
|
|
} else { |
3585 |
|
|
$self->{parse_error}->(); |
3586 |
|
|
## reconsume |
3587 |
|
|
} |
3588 |
|
|
} |
3589 |
|
|
} else { |
3590 |
|
|
$self->{parse_error}->(); |
3591 |
|
|
unshift @{$self->{char}}, (97, 112, 112, $self->{next_input_character}); |
3592 |
|
|
$self->{next_input_character} = 75; |
3593 |
|
|
} |
3594 |
|
|
} else { |
3595 |
|
|
$self->{parse_error}->(); |
3596 |
|
|
unshift @{$self->{char}}, (97, 112, $self->{next_input_character}); |
3597 |
|
|
$self->{next_input_character} = 75; |
3598 |
|
|
} |
3599 |
|
|
} else { |
3600 |
|
|
$self->{parse_error}->(); |
3601 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
3602 |
|
|
$self->{next_input_character} = 75; |
3603 |
|
|
} |
3604 |
|
|
} else { |
3605 |
|
|
$self->{parse_error}->(); |
3606 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
3607 |
|
|
$self->{next_input_character} = 75; |
3608 |
|
|
} |
3609 |
|
|
} elsif ($self->{next_input_character} == 76) { # L |
3610 |
|
|
|
3611 |
|
|
if (@{$self->{char}}) { |
3612 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3613 |
|
|
} else { |
3614 |
|
|
$self->{set_next_input_character}->($self); |
3615 |
|
|
} |
3616 |
|
|
|
3617 |
|
|
if ($self->{next_input_character} == 97) { # a |
3618 |
|
|
|
3619 |
|
|
if (@{$self->{char}}) { |
3620 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3621 |
|
|
} else { |
3622 |
|
|
$self->{set_next_input_character}->($self); |
3623 |
|
|
} |
3624 |
|
|
|
3625 |
|
|
if ($self->{next_input_character} == 109) { # m |
3626 |
|
|
|
3627 |
|
|
if (@{$self->{char}}) { |
3628 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3629 |
|
|
} else { |
3630 |
|
|
$self->{set_next_input_character}->($self); |
3631 |
|
|
} |
3632 |
|
|
|
3633 |
|
|
if ($self->{next_input_character} == 98) { # b |
3634 |
|
|
|
3635 |
|
|
if (@{$self->{char}}) { |
3636 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3637 |
|
|
} else { |
3638 |
|
|
$self->{set_next_input_character}->($self); |
3639 |
|
|
} |
3640 |
|
|
|
3641 |
|
|
if ($self->{next_input_character} == 100) { # d |
3642 |
|
|
|
3643 |
|
|
if (@{$self->{char}}) { |
3644 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3645 |
|
|
} else { |
3646 |
|
|
$self->{set_next_input_character}->($self); |
3647 |
|
|
} |
3648 |
|
|
|
3649 |
|
|
if ($self->{next_input_character} == 97) { # a |
3650 |
|
|
|
3651 |
|
|
if (@{$self->{char}}) { |
3652 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3653 |
|
|
} else { |
3654 |
|
|
$self->{set_next_input_character}->($self); |
3655 |
|
|
} |
3656 |
|
|
|
3657 |
|
|
{ |
3658 |
|
|
$r = {type => 'character', data => qq<\x{039B}>}; # Lambda |
3659 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3660 |
|
|
|
3661 |
|
|
if (@{$self->{char}}) { |
3662 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3663 |
|
|
} else { |
3664 |
|
|
$self->{set_next_input_character}->($self); |
3665 |
|
|
} |
3666 |
|
|
|
3667 |
|
|
} else { |
3668 |
|
|
$self->{parse_error}->(); |
3669 |
|
|
## reconsume |
3670 |
|
|
} |
3671 |
|
|
} |
3672 |
|
|
} else { |
3673 |
|
|
$self->{parse_error}->(); |
3674 |
|
|
unshift @{$self->{char}}, (97, 109, 98, 100, $self->{next_input_character}); |
3675 |
|
|
$self->{next_input_character} = 76; |
3676 |
|
|
} |
3677 |
|
|
} else { |
3678 |
|
|
$self->{parse_error}->(); |
3679 |
|
|
unshift @{$self->{char}}, (97, 109, 98, $self->{next_input_character}); |
3680 |
|
|
$self->{next_input_character} = 76; |
3681 |
|
|
} |
3682 |
|
|
} else { |
3683 |
|
|
$self->{parse_error}->(); |
3684 |
|
|
unshift @{$self->{char}}, (97, 109, $self->{next_input_character}); |
3685 |
|
|
$self->{next_input_character} = 76; |
3686 |
|
|
} |
3687 |
|
|
} else { |
3688 |
|
|
$self->{parse_error}->(); |
3689 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
3690 |
|
|
$self->{next_input_character} = 76; |
3691 |
|
|
} |
3692 |
|
|
} elsif ($self->{next_input_character} == 84) { # T |
3693 |
|
|
|
3694 |
|
|
if (@{$self->{char}}) { |
3695 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3696 |
|
|
} else { |
3697 |
|
|
$self->{set_next_input_character}->($self); |
3698 |
|
|
} |
3699 |
|
|
|
3700 |
|
|
{ |
3701 |
|
|
$r = {type => 'character', data => qq<\x{003C}>}; # LT |
3702 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3703 |
|
|
|
3704 |
|
|
if (@{$self->{char}}) { |
3705 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3706 |
|
|
} else { |
3707 |
|
|
$self->{set_next_input_character}->($self); |
3708 |
|
|
} |
3709 |
|
|
|
3710 |
|
|
} else { |
3711 |
|
|
$self->{parse_error}->(); |
3712 |
|
|
## reconsume |
3713 |
|
|
} |
3714 |
|
|
} |
3715 |
|
|
} else { |
3716 |
|
|
$self->{parse_error}->(); |
3717 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
3718 |
|
|
$self->{next_input_character} = 76; |
3719 |
|
|
} |
3720 |
|
|
} elsif ($self->{next_input_character} == 77) { # M |
3721 |
|
|
|
3722 |
|
|
if (@{$self->{char}}) { |
3723 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3724 |
|
|
} else { |
3725 |
|
|
$self->{set_next_input_character}->($self); |
3726 |
|
|
} |
3727 |
|
|
|
3728 |
|
|
if ($self->{next_input_character} == 117) { # u |
3729 |
|
|
|
3730 |
|
|
if (@{$self->{char}}) { |
3731 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3732 |
|
|
} else { |
3733 |
|
|
$self->{set_next_input_character}->($self); |
3734 |
|
|
} |
3735 |
|
|
|
3736 |
|
|
{ |
3737 |
|
|
$r = {type => 'character', data => qq<\x{039C}>}; # Mu |
3738 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3739 |
|
|
|
3740 |
|
|
if (@{$self->{char}}) { |
3741 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3742 |
|
|
} else { |
3743 |
|
|
$self->{set_next_input_character}->($self); |
3744 |
|
|
} |
3745 |
|
|
|
3746 |
|
|
} else { |
3747 |
|
|
$self->{parse_error}->(); |
3748 |
|
|
## reconsume |
3749 |
|
|
} |
3750 |
|
|
} |
3751 |
|
|
} else { |
3752 |
|
|
$self->{parse_error}->(); |
3753 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
3754 |
|
|
$self->{next_input_character} = 77; |
3755 |
|
|
} |
3756 |
|
|
} elsif ($self->{next_input_character} == 78) { # N |
3757 |
|
|
|
3758 |
|
|
if (@{$self->{char}}) { |
3759 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3760 |
|
|
} else { |
3761 |
|
|
$self->{set_next_input_character}->($self); |
3762 |
|
|
} |
3763 |
|
|
|
3764 |
|
|
if ($self->{next_input_character} == 116) { # t |
3765 |
|
|
|
3766 |
|
|
if (@{$self->{char}}) { |
3767 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3768 |
|
|
} else { |
3769 |
|
|
$self->{set_next_input_character}->($self); |
3770 |
|
|
} |
3771 |
|
|
|
3772 |
|
|
if ($self->{next_input_character} == 105) { # i |
3773 |
|
|
|
3774 |
|
|
if (@{$self->{char}}) { |
3775 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3776 |
|
|
} else { |
3777 |
|
|
$self->{set_next_input_character}->($self); |
3778 |
|
|
} |
3779 |
|
|
|
3780 |
|
|
if ($self->{next_input_character} == 108) { # l |
3781 |
|
|
|
3782 |
|
|
if (@{$self->{char}}) { |
3783 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3784 |
|
|
} else { |
3785 |
|
|
$self->{set_next_input_character}->($self); |
3786 |
|
|
} |
3787 |
|
|
|
3788 |
|
|
if ($self->{next_input_character} == 100) { # d |
3789 |
|
|
|
3790 |
|
|
if (@{$self->{char}}) { |
3791 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3792 |
|
|
} else { |
3793 |
|
|
$self->{set_next_input_character}->($self); |
3794 |
|
|
} |
3795 |
|
|
|
3796 |
|
|
if ($self->{next_input_character} == 101) { # e |
3797 |
|
|
|
3798 |
|
|
if (@{$self->{char}}) { |
3799 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3800 |
|
|
} else { |
3801 |
|
|
$self->{set_next_input_character}->($self); |
3802 |
|
|
} |
3803 |
|
|
|
3804 |
|
|
{ |
3805 |
|
|
$r = {type => 'character', data => qq<\x{00D1}>}; # Ntilde |
3806 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3807 |
|
|
|
3808 |
|
|
if (@{$self->{char}}) { |
3809 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3810 |
|
|
} else { |
3811 |
|
|
$self->{set_next_input_character}->($self); |
3812 |
|
|
} |
3813 |
|
|
|
3814 |
|
|
} else { |
3815 |
|
|
$self->{parse_error}->(); |
3816 |
|
|
## reconsume |
3817 |
|
|
} |
3818 |
|
|
} |
3819 |
|
|
} else { |
3820 |
|
|
$self->{parse_error}->(); |
3821 |
|
|
unshift @{$self->{char}}, (116, 105, 108, 100, $self->{next_input_character}); |
3822 |
|
|
$self->{next_input_character} = 78; |
3823 |
|
|
} |
3824 |
|
|
} else { |
3825 |
|
|
$self->{parse_error}->(); |
3826 |
|
|
unshift @{$self->{char}}, (116, 105, 108, $self->{next_input_character}); |
3827 |
|
|
$self->{next_input_character} = 78; |
3828 |
|
|
} |
3829 |
|
|
} else { |
3830 |
|
|
$self->{parse_error}->(); |
3831 |
|
|
unshift @{$self->{char}}, (116, 105, $self->{next_input_character}); |
3832 |
|
|
$self->{next_input_character} = 78; |
3833 |
|
|
} |
3834 |
|
|
} else { |
3835 |
|
|
$self->{parse_error}->(); |
3836 |
|
|
unshift @{$self->{char}}, (116, $self->{next_input_character}); |
3837 |
|
|
$self->{next_input_character} = 78; |
3838 |
|
|
} |
3839 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
3840 |
|
|
|
3841 |
|
|
if (@{$self->{char}}) { |
3842 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3843 |
|
|
} else { |
3844 |
|
|
$self->{set_next_input_character}->($self); |
3845 |
|
|
} |
3846 |
|
|
|
3847 |
|
|
{ |
3848 |
|
|
$r = {type => 'character', data => qq<\x{039D}>}; # Nu |
3849 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3850 |
|
|
|
3851 |
|
|
if (@{$self->{char}}) { |
3852 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3853 |
|
|
} else { |
3854 |
|
|
$self->{set_next_input_character}->($self); |
3855 |
|
|
} |
3856 |
|
|
|
3857 |
|
|
} else { |
3858 |
|
|
$self->{parse_error}->(); |
3859 |
|
|
## reconsume |
3860 |
|
|
} |
3861 |
|
|
} |
3862 |
|
|
} else { |
3863 |
|
|
$self->{parse_error}->(); |
3864 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
3865 |
|
|
$self->{next_input_character} = 78; |
3866 |
|
|
} |
3867 |
|
|
} elsif ($self->{next_input_character} == 79) { # O |
3868 |
|
|
|
3869 |
|
|
if (@{$self->{char}}) { |
3870 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3871 |
|
|
} else { |
3872 |
|
|
$self->{set_next_input_character}->($self); |
3873 |
|
|
} |
3874 |
|
|
|
3875 |
|
|
if ($self->{next_input_character} == 69) { # E |
3876 |
|
|
|
3877 |
|
|
if (@{$self->{char}}) { |
3878 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3879 |
|
|
} else { |
3880 |
|
|
$self->{set_next_input_character}->($self); |
3881 |
|
|
} |
3882 |
|
|
|
3883 |
|
|
if ($self->{next_input_character} == 108) { # l |
3884 |
|
|
|
3885 |
|
|
if (@{$self->{char}}) { |
3886 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3887 |
|
|
} else { |
3888 |
|
|
$self->{set_next_input_character}->($self); |
3889 |
|
|
} |
3890 |
|
|
|
3891 |
|
|
if ($self->{next_input_character} == 105) { # i |
3892 |
|
|
|
3893 |
|
|
if (@{$self->{char}}) { |
3894 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3895 |
|
|
} else { |
3896 |
|
|
$self->{set_next_input_character}->($self); |
3897 |
|
|
} |
3898 |
|
|
|
3899 |
|
|
if ($self->{next_input_character} == 103) { # g |
3900 |
|
|
|
3901 |
|
|
if (@{$self->{char}}) { |
3902 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3903 |
|
|
} else { |
3904 |
|
|
$self->{set_next_input_character}->($self); |
3905 |
|
|
} |
3906 |
|
|
|
3907 |
|
|
{ |
3908 |
|
|
$r = {type => 'character', data => qq<\x{0152}>}; # OElig |
3909 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3910 |
|
|
|
3911 |
|
|
if (@{$self->{char}}) { |
3912 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3913 |
|
|
} else { |
3914 |
|
|
$self->{set_next_input_character}->($self); |
3915 |
|
|
} |
3916 |
|
|
|
3917 |
|
|
} else { |
3918 |
|
|
$self->{parse_error}->(); |
3919 |
|
|
## reconsume |
3920 |
|
|
} |
3921 |
|
|
} |
3922 |
|
|
} else { |
3923 |
|
|
$self->{parse_error}->(); |
3924 |
|
|
unshift @{$self->{char}}, (69, 108, 105, $self->{next_input_character}); |
3925 |
|
|
$self->{next_input_character} = 79; |
3926 |
|
|
} |
3927 |
|
|
} else { |
3928 |
|
|
$self->{parse_error}->(); |
3929 |
|
|
unshift @{$self->{char}}, (69, 108, $self->{next_input_character}); |
3930 |
|
|
$self->{next_input_character} = 79; |
3931 |
|
|
} |
3932 |
|
|
} else { |
3933 |
|
|
$self->{parse_error}->(); |
3934 |
|
|
unshift @{$self->{char}}, (69, $self->{next_input_character}); |
3935 |
|
|
$self->{next_input_character} = 79; |
3936 |
|
|
} |
3937 |
|
|
} elsif ($self->{next_input_character} == 97) { # a |
3938 |
|
|
|
3939 |
|
|
if (@{$self->{char}}) { |
3940 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3941 |
|
|
} else { |
3942 |
|
|
$self->{set_next_input_character}->($self); |
3943 |
|
|
} |
3944 |
|
|
|
3945 |
|
|
if ($self->{next_input_character} == 99) { # c |
3946 |
|
|
|
3947 |
|
|
if (@{$self->{char}}) { |
3948 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3949 |
|
|
} else { |
3950 |
|
|
$self->{set_next_input_character}->($self); |
3951 |
|
|
} |
3952 |
|
|
|
3953 |
|
|
if ($self->{next_input_character} == 117) { # u |
3954 |
|
|
|
3955 |
|
|
if (@{$self->{char}}) { |
3956 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3957 |
|
|
} else { |
3958 |
|
|
$self->{set_next_input_character}->($self); |
3959 |
|
|
} |
3960 |
|
|
|
3961 |
|
|
if ($self->{next_input_character} == 116) { # t |
3962 |
|
|
|
3963 |
|
|
if (@{$self->{char}}) { |
3964 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3965 |
|
|
} else { |
3966 |
|
|
$self->{set_next_input_character}->($self); |
3967 |
|
|
} |
3968 |
|
|
|
3969 |
|
|
if ($self->{next_input_character} == 101) { # e |
3970 |
|
|
|
3971 |
|
|
if (@{$self->{char}}) { |
3972 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3973 |
|
|
} else { |
3974 |
|
|
$self->{set_next_input_character}->($self); |
3975 |
|
|
} |
3976 |
|
|
|
3977 |
|
|
{ |
3978 |
|
|
$r = {type => 'character', data => qq<\x{00D3}>}; # Oacute |
3979 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
3980 |
|
|
|
3981 |
|
|
if (@{$self->{char}}) { |
3982 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
3983 |
|
|
} else { |
3984 |
|
|
$self->{set_next_input_character}->($self); |
3985 |
|
|
} |
3986 |
|
|
|
3987 |
|
|
} else { |
3988 |
|
|
$self->{parse_error}->(); |
3989 |
|
|
## reconsume |
3990 |
|
|
} |
3991 |
|
|
} |
3992 |
|
|
} else { |
3993 |
|
|
$self->{parse_error}->(); |
3994 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
3995 |
|
|
$self->{next_input_character} = 79; |
3996 |
|
|
} |
3997 |
|
|
} else { |
3998 |
|
|
$self->{parse_error}->(); |
3999 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
4000 |
|
|
$self->{next_input_character} = 79; |
4001 |
|
|
} |
4002 |
|
|
} else { |
4003 |
|
|
$self->{parse_error}->(); |
4004 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
4005 |
|
|
$self->{next_input_character} = 79; |
4006 |
|
|
} |
4007 |
|
|
} else { |
4008 |
|
|
$self->{parse_error}->(); |
4009 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
4010 |
|
|
$self->{next_input_character} = 79; |
4011 |
|
|
} |
4012 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
4013 |
|
|
|
4014 |
|
|
if (@{$self->{char}}) { |
4015 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4016 |
|
|
} else { |
4017 |
|
|
$self->{set_next_input_character}->($self); |
4018 |
|
|
} |
4019 |
|
|
|
4020 |
|
|
if ($self->{next_input_character} == 105) { # i |
4021 |
|
|
|
4022 |
|
|
if (@{$self->{char}}) { |
4023 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4024 |
|
|
} else { |
4025 |
|
|
$self->{set_next_input_character}->($self); |
4026 |
|
|
} |
4027 |
|
|
|
4028 |
|
|
if ($self->{next_input_character} == 114) { # r |
4029 |
|
|
|
4030 |
|
|
if (@{$self->{char}}) { |
4031 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4032 |
|
|
} else { |
4033 |
|
|
$self->{set_next_input_character}->($self); |
4034 |
|
|
} |
4035 |
|
|
|
4036 |
|
|
if ($self->{next_input_character} == 99) { # c |
4037 |
|
|
|
4038 |
|
|
if (@{$self->{char}}) { |
4039 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4040 |
|
|
} else { |
4041 |
|
|
$self->{set_next_input_character}->($self); |
4042 |
|
|
} |
4043 |
|
|
|
4044 |
|
|
{ |
4045 |
|
|
$r = {type => 'character', data => qq<\x{00D4}>}; # Ocirc |
4046 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4047 |
|
|
|
4048 |
|
|
if (@{$self->{char}}) { |
4049 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4050 |
|
|
} else { |
4051 |
|
|
$self->{set_next_input_character}->($self); |
4052 |
|
|
} |
4053 |
|
|
|
4054 |
|
|
} else { |
4055 |
|
|
$self->{parse_error}->(); |
4056 |
|
|
## reconsume |
4057 |
|
|
} |
4058 |
|
|
} |
4059 |
|
|
} else { |
4060 |
|
|
$self->{parse_error}->(); |
4061 |
|
|
unshift @{$self->{char}}, (99, 105, 114, $self->{next_input_character}); |
4062 |
|
|
$self->{next_input_character} = 79; |
4063 |
|
|
} |
4064 |
|
|
} else { |
4065 |
|
|
$self->{parse_error}->(); |
4066 |
|
|
unshift @{$self->{char}}, (99, 105, $self->{next_input_character}); |
4067 |
|
|
$self->{next_input_character} = 79; |
4068 |
|
|
} |
4069 |
|
|
} else { |
4070 |
|
|
$self->{parse_error}->(); |
4071 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
4072 |
|
|
$self->{next_input_character} = 79; |
4073 |
|
|
} |
4074 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
4075 |
|
|
|
4076 |
|
|
if (@{$self->{char}}) { |
4077 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4078 |
|
|
} else { |
4079 |
|
|
$self->{set_next_input_character}->($self); |
4080 |
|
|
} |
4081 |
|
|
|
4082 |
|
|
if ($self->{next_input_character} == 114) { # r |
4083 |
|
|
|
4084 |
|
|
if (@{$self->{char}}) { |
4085 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4086 |
|
|
} else { |
4087 |
|
|
$self->{set_next_input_character}->($self); |
4088 |
|
|
} |
4089 |
|
|
|
4090 |
|
|
if ($self->{next_input_character} == 97) { # a |
4091 |
|
|
|
4092 |
|
|
if (@{$self->{char}}) { |
4093 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4094 |
|
|
} else { |
4095 |
|
|
$self->{set_next_input_character}->($self); |
4096 |
|
|
} |
4097 |
|
|
|
4098 |
|
|
if ($self->{next_input_character} == 118) { # v |
4099 |
|
|
|
4100 |
|
|
if (@{$self->{char}}) { |
4101 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4102 |
|
|
} else { |
4103 |
|
|
$self->{set_next_input_character}->($self); |
4104 |
|
|
} |
4105 |
|
|
|
4106 |
|
|
if ($self->{next_input_character} == 101) { # e |
4107 |
|
|
|
4108 |
|
|
if (@{$self->{char}}) { |
4109 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4110 |
|
|
} else { |
4111 |
|
|
$self->{set_next_input_character}->($self); |
4112 |
|
|
} |
4113 |
|
|
|
4114 |
|
|
{ |
4115 |
|
|
$r = {type => 'character', data => qq<\x{00D2}>}; # Ograve |
4116 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4117 |
|
|
|
4118 |
|
|
if (@{$self->{char}}) { |
4119 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4120 |
|
|
} else { |
4121 |
|
|
$self->{set_next_input_character}->($self); |
4122 |
|
|
} |
4123 |
|
|
|
4124 |
|
|
} else { |
4125 |
|
|
$self->{parse_error}->(); |
4126 |
|
|
## reconsume |
4127 |
|
|
} |
4128 |
|
|
} |
4129 |
|
|
} else { |
4130 |
|
|
$self->{parse_error}->(); |
4131 |
|
|
unshift @{$self->{char}}, (103, 114, 97, 118, $self->{next_input_character}); |
4132 |
|
|
$self->{next_input_character} = 79; |
4133 |
|
|
} |
4134 |
|
|
} else { |
4135 |
|
|
$self->{parse_error}->(); |
4136 |
|
|
unshift @{$self->{char}}, (103, 114, 97, $self->{next_input_character}); |
4137 |
|
|
$self->{next_input_character} = 79; |
4138 |
|
|
} |
4139 |
|
|
} else { |
4140 |
|
|
$self->{parse_error}->(); |
4141 |
|
|
unshift @{$self->{char}}, (103, 114, $self->{next_input_character}); |
4142 |
|
|
$self->{next_input_character} = 79; |
4143 |
|
|
} |
4144 |
|
|
} else { |
4145 |
|
|
$self->{parse_error}->(); |
4146 |
|
|
unshift @{$self->{char}}, (103, $self->{next_input_character}); |
4147 |
|
|
$self->{next_input_character} = 79; |
4148 |
|
|
} |
4149 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
4150 |
|
|
|
4151 |
|
|
if (@{$self->{char}}) { |
4152 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4153 |
|
|
} else { |
4154 |
|
|
$self->{set_next_input_character}->($self); |
4155 |
|
|
} |
4156 |
|
|
|
4157 |
|
|
if ($self->{next_input_character} == 101) { # e |
4158 |
|
|
|
4159 |
|
|
if (@{$self->{char}}) { |
4160 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4161 |
|
|
} else { |
4162 |
|
|
$self->{set_next_input_character}->($self); |
4163 |
|
|
} |
4164 |
|
|
|
4165 |
|
|
if ($self->{next_input_character} == 103) { # g |
4166 |
|
|
|
4167 |
|
|
if (@{$self->{char}}) { |
4168 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4169 |
|
|
} else { |
4170 |
|
|
$self->{set_next_input_character}->($self); |
4171 |
|
|
} |
4172 |
|
|
|
4173 |
|
|
if ($self->{next_input_character} == 97) { # a |
4174 |
|
|
|
4175 |
|
|
if (@{$self->{char}}) { |
4176 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4177 |
|
|
} else { |
4178 |
|
|
$self->{set_next_input_character}->($self); |
4179 |
|
|
} |
4180 |
|
|
|
4181 |
|
|
{ |
4182 |
|
|
$r = {type => 'character', data => qq<\x{03A9}>}; # Omega |
4183 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4184 |
|
|
|
4185 |
|
|
if (@{$self->{char}}) { |
4186 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4187 |
|
|
} else { |
4188 |
|
|
$self->{set_next_input_character}->($self); |
4189 |
|
|
} |
4190 |
|
|
|
4191 |
|
|
} else { |
4192 |
|
|
$self->{parse_error}->(); |
4193 |
|
|
## reconsume |
4194 |
|
|
} |
4195 |
|
|
} |
4196 |
|
|
} else { |
4197 |
|
|
$self->{parse_error}->(); |
4198 |
|
|
unshift @{$self->{char}}, (109, 101, 103, $self->{next_input_character}); |
4199 |
|
|
$self->{next_input_character} = 79; |
4200 |
|
|
} |
4201 |
|
|
} else { |
4202 |
|
|
$self->{parse_error}->(); |
4203 |
|
|
unshift @{$self->{char}}, (109, 101, $self->{next_input_character}); |
4204 |
|
|
$self->{next_input_character} = 79; |
4205 |
|
|
} |
4206 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
4207 |
|
|
|
4208 |
|
|
if (@{$self->{char}}) { |
4209 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4210 |
|
|
} else { |
4211 |
|
|
$self->{set_next_input_character}->($self); |
4212 |
|
|
} |
4213 |
|
|
|
4214 |
|
|
if ($self->{next_input_character} == 99) { # c |
4215 |
|
|
|
4216 |
|
|
if (@{$self->{char}}) { |
4217 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4218 |
|
|
} else { |
4219 |
|
|
$self->{set_next_input_character}->($self); |
4220 |
|
|
} |
4221 |
|
|
|
4222 |
|
|
if ($self->{next_input_character} == 114) { # r |
4223 |
|
|
|
4224 |
|
|
if (@{$self->{char}}) { |
4225 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4226 |
|
|
} else { |
4227 |
|
|
$self->{set_next_input_character}->($self); |
4228 |
|
|
} |
4229 |
|
|
|
4230 |
|
|
if ($self->{next_input_character} == 111) { # o |
4231 |
|
|
|
4232 |
|
|
if (@{$self->{char}}) { |
4233 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4234 |
|
|
} else { |
4235 |
|
|
$self->{set_next_input_character}->($self); |
4236 |
|
|
} |
4237 |
|
|
|
4238 |
|
|
if ($self->{next_input_character} == 110) { # n |
4239 |
|
|
|
4240 |
|
|
if (@{$self->{char}}) { |
4241 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4242 |
|
|
} else { |
4243 |
|
|
$self->{set_next_input_character}->($self); |
4244 |
|
|
} |
4245 |
|
|
|
4246 |
|
|
{ |
4247 |
|
|
$r = {type => 'character', data => qq<\x{039F}>}; # Omicron |
4248 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4249 |
|
|
|
4250 |
|
|
if (@{$self->{char}}) { |
4251 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4252 |
|
|
} else { |
4253 |
|
|
$self->{set_next_input_character}->($self); |
4254 |
|
|
} |
4255 |
|
|
|
4256 |
|
|
} else { |
4257 |
|
|
$self->{parse_error}->(); |
4258 |
|
|
## reconsume |
4259 |
|
|
} |
4260 |
|
|
} |
4261 |
|
|
} else { |
4262 |
|
|
$self->{parse_error}->(); |
4263 |
|
|
unshift @{$self->{char}}, (109, 105, 99, 114, 111, $self->{next_input_character}); |
4264 |
|
|
$self->{next_input_character} = 79; |
4265 |
|
|
} |
4266 |
|
|
} else { |
4267 |
|
|
$self->{parse_error}->(); |
4268 |
|
|
unshift @{$self->{char}}, (109, 105, 99, 114, $self->{next_input_character}); |
4269 |
|
|
$self->{next_input_character} = 79; |
4270 |
|
|
} |
4271 |
|
|
} else { |
4272 |
|
|
$self->{parse_error}->(); |
4273 |
|
|
unshift @{$self->{char}}, (109, 105, 99, $self->{next_input_character}); |
4274 |
|
|
$self->{next_input_character} = 79; |
4275 |
|
|
} |
4276 |
|
|
} else { |
4277 |
|
|
$self->{parse_error}->(); |
4278 |
|
|
unshift @{$self->{char}}, (109, 105, $self->{next_input_character}); |
4279 |
|
|
$self->{next_input_character} = 79; |
4280 |
|
|
} |
4281 |
|
|
} else { |
4282 |
|
|
$self->{parse_error}->(); |
4283 |
|
|
unshift @{$self->{char}}, (109, $self->{next_input_character}); |
4284 |
|
|
$self->{next_input_character} = 79; |
4285 |
|
|
} |
4286 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
4287 |
|
|
|
4288 |
|
|
if (@{$self->{char}}) { |
4289 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4290 |
|
|
} else { |
4291 |
|
|
$self->{set_next_input_character}->($self); |
4292 |
|
|
} |
4293 |
|
|
|
4294 |
|
|
if ($self->{next_input_character} == 108) { # l |
4295 |
|
|
|
4296 |
|
|
if (@{$self->{char}}) { |
4297 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4298 |
|
|
} else { |
4299 |
|
|
$self->{set_next_input_character}->($self); |
4300 |
|
|
} |
4301 |
|
|
|
4302 |
|
|
if ($self->{next_input_character} == 97) { # a |
4303 |
|
|
|
4304 |
|
|
if (@{$self->{char}}) { |
4305 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4306 |
|
|
} else { |
4307 |
|
|
$self->{set_next_input_character}->($self); |
4308 |
|
|
} |
4309 |
|
|
|
4310 |
|
|
if ($self->{next_input_character} == 115) { # s |
4311 |
|
|
|
4312 |
|
|
if (@{$self->{char}}) { |
4313 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4314 |
|
|
} else { |
4315 |
|
|
$self->{set_next_input_character}->($self); |
4316 |
|
|
} |
4317 |
|
|
|
4318 |
|
|
if ($self->{next_input_character} == 104) { # h |
4319 |
|
|
|
4320 |
|
|
if (@{$self->{char}}) { |
4321 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4322 |
|
|
} else { |
4323 |
|
|
$self->{set_next_input_character}->($self); |
4324 |
|
|
} |
4325 |
|
|
|
4326 |
|
|
{ |
4327 |
|
|
$r = {type => 'character', data => qq<\x{00D8}>}; # Oslash |
4328 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4329 |
|
|
|
4330 |
|
|
if (@{$self->{char}}) { |
4331 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4332 |
|
|
} else { |
4333 |
|
|
$self->{set_next_input_character}->($self); |
4334 |
|
|
} |
4335 |
|
|
|
4336 |
|
|
} else { |
4337 |
|
|
$self->{parse_error}->(); |
4338 |
|
|
## reconsume |
4339 |
|
|
} |
4340 |
|
|
} |
4341 |
|
|
} else { |
4342 |
|
|
$self->{parse_error}->(); |
4343 |
|
|
unshift @{$self->{char}}, (115, 108, 97, 115, $self->{next_input_character}); |
4344 |
|
|
$self->{next_input_character} = 79; |
4345 |
|
|
} |
4346 |
|
|
} else { |
4347 |
|
|
$self->{parse_error}->(); |
4348 |
|
|
unshift @{$self->{char}}, (115, 108, 97, $self->{next_input_character}); |
4349 |
|
|
$self->{next_input_character} = 79; |
4350 |
|
|
} |
4351 |
|
|
} else { |
4352 |
|
|
$self->{parse_error}->(); |
4353 |
|
|
unshift @{$self->{char}}, (115, 108, $self->{next_input_character}); |
4354 |
|
|
$self->{next_input_character} = 79; |
4355 |
|
|
} |
4356 |
|
|
} else { |
4357 |
|
|
$self->{parse_error}->(); |
4358 |
|
|
unshift @{$self->{char}}, (115, $self->{next_input_character}); |
4359 |
|
|
$self->{next_input_character} = 79; |
4360 |
|
|
} |
4361 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
4362 |
|
|
|
4363 |
|
|
if (@{$self->{char}}) { |
4364 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4365 |
|
|
} else { |
4366 |
|
|
$self->{set_next_input_character}->($self); |
4367 |
|
|
} |
4368 |
|
|
|
4369 |
|
|
if ($self->{next_input_character} == 105) { # i |
4370 |
|
|
|
4371 |
|
|
if (@{$self->{char}}) { |
4372 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4373 |
|
|
} else { |
4374 |
|
|
$self->{set_next_input_character}->($self); |
4375 |
|
|
} |
4376 |
|
|
|
4377 |
|
|
if ($self->{next_input_character} == 108) { # l |
4378 |
|
|
|
4379 |
|
|
if (@{$self->{char}}) { |
4380 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4381 |
|
|
} else { |
4382 |
|
|
$self->{set_next_input_character}->($self); |
4383 |
|
|
} |
4384 |
|
|
|
4385 |
|
|
if ($self->{next_input_character} == 100) { # d |
4386 |
|
|
|
4387 |
|
|
if (@{$self->{char}}) { |
4388 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4389 |
|
|
} else { |
4390 |
|
|
$self->{set_next_input_character}->($self); |
4391 |
|
|
} |
4392 |
|
|
|
4393 |
|
|
if ($self->{next_input_character} == 101) { # e |
4394 |
|
|
|
4395 |
|
|
if (@{$self->{char}}) { |
4396 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4397 |
|
|
} else { |
4398 |
|
|
$self->{set_next_input_character}->($self); |
4399 |
|
|
} |
4400 |
|
|
|
4401 |
|
|
{ |
4402 |
|
|
$r = {type => 'character', data => qq<\x{00D5}>}; # Otilde |
4403 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4404 |
|
|
|
4405 |
|
|
if (@{$self->{char}}) { |
4406 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4407 |
|
|
} else { |
4408 |
|
|
$self->{set_next_input_character}->($self); |
4409 |
|
|
} |
4410 |
|
|
|
4411 |
|
|
} else { |
4412 |
|
|
$self->{parse_error}->(); |
4413 |
|
|
## reconsume |
4414 |
|
|
} |
4415 |
|
|
} |
4416 |
|
|
} else { |
4417 |
|
|
$self->{parse_error}->(); |
4418 |
|
|
unshift @{$self->{char}}, (116, 105, 108, 100, $self->{next_input_character}); |
4419 |
|
|
$self->{next_input_character} = 79; |
4420 |
|
|
} |
4421 |
|
|
} else { |
4422 |
|
|
$self->{parse_error}->(); |
4423 |
|
|
unshift @{$self->{char}}, (116, 105, 108, $self->{next_input_character}); |
4424 |
|
|
$self->{next_input_character} = 79; |
4425 |
|
|
} |
4426 |
|
|
} else { |
4427 |
|
|
$self->{parse_error}->(); |
4428 |
|
|
unshift @{$self->{char}}, (116, 105, $self->{next_input_character}); |
4429 |
|
|
$self->{next_input_character} = 79; |
4430 |
|
|
} |
4431 |
|
|
} else { |
4432 |
|
|
$self->{parse_error}->(); |
4433 |
|
|
unshift @{$self->{char}}, (116, $self->{next_input_character}); |
4434 |
|
|
$self->{next_input_character} = 79; |
4435 |
|
|
} |
4436 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
4437 |
|
|
|
4438 |
|
|
if (@{$self->{char}}) { |
4439 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4440 |
|
|
} else { |
4441 |
|
|
$self->{set_next_input_character}->($self); |
4442 |
|
|
} |
4443 |
|
|
|
4444 |
|
|
if ($self->{next_input_character} == 109) { # m |
4445 |
|
|
|
4446 |
|
|
if (@{$self->{char}}) { |
4447 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4448 |
|
|
} else { |
4449 |
|
|
$self->{set_next_input_character}->($self); |
4450 |
|
|
} |
4451 |
|
|
|
4452 |
|
|
if ($self->{next_input_character} == 108) { # l |
4453 |
|
|
|
4454 |
|
|
if (@{$self->{char}}) { |
4455 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4456 |
|
|
} else { |
4457 |
|
|
$self->{set_next_input_character}->($self); |
4458 |
|
|
} |
4459 |
|
|
|
4460 |
|
|
{ |
4461 |
|
|
$r = {type => 'character', data => qq<\x{00D6}>}; # Ouml |
4462 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4463 |
|
|
|
4464 |
|
|
if (@{$self->{char}}) { |
4465 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4466 |
|
|
} else { |
4467 |
|
|
$self->{set_next_input_character}->($self); |
4468 |
|
|
} |
4469 |
|
|
|
4470 |
|
|
} else { |
4471 |
|
|
$self->{parse_error}->(); |
4472 |
|
|
## reconsume |
4473 |
|
|
} |
4474 |
|
|
} |
4475 |
|
|
} else { |
4476 |
|
|
$self->{parse_error}->(); |
4477 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
4478 |
|
|
$self->{next_input_character} = 79; |
4479 |
|
|
} |
4480 |
|
|
} else { |
4481 |
|
|
$self->{parse_error}->(); |
4482 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
4483 |
|
|
$self->{next_input_character} = 79; |
4484 |
|
|
} |
4485 |
|
|
} else { |
4486 |
|
|
$self->{parse_error}->(); |
4487 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
4488 |
|
|
$self->{next_input_character} = 79; |
4489 |
|
|
} |
4490 |
|
|
} elsif ($self->{next_input_character} == 80) { # P |
4491 |
|
|
|
4492 |
|
|
if (@{$self->{char}}) { |
4493 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4494 |
|
|
} else { |
4495 |
|
|
$self->{set_next_input_character}->($self); |
4496 |
|
|
} |
4497 |
|
|
|
4498 |
|
|
if ($self->{next_input_character} == 104) { # h |
4499 |
|
|
|
4500 |
|
|
if (@{$self->{char}}) { |
4501 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4502 |
|
|
} else { |
4503 |
|
|
$self->{set_next_input_character}->($self); |
4504 |
|
|
} |
4505 |
|
|
|
4506 |
|
|
if ($self->{next_input_character} == 105) { # i |
4507 |
|
|
|
4508 |
|
|
if (@{$self->{char}}) { |
4509 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4510 |
|
|
} else { |
4511 |
|
|
$self->{set_next_input_character}->($self); |
4512 |
|
|
} |
4513 |
|
|
|
4514 |
|
|
{ |
4515 |
|
|
$r = {type => 'character', data => qq<\x{03A6}>}; # Phi |
4516 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4517 |
|
|
|
4518 |
|
|
if (@{$self->{char}}) { |
4519 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4520 |
|
|
} else { |
4521 |
|
|
$self->{set_next_input_character}->($self); |
4522 |
|
|
} |
4523 |
|
|
|
4524 |
|
|
} else { |
4525 |
|
|
$self->{parse_error}->(); |
4526 |
|
|
## reconsume |
4527 |
|
|
} |
4528 |
|
|
} |
4529 |
|
|
} else { |
4530 |
|
|
$self->{parse_error}->(); |
4531 |
|
|
unshift @{$self->{char}}, (104, $self->{next_input_character}); |
4532 |
|
|
$self->{next_input_character} = 80; |
4533 |
|
|
} |
4534 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
4535 |
|
|
|
4536 |
|
|
if (@{$self->{char}}) { |
4537 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4538 |
|
|
} else { |
4539 |
|
|
$self->{set_next_input_character}->($self); |
4540 |
|
|
} |
4541 |
|
|
|
4542 |
|
|
{ |
4543 |
|
|
$r = {type => 'character', data => qq<\x{03A0}>}; # Pi |
4544 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4545 |
|
|
|
4546 |
|
|
if (@{$self->{char}}) { |
4547 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4548 |
|
|
} else { |
4549 |
|
|
$self->{set_next_input_character}->($self); |
4550 |
|
|
} |
4551 |
|
|
|
4552 |
|
|
} else { |
4553 |
|
|
$self->{parse_error}->(); |
4554 |
|
|
## reconsume |
4555 |
|
|
} |
4556 |
|
|
} |
4557 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
4558 |
|
|
|
4559 |
|
|
if (@{$self->{char}}) { |
4560 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4561 |
|
|
} else { |
4562 |
|
|
$self->{set_next_input_character}->($self); |
4563 |
|
|
} |
4564 |
|
|
|
4565 |
|
|
if ($self->{next_input_character} == 105) { # i |
4566 |
|
|
|
4567 |
|
|
if (@{$self->{char}}) { |
4568 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4569 |
|
|
} else { |
4570 |
|
|
$self->{set_next_input_character}->($self); |
4571 |
|
|
} |
4572 |
|
|
|
4573 |
|
|
if ($self->{next_input_character} == 109) { # m |
4574 |
|
|
|
4575 |
|
|
if (@{$self->{char}}) { |
4576 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4577 |
|
|
} else { |
4578 |
|
|
$self->{set_next_input_character}->($self); |
4579 |
|
|
} |
4580 |
|
|
|
4581 |
|
|
if ($self->{next_input_character} == 101) { # e |
4582 |
|
|
|
4583 |
|
|
if (@{$self->{char}}) { |
4584 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4585 |
|
|
} else { |
4586 |
|
|
$self->{set_next_input_character}->($self); |
4587 |
|
|
} |
4588 |
|
|
|
4589 |
|
|
{ |
4590 |
|
|
$r = {type => 'character', data => qq<\x{2033}>}; # Prime |
4591 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4592 |
|
|
|
4593 |
|
|
if (@{$self->{char}}) { |
4594 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4595 |
|
|
} else { |
4596 |
|
|
$self->{set_next_input_character}->($self); |
4597 |
|
|
} |
4598 |
|
|
|
4599 |
|
|
} else { |
4600 |
|
|
$self->{parse_error}->(); |
4601 |
|
|
## reconsume |
4602 |
|
|
} |
4603 |
|
|
} |
4604 |
|
|
} else { |
4605 |
|
|
$self->{parse_error}->(); |
4606 |
|
|
unshift @{$self->{char}}, (114, 105, 109, $self->{next_input_character}); |
4607 |
|
|
$self->{next_input_character} = 80; |
4608 |
|
|
} |
4609 |
|
|
} else { |
4610 |
|
|
$self->{parse_error}->(); |
4611 |
|
|
unshift @{$self->{char}}, (114, 105, $self->{next_input_character}); |
4612 |
|
|
$self->{next_input_character} = 80; |
4613 |
|
|
} |
4614 |
|
|
} else { |
4615 |
|
|
$self->{parse_error}->(); |
4616 |
|
|
unshift @{$self->{char}}, (114, $self->{next_input_character}); |
4617 |
|
|
$self->{next_input_character} = 80; |
4618 |
|
|
} |
4619 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
4620 |
|
|
|
4621 |
|
|
if (@{$self->{char}}) { |
4622 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4623 |
|
|
} else { |
4624 |
|
|
$self->{set_next_input_character}->($self); |
4625 |
|
|
} |
4626 |
|
|
|
4627 |
|
|
if ($self->{next_input_character} == 105) { # i |
4628 |
|
|
|
4629 |
|
|
if (@{$self->{char}}) { |
4630 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4631 |
|
|
} else { |
4632 |
|
|
$self->{set_next_input_character}->($self); |
4633 |
|
|
} |
4634 |
|
|
|
4635 |
|
|
{ |
4636 |
|
|
$r = {type => 'character', data => qq<\x{03A8}>}; # Psi |
4637 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4638 |
|
|
|
4639 |
|
|
if (@{$self->{char}}) { |
4640 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4641 |
|
|
} else { |
4642 |
|
|
$self->{set_next_input_character}->($self); |
4643 |
|
|
} |
4644 |
|
|
|
4645 |
|
|
} else { |
4646 |
|
|
$self->{parse_error}->(); |
4647 |
|
|
## reconsume |
4648 |
|
|
} |
4649 |
|
|
} |
4650 |
|
|
} else { |
4651 |
|
|
$self->{parse_error}->(); |
4652 |
|
|
unshift @{$self->{char}}, (115, $self->{next_input_character}); |
4653 |
|
|
$self->{next_input_character} = 80; |
4654 |
|
|
} |
4655 |
|
|
} else { |
4656 |
|
|
$self->{parse_error}->(); |
4657 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
4658 |
|
|
$self->{next_input_character} = 80; |
4659 |
|
|
} |
4660 |
|
|
} elsif ($self->{next_input_character} == 82) { # R |
4661 |
|
|
|
4662 |
|
|
if (@{$self->{char}}) { |
4663 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4664 |
|
|
} else { |
4665 |
|
|
$self->{set_next_input_character}->($self); |
4666 |
|
|
} |
4667 |
|
|
|
4668 |
|
|
if ($self->{next_input_character} == 104) { # h |
4669 |
|
|
|
4670 |
|
|
if (@{$self->{char}}) { |
4671 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4672 |
|
|
} else { |
4673 |
|
|
$self->{set_next_input_character}->($self); |
4674 |
|
|
} |
4675 |
|
|
|
4676 |
|
|
if ($self->{next_input_character} == 111) { # o |
4677 |
|
|
|
4678 |
|
|
if (@{$self->{char}}) { |
4679 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4680 |
|
|
} else { |
4681 |
|
|
$self->{set_next_input_character}->($self); |
4682 |
|
|
} |
4683 |
|
|
|
4684 |
|
|
{ |
4685 |
|
|
$r = {type => 'character', data => qq<\x{03A1}>}; # Rho |
4686 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4687 |
|
|
|
4688 |
|
|
if (@{$self->{char}}) { |
4689 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4690 |
|
|
} else { |
4691 |
|
|
$self->{set_next_input_character}->($self); |
4692 |
|
|
} |
4693 |
|
|
|
4694 |
|
|
} else { |
4695 |
|
|
$self->{parse_error}->(); |
4696 |
|
|
## reconsume |
4697 |
|
|
} |
4698 |
|
|
} |
4699 |
|
|
} else { |
4700 |
|
|
$self->{parse_error}->(); |
4701 |
|
|
unshift @{$self->{char}}, (104, $self->{next_input_character}); |
4702 |
|
|
$self->{next_input_character} = 82; |
4703 |
|
|
} |
4704 |
|
|
} elsif ($self->{next_input_character} == 69) { # E |
4705 |
|
|
|
4706 |
|
|
if (@{$self->{char}}) { |
4707 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4708 |
|
|
} else { |
4709 |
|
|
$self->{set_next_input_character}->($self); |
4710 |
|
|
} |
4711 |
|
|
|
4712 |
|
|
if ($self->{next_input_character} == 71) { # G |
4713 |
|
|
|
4714 |
|
|
if (@{$self->{char}}) { |
4715 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4716 |
|
|
} else { |
4717 |
|
|
$self->{set_next_input_character}->($self); |
4718 |
|
|
} |
4719 |
|
|
|
4720 |
|
|
{ |
4721 |
|
|
$r = {type => 'character', data => qq<\x{00AE}>}; # REG |
4722 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4723 |
|
|
|
4724 |
|
|
if (@{$self->{char}}) { |
4725 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4726 |
|
|
} else { |
4727 |
|
|
$self->{set_next_input_character}->($self); |
4728 |
|
|
} |
4729 |
|
|
|
4730 |
|
|
} else { |
4731 |
|
|
$self->{parse_error}->(); |
4732 |
|
|
## reconsume |
4733 |
|
|
} |
4734 |
|
|
} |
4735 |
|
|
} else { |
4736 |
|
|
$self->{parse_error}->(); |
4737 |
|
|
unshift @{$self->{char}}, (69, $self->{next_input_character}); |
4738 |
|
|
$self->{next_input_character} = 82; |
4739 |
|
|
} |
4740 |
|
|
} else { |
4741 |
|
|
$self->{parse_error}->(); |
4742 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
4743 |
|
|
$self->{next_input_character} = 82; |
4744 |
|
|
} |
4745 |
|
|
} elsif ($self->{next_input_character} == 83) { # S |
4746 |
|
|
|
4747 |
|
|
if (@{$self->{char}}) { |
4748 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4749 |
|
|
} else { |
4750 |
|
|
$self->{set_next_input_character}->($self); |
4751 |
|
|
} |
4752 |
|
|
|
4753 |
|
|
if ($self->{next_input_character} == 99) { # c |
4754 |
|
|
|
4755 |
|
|
if (@{$self->{char}}) { |
4756 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4757 |
|
|
} else { |
4758 |
|
|
$self->{set_next_input_character}->($self); |
4759 |
|
|
} |
4760 |
|
|
|
4761 |
|
|
if ($self->{next_input_character} == 97) { # a |
4762 |
|
|
|
4763 |
|
|
if (@{$self->{char}}) { |
4764 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4765 |
|
|
} else { |
4766 |
|
|
$self->{set_next_input_character}->($self); |
4767 |
|
|
} |
4768 |
|
|
|
4769 |
|
|
if ($self->{next_input_character} == 114) { # r |
4770 |
|
|
|
4771 |
|
|
if (@{$self->{char}}) { |
4772 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4773 |
|
|
} else { |
4774 |
|
|
$self->{set_next_input_character}->($self); |
4775 |
|
|
} |
4776 |
|
|
|
4777 |
|
|
if ($self->{next_input_character} == 111) { # o |
4778 |
|
|
|
4779 |
|
|
if (@{$self->{char}}) { |
4780 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4781 |
|
|
} else { |
4782 |
|
|
$self->{set_next_input_character}->($self); |
4783 |
|
|
} |
4784 |
|
|
|
4785 |
|
|
if ($self->{next_input_character} == 110) { # n |
4786 |
|
|
|
4787 |
|
|
if (@{$self->{char}}) { |
4788 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4789 |
|
|
} else { |
4790 |
|
|
$self->{set_next_input_character}->($self); |
4791 |
|
|
} |
4792 |
|
|
|
4793 |
|
|
{ |
4794 |
|
|
$r = {type => 'character', data => qq<\x{0160}>}; # Scaron |
4795 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4796 |
|
|
|
4797 |
|
|
if (@{$self->{char}}) { |
4798 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4799 |
|
|
} else { |
4800 |
|
|
$self->{set_next_input_character}->($self); |
4801 |
|
|
} |
4802 |
|
|
|
4803 |
|
|
} else { |
4804 |
|
|
$self->{parse_error}->(); |
4805 |
|
|
## reconsume |
4806 |
|
|
} |
4807 |
|
|
} |
4808 |
|
|
} else { |
4809 |
|
|
$self->{parse_error}->(); |
4810 |
|
|
unshift @{$self->{char}}, (99, 97, 114, 111, $self->{next_input_character}); |
4811 |
|
|
$self->{next_input_character} = 83; |
4812 |
|
|
} |
4813 |
|
|
} else { |
4814 |
|
|
$self->{parse_error}->(); |
4815 |
|
|
unshift @{$self->{char}}, (99, 97, 114, $self->{next_input_character}); |
4816 |
|
|
$self->{next_input_character} = 83; |
4817 |
|
|
} |
4818 |
|
|
} else { |
4819 |
|
|
$self->{parse_error}->(); |
4820 |
|
|
unshift @{$self->{char}}, (99, 97, $self->{next_input_character}); |
4821 |
|
|
$self->{next_input_character} = 83; |
4822 |
|
|
} |
4823 |
|
|
} else { |
4824 |
|
|
$self->{parse_error}->(); |
4825 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
4826 |
|
|
$self->{next_input_character} = 83; |
4827 |
|
|
} |
4828 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
4829 |
|
|
|
4830 |
|
|
if (@{$self->{char}}) { |
4831 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4832 |
|
|
} else { |
4833 |
|
|
$self->{set_next_input_character}->($self); |
4834 |
|
|
} |
4835 |
|
|
|
4836 |
|
|
if ($self->{next_input_character} == 103) { # g |
4837 |
|
|
|
4838 |
|
|
if (@{$self->{char}}) { |
4839 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4840 |
|
|
} else { |
4841 |
|
|
$self->{set_next_input_character}->($self); |
4842 |
|
|
} |
4843 |
|
|
|
4844 |
|
|
if ($self->{next_input_character} == 109) { # m |
4845 |
|
|
|
4846 |
|
|
if (@{$self->{char}}) { |
4847 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4848 |
|
|
} else { |
4849 |
|
|
$self->{set_next_input_character}->($self); |
4850 |
|
|
} |
4851 |
|
|
|
4852 |
|
|
if ($self->{next_input_character} == 97) { # a |
4853 |
|
|
|
4854 |
|
|
if (@{$self->{char}}) { |
4855 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4856 |
|
|
} else { |
4857 |
|
|
$self->{set_next_input_character}->($self); |
4858 |
|
|
} |
4859 |
|
|
|
4860 |
|
|
{ |
4861 |
|
|
$r = {type => 'character', data => qq<\x{03A3}>}; # Sigma |
4862 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4863 |
|
|
|
4864 |
|
|
if (@{$self->{char}}) { |
4865 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4866 |
|
|
} else { |
4867 |
|
|
$self->{set_next_input_character}->($self); |
4868 |
|
|
} |
4869 |
|
|
|
4870 |
|
|
} else { |
4871 |
|
|
$self->{parse_error}->(); |
4872 |
|
|
## reconsume |
4873 |
|
|
} |
4874 |
|
|
} |
4875 |
|
|
} else { |
4876 |
|
|
$self->{parse_error}->(); |
4877 |
|
|
unshift @{$self->{char}}, (105, 103, 109, $self->{next_input_character}); |
4878 |
|
|
$self->{next_input_character} = 83; |
4879 |
|
|
} |
4880 |
|
|
} else { |
4881 |
|
|
$self->{parse_error}->(); |
4882 |
|
|
unshift @{$self->{char}}, (105, 103, $self->{next_input_character}); |
4883 |
|
|
$self->{next_input_character} = 83; |
4884 |
|
|
} |
4885 |
|
|
} else { |
4886 |
|
|
$self->{parse_error}->(); |
4887 |
|
|
unshift @{$self->{char}}, (105, $self->{next_input_character}); |
4888 |
|
|
$self->{next_input_character} = 83; |
4889 |
|
|
} |
4890 |
|
|
} else { |
4891 |
|
|
$self->{parse_error}->(); |
4892 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
4893 |
|
|
$self->{next_input_character} = 83; |
4894 |
|
|
} |
4895 |
|
|
} elsif ($self->{next_input_character} == 84) { # T |
4896 |
|
|
|
4897 |
|
|
if (@{$self->{char}}) { |
4898 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4899 |
|
|
} else { |
4900 |
|
|
$self->{set_next_input_character}->($self); |
4901 |
|
|
} |
4902 |
|
|
|
4903 |
|
|
if ($self->{next_input_character} == 72) { # H |
4904 |
|
|
|
4905 |
|
|
if (@{$self->{char}}) { |
4906 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4907 |
|
|
} else { |
4908 |
|
|
$self->{set_next_input_character}->($self); |
4909 |
|
|
} |
4910 |
|
|
|
4911 |
|
|
if ($self->{next_input_character} == 79) { # O |
4912 |
|
|
|
4913 |
|
|
if (@{$self->{char}}) { |
4914 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4915 |
|
|
} else { |
4916 |
|
|
$self->{set_next_input_character}->($self); |
4917 |
|
|
} |
4918 |
|
|
|
4919 |
|
|
if ($self->{next_input_character} == 82) { # R |
4920 |
|
|
|
4921 |
|
|
if (@{$self->{char}}) { |
4922 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4923 |
|
|
} else { |
4924 |
|
|
$self->{set_next_input_character}->($self); |
4925 |
|
|
} |
4926 |
|
|
|
4927 |
|
|
if ($self->{next_input_character} == 78) { # N |
4928 |
|
|
|
4929 |
|
|
if (@{$self->{char}}) { |
4930 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4931 |
|
|
} else { |
4932 |
|
|
$self->{set_next_input_character}->($self); |
4933 |
|
|
} |
4934 |
|
|
|
4935 |
|
|
{ |
4936 |
|
|
$r = {type => 'character', data => qq<\x{00DE}>}; # THORN |
4937 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4938 |
|
|
|
4939 |
|
|
if (@{$self->{char}}) { |
4940 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4941 |
|
|
} else { |
4942 |
|
|
$self->{set_next_input_character}->($self); |
4943 |
|
|
} |
4944 |
|
|
|
4945 |
|
|
} else { |
4946 |
|
|
$self->{parse_error}->(); |
4947 |
|
|
## reconsume |
4948 |
|
|
} |
4949 |
|
|
} |
4950 |
|
|
} else { |
4951 |
|
|
$self->{parse_error}->(); |
4952 |
|
|
unshift @{$self->{char}}, (72, 79, 82, $self->{next_input_character}); |
4953 |
|
|
$self->{next_input_character} = 84; |
4954 |
|
|
} |
4955 |
|
|
} else { |
4956 |
|
|
$self->{parse_error}->(); |
4957 |
|
|
unshift @{$self->{char}}, (72, 79, $self->{next_input_character}); |
4958 |
|
|
$self->{next_input_character} = 84; |
4959 |
|
|
} |
4960 |
|
|
} else { |
4961 |
|
|
$self->{parse_error}->(); |
4962 |
|
|
unshift @{$self->{char}}, (72, $self->{next_input_character}); |
4963 |
|
|
$self->{next_input_character} = 84; |
4964 |
|
|
} |
4965 |
|
|
} elsif ($self->{next_input_character} == 97) { # a |
4966 |
|
|
|
4967 |
|
|
if (@{$self->{char}}) { |
4968 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4969 |
|
|
} else { |
4970 |
|
|
$self->{set_next_input_character}->($self); |
4971 |
|
|
} |
4972 |
|
|
|
4973 |
|
|
if ($self->{next_input_character} == 117) { # u |
4974 |
|
|
|
4975 |
|
|
if (@{$self->{char}}) { |
4976 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4977 |
|
|
} else { |
4978 |
|
|
$self->{set_next_input_character}->($self); |
4979 |
|
|
} |
4980 |
|
|
|
4981 |
|
|
{ |
4982 |
|
|
$r = {type => 'character', data => qq<\x{03A4}>}; # Tau |
4983 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
4984 |
|
|
|
4985 |
|
|
if (@{$self->{char}}) { |
4986 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
4987 |
|
|
} else { |
4988 |
|
|
$self->{set_next_input_character}->($self); |
4989 |
|
|
} |
4990 |
|
|
|
4991 |
|
|
} else { |
4992 |
|
|
$self->{parse_error}->(); |
4993 |
|
|
## reconsume |
4994 |
|
|
} |
4995 |
|
|
} |
4996 |
|
|
} else { |
4997 |
|
|
$self->{parse_error}->(); |
4998 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
4999 |
|
|
$self->{next_input_character} = 84; |
5000 |
|
|
} |
5001 |
|
|
} elsif ($self->{next_input_character} == 104) { # h |
5002 |
|
|
|
5003 |
|
|
if (@{$self->{char}}) { |
5004 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5005 |
|
|
} else { |
5006 |
|
|
$self->{set_next_input_character}->($self); |
5007 |
|
|
} |
5008 |
|
|
|
5009 |
|
|
if ($self->{next_input_character} == 101) { # e |
5010 |
|
|
|
5011 |
|
|
if (@{$self->{char}}) { |
5012 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5013 |
|
|
} else { |
5014 |
|
|
$self->{set_next_input_character}->($self); |
5015 |
|
|
} |
5016 |
|
|
|
5017 |
|
|
if ($self->{next_input_character} == 116) { # t |
5018 |
|
|
|
5019 |
|
|
if (@{$self->{char}}) { |
5020 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5021 |
|
|
} else { |
5022 |
|
|
$self->{set_next_input_character}->($self); |
5023 |
|
|
} |
5024 |
|
|
|
5025 |
|
|
if ($self->{next_input_character} == 97) { # a |
5026 |
|
|
|
5027 |
|
|
if (@{$self->{char}}) { |
5028 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5029 |
|
|
} else { |
5030 |
|
|
$self->{set_next_input_character}->($self); |
5031 |
|
|
} |
5032 |
|
|
|
5033 |
|
|
{ |
5034 |
|
|
$r = {type => 'character', data => qq<\x{0398}>}; # Theta |
5035 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5036 |
|
|
|
5037 |
|
|
if (@{$self->{char}}) { |
5038 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5039 |
|
|
} else { |
5040 |
|
|
$self->{set_next_input_character}->($self); |
5041 |
|
|
} |
5042 |
|
|
|
5043 |
|
|
} else { |
5044 |
|
|
$self->{parse_error}->(); |
5045 |
|
|
## reconsume |
5046 |
|
|
} |
5047 |
|
|
} |
5048 |
|
|
} else { |
5049 |
|
|
$self->{parse_error}->(); |
5050 |
|
|
unshift @{$self->{char}}, (104, 101, 116, $self->{next_input_character}); |
5051 |
|
|
$self->{next_input_character} = 84; |
5052 |
|
|
} |
5053 |
|
|
} else { |
5054 |
|
|
$self->{parse_error}->(); |
5055 |
|
|
unshift @{$self->{char}}, (104, 101, $self->{next_input_character}); |
5056 |
|
|
$self->{next_input_character} = 84; |
5057 |
|
|
} |
5058 |
|
|
} else { |
5059 |
|
|
$self->{parse_error}->(); |
5060 |
|
|
unshift @{$self->{char}}, (104, $self->{next_input_character}); |
5061 |
|
|
$self->{next_input_character} = 84; |
5062 |
|
|
} |
5063 |
|
|
} else { |
5064 |
|
|
$self->{parse_error}->(); |
5065 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
5066 |
|
|
$self->{next_input_character} = 84; |
5067 |
|
|
} |
5068 |
|
|
} elsif ($self->{next_input_character} == 85) { # U |
5069 |
|
|
|
5070 |
|
|
if (@{$self->{char}}) { |
5071 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5072 |
|
|
} else { |
5073 |
|
|
$self->{set_next_input_character}->($self); |
5074 |
|
|
} |
5075 |
|
|
|
5076 |
|
|
if ($self->{next_input_character} == 97) { # a |
5077 |
|
|
|
5078 |
|
|
if (@{$self->{char}}) { |
5079 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5080 |
|
|
} else { |
5081 |
|
|
$self->{set_next_input_character}->($self); |
5082 |
|
|
} |
5083 |
|
|
|
5084 |
|
|
if ($self->{next_input_character} == 99) { # c |
5085 |
|
|
|
5086 |
|
|
if (@{$self->{char}}) { |
5087 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5088 |
|
|
} else { |
5089 |
|
|
$self->{set_next_input_character}->($self); |
5090 |
|
|
} |
5091 |
|
|
|
5092 |
|
|
if ($self->{next_input_character} == 117) { # u |
5093 |
|
|
|
5094 |
|
|
if (@{$self->{char}}) { |
5095 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5096 |
|
|
} else { |
5097 |
|
|
$self->{set_next_input_character}->($self); |
5098 |
|
|
} |
5099 |
|
|
|
5100 |
|
|
if ($self->{next_input_character} == 116) { # t |
5101 |
|
|
|
5102 |
|
|
if (@{$self->{char}}) { |
5103 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5104 |
|
|
} else { |
5105 |
|
|
$self->{set_next_input_character}->($self); |
5106 |
|
|
} |
5107 |
|
|
|
5108 |
|
|
if ($self->{next_input_character} == 101) { # e |
5109 |
|
|
|
5110 |
|
|
if (@{$self->{char}}) { |
5111 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5112 |
|
|
} else { |
5113 |
|
|
$self->{set_next_input_character}->($self); |
5114 |
|
|
} |
5115 |
|
|
|
5116 |
|
|
{ |
5117 |
|
|
$r = {type => 'character', data => qq<\x{00DA}>}; # Uacute |
5118 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5119 |
|
|
|
5120 |
|
|
if (@{$self->{char}}) { |
5121 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5122 |
|
|
} else { |
5123 |
|
|
$self->{set_next_input_character}->($self); |
5124 |
|
|
} |
5125 |
|
|
|
5126 |
|
|
} else { |
5127 |
|
|
$self->{parse_error}->(); |
5128 |
|
|
## reconsume |
5129 |
|
|
} |
5130 |
|
|
} |
5131 |
|
|
} else { |
5132 |
|
|
$self->{parse_error}->(); |
5133 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
5134 |
|
|
$self->{next_input_character} = 85; |
5135 |
|
|
} |
5136 |
|
|
} else { |
5137 |
|
|
$self->{parse_error}->(); |
5138 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
5139 |
|
|
$self->{next_input_character} = 85; |
5140 |
|
|
} |
5141 |
|
|
} else { |
5142 |
|
|
$self->{parse_error}->(); |
5143 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
5144 |
|
|
$self->{next_input_character} = 85; |
5145 |
|
|
} |
5146 |
|
|
} else { |
5147 |
|
|
$self->{parse_error}->(); |
5148 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
5149 |
|
|
$self->{next_input_character} = 85; |
5150 |
|
|
} |
5151 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
5152 |
|
|
|
5153 |
|
|
if (@{$self->{char}}) { |
5154 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5155 |
|
|
} else { |
5156 |
|
|
$self->{set_next_input_character}->($self); |
5157 |
|
|
} |
5158 |
|
|
|
5159 |
|
|
if ($self->{next_input_character} == 105) { # i |
5160 |
|
|
|
5161 |
|
|
if (@{$self->{char}}) { |
5162 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5163 |
|
|
} else { |
5164 |
|
|
$self->{set_next_input_character}->($self); |
5165 |
|
|
} |
5166 |
|
|
|
5167 |
|
|
if ($self->{next_input_character} == 114) { # r |
5168 |
|
|
|
5169 |
|
|
if (@{$self->{char}}) { |
5170 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5171 |
|
|
} else { |
5172 |
|
|
$self->{set_next_input_character}->($self); |
5173 |
|
|
} |
5174 |
|
|
|
5175 |
|
|
if ($self->{next_input_character} == 99) { # c |
5176 |
|
|
|
5177 |
|
|
if (@{$self->{char}}) { |
5178 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5179 |
|
|
} else { |
5180 |
|
|
$self->{set_next_input_character}->($self); |
5181 |
|
|
} |
5182 |
|
|
|
5183 |
|
|
{ |
5184 |
|
|
$r = {type => 'character', data => qq<\x{00DB}>}; # Ucirc |
5185 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5186 |
|
|
|
5187 |
|
|
if (@{$self->{char}}) { |
5188 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5189 |
|
|
} else { |
5190 |
|
|
$self->{set_next_input_character}->($self); |
5191 |
|
|
} |
5192 |
|
|
|
5193 |
|
|
} else { |
5194 |
|
|
$self->{parse_error}->(); |
5195 |
|
|
## reconsume |
5196 |
|
|
} |
5197 |
|
|
} |
5198 |
|
|
} else { |
5199 |
|
|
$self->{parse_error}->(); |
5200 |
|
|
unshift @{$self->{char}}, (99, 105, 114, $self->{next_input_character}); |
5201 |
|
|
$self->{next_input_character} = 85; |
5202 |
|
|
} |
5203 |
|
|
} else { |
5204 |
|
|
$self->{parse_error}->(); |
5205 |
|
|
unshift @{$self->{char}}, (99, 105, $self->{next_input_character}); |
5206 |
|
|
$self->{next_input_character} = 85; |
5207 |
|
|
} |
5208 |
|
|
} else { |
5209 |
|
|
$self->{parse_error}->(); |
5210 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
5211 |
|
|
$self->{next_input_character} = 85; |
5212 |
|
|
} |
5213 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
5214 |
|
|
|
5215 |
|
|
if (@{$self->{char}}) { |
5216 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5217 |
|
|
} else { |
5218 |
|
|
$self->{set_next_input_character}->($self); |
5219 |
|
|
} |
5220 |
|
|
|
5221 |
|
|
if ($self->{next_input_character} == 114) { # r |
5222 |
|
|
|
5223 |
|
|
if (@{$self->{char}}) { |
5224 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5225 |
|
|
} else { |
5226 |
|
|
$self->{set_next_input_character}->($self); |
5227 |
|
|
} |
5228 |
|
|
|
5229 |
|
|
if ($self->{next_input_character} == 97) { # a |
5230 |
|
|
|
5231 |
|
|
if (@{$self->{char}}) { |
5232 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5233 |
|
|
} else { |
5234 |
|
|
$self->{set_next_input_character}->($self); |
5235 |
|
|
} |
5236 |
|
|
|
5237 |
|
|
if ($self->{next_input_character} == 118) { # v |
5238 |
|
|
|
5239 |
|
|
if (@{$self->{char}}) { |
5240 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5241 |
|
|
} else { |
5242 |
|
|
$self->{set_next_input_character}->($self); |
5243 |
|
|
} |
5244 |
|
|
|
5245 |
|
|
if ($self->{next_input_character} == 101) { # e |
5246 |
|
|
|
5247 |
|
|
if (@{$self->{char}}) { |
5248 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5249 |
|
|
} else { |
5250 |
|
|
$self->{set_next_input_character}->($self); |
5251 |
|
|
} |
5252 |
|
|
|
5253 |
|
|
{ |
5254 |
|
|
$r = {type => 'character', data => qq<\x{00D9}>}; # Ugrave |
5255 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5256 |
|
|
|
5257 |
|
|
if (@{$self->{char}}) { |
5258 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5259 |
|
|
} else { |
5260 |
|
|
$self->{set_next_input_character}->($self); |
5261 |
|
|
} |
5262 |
|
|
|
5263 |
|
|
} else { |
5264 |
|
|
$self->{parse_error}->(); |
5265 |
|
|
## reconsume |
5266 |
|
|
} |
5267 |
|
|
} |
5268 |
|
|
} else { |
5269 |
|
|
$self->{parse_error}->(); |
5270 |
|
|
unshift @{$self->{char}}, (103, 114, 97, 118, $self->{next_input_character}); |
5271 |
|
|
$self->{next_input_character} = 85; |
5272 |
|
|
} |
5273 |
|
|
} else { |
5274 |
|
|
$self->{parse_error}->(); |
5275 |
|
|
unshift @{$self->{char}}, (103, 114, 97, $self->{next_input_character}); |
5276 |
|
|
$self->{next_input_character} = 85; |
5277 |
|
|
} |
5278 |
|
|
} else { |
5279 |
|
|
$self->{parse_error}->(); |
5280 |
|
|
unshift @{$self->{char}}, (103, 114, $self->{next_input_character}); |
5281 |
|
|
$self->{next_input_character} = 85; |
5282 |
|
|
} |
5283 |
|
|
} else { |
5284 |
|
|
$self->{parse_error}->(); |
5285 |
|
|
unshift @{$self->{char}}, (103, $self->{next_input_character}); |
5286 |
|
|
$self->{next_input_character} = 85; |
5287 |
|
|
} |
5288 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
5289 |
|
|
|
5290 |
|
|
if (@{$self->{char}}) { |
5291 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5292 |
|
|
} else { |
5293 |
|
|
$self->{set_next_input_character}->($self); |
5294 |
|
|
} |
5295 |
|
|
|
5296 |
|
|
if ($self->{next_input_character} == 115) { # s |
5297 |
|
|
|
5298 |
|
|
if (@{$self->{char}}) { |
5299 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5300 |
|
|
} else { |
5301 |
|
|
$self->{set_next_input_character}->($self); |
5302 |
|
|
} |
5303 |
|
|
|
5304 |
|
|
if ($self->{next_input_character} == 105) { # i |
5305 |
|
|
|
5306 |
|
|
if (@{$self->{char}}) { |
5307 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5308 |
|
|
} else { |
5309 |
|
|
$self->{set_next_input_character}->($self); |
5310 |
|
|
} |
5311 |
|
|
|
5312 |
|
|
if ($self->{next_input_character} == 108) { # l |
5313 |
|
|
|
5314 |
|
|
if (@{$self->{char}}) { |
5315 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5316 |
|
|
} else { |
5317 |
|
|
$self->{set_next_input_character}->($self); |
5318 |
|
|
} |
5319 |
|
|
|
5320 |
|
|
if ($self->{next_input_character} == 111) { # o |
5321 |
|
|
|
5322 |
|
|
if (@{$self->{char}}) { |
5323 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5324 |
|
|
} else { |
5325 |
|
|
$self->{set_next_input_character}->($self); |
5326 |
|
|
} |
5327 |
|
|
|
5328 |
|
|
if ($self->{next_input_character} == 110) { # n |
5329 |
|
|
|
5330 |
|
|
if (@{$self->{char}}) { |
5331 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5332 |
|
|
} else { |
5333 |
|
|
$self->{set_next_input_character}->($self); |
5334 |
|
|
} |
5335 |
|
|
|
5336 |
|
|
{ |
5337 |
|
|
$r = {type => 'character', data => qq<\x{03A5}>}; # Upsilon |
5338 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5339 |
|
|
|
5340 |
|
|
if (@{$self->{char}}) { |
5341 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5342 |
|
|
} else { |
5343 |
|
|
$self->{set_next_input_character}->($self); |
5344 |
|
|
} |
5345 |
|
|
|
5346 |
|
|
} else { |
5347 |
|
|
$self->{parse_error}->(); |
5348 |
|
|
## reconsume |
5349 |
|
|
} |
5350 |
|
|
} |
5351 |
|
|
} else { |
5352 |
|
|
$self->{parse_error}->(); |
5353 |
|
|
unshift @{$self->{char}}, (112, 115, 105, 108, 111, $self->{next_input_character}); |
5354 |
|
|
$self->{next_input_character} = 85; |
5355 |
|
|
} |
5356 |
|
|
} else { |
5357 |
|
|
$self->{parse_error}->(); |
5358 |
|
|
unshift @{$self->{char}}, (112, 115, 105, 108, $self->{next_input_character}); |
5359 |
|
|
$self->{next_input_character} = 85; |
5360 |
|
|
} |
5361 |
|
|
} else { |
5362 |
|
|
$self->{parse_error}->(); |
5363 |
|
|
unshift @{$self->{char}}, (112, 115, 105, $self->{next_input_character}); |
5364 |
|
|
$self->{next_input_character} = 85; |
5365 |
|
|
} |
5366 |
|
|
} else { |
5367 |
|
|
$self->{parse_error}->(); |
5368 |
|
|
unshift @{$self->{char}}, (112, 115, $self->{next_input_character}); |
5369 |
|
|
$self->{next_input_character} = 85; |
5370 |
|
|
} |
5371 |
|
|
} else { |
5372 |
|
|
$self->{parse_error}->(); |
5373 |
|
|
unshift @{$self->{char}}, (112, $self->{next_input_character}); |
5374 |
|
|
$self->{next_input_character} = 85; |
5375 |
|
|
} |
5376 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
5377 |
|
|
|
5378 |
|
|
if (@{$self->{char}}) { |
5379 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5380 |
|
|
} else { |
5381 |
|
|
$self->{set_next_input_character}->($self); |
5382 |
|
|
} |
5383 |
|
|
|
5384 |
|
|
if ($self->{next_input_character} == 109) { # m |
5385 |
|
|
|
5386 |
|
|
if (@{$self->{char}}) { |
5387 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5388 |
|
|
} else { |
5389 |
|
|
$self->{set_next_input_character}->($self); |
5390 |
|
|
} |
5391 |
|
|
|
5392 |
|
|
if ($self->{next_input_character} == 108) { # l |
5393 |
|
|
|
5394 |
|
|
if (@{$self->{char}}) { |
5395 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5396 |
|
|
} else { |
5397 |
|
|
$self->{set_next_input_character}->($self); |
5398 |
|
|
} |
5399 |
|
|
|
5400 |
|
|
{ |
5401 |
|
|
$r = {type => 'character', data => qq<\x{00DC}>}; # Uuml |
5402 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5403 |
|
|
|
5404 |
|
|
if (@{$self->{char}}) { |
5405 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5406 |
|
|
} else { |
5407 |
|
|
$self->{set_next_input_character}->($self); |
5408 |
|
|
} |
5409 |
|
|
|
5410 |
|
|
} else { |
5411 |
|
|
$self->{parse_error}->(); |
5412 |
|
|
## reconsume |
5413 |
|
|
} |
5414 |
|
|
} |
5415 |
|
|
} else { |
5416 |
|
|
$self->{parse_error}->(); |
5417 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
5418 |
|
|
$self->{next_input_character} = 85; |
5419 |
|
|
} |
5420 |
|
|
} else { |
5421 |
|
|
$self->{parse_error}->(); |
5422 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
5423 |
|
|
$self->{next_input_character} = 85; |
5424 |
|
|
} |
5425 |
|
|
} else { |
5426 |
|
|
$self->{parse_error}->(); |
5427 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
5428 |
|
|
$self->{next_input_character} = 85; |
5429 |
|
|
} |
5430 |
|
|
} elsif ($self->{next_input_character} == 88) { # X |
5431 |
|
|
|
5432 |
|
|
if (@{$self->{char}}) { |
5433 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5434 |
|
|
} else { |
5435 |
|
|
$self->{set_next_input_character}->($self); |
5436 |
|
|
} |
5437 |
|
|
|
5438 |
|
|
if ($self->{next_input_character} == 105) { # i |
5439 |
|
|
|
5440 |
|
|
if (@{$self->{char}}) { |
5441 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5442 |
|
|
} else { |
5443 |
|
|
$self->{set_next_input_character}->($self); |
5444 |
|
|
} |
5445 |
|
|
|
5446 |
|
|
{ |
5447 |
|
|
$r = {type => 'character', data => qq<\x{039E}>}; # Xi |
5448 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5449 |
|
|
|
5450 |
|
|
if (@{$self->{char}}) { |
5451 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5452 |
|
|
} else { |
5453 |
|
|
$self->{set_next_input_character}->($self); |
5454 |
|
|
} |
5455 |
|
|
|
5456 |
|
|
} else { |
5457 |
|
|
$self->{parse_error}->(); |
5458 |
|
|
## reconsume |
5459 |
|
|
} |
5460 |
|
|
} |
5461 |
|
|
} else { |
5462 |
|
|
$self->{parse_error}->(); |
5463 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
5464 |
|
|
$self->{next_input_character} = 88; |
5465 |
|
|
} |
5466 |
|
|
} elsif ($self->{next_input_character} == 89) { # Y |
5467 |
|
|
|
5468 |
|
|
if (@{$self->{char}}) { |
5469 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5470 |
|
|
} else { |
5471 |
|
|
$self->{set_next_input_character}->($self); |
5472 |
|
|
} |
5473 |
|
|
|
5474 |
|
|
if ($self->{next_input_character} == 97) { # a |
5475 |
|
|
|
5476 |
|
|
if (@{$self->{char}}) { |
5477 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5478 |
|
|
} else { |
5479 |
|
|
$self->{set_next_input_character}->($self); |
5480 |
|
|
} |
5481 |
|
|
|
5482 |
|
|
if ($self->{next_input_character} == 99) { # c |
5483 |
|
|
|
5484 |
|
|
if (@{$self->{char}}) { |
5485 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5486 |
|
|
} else { |
5487 |
|
|
$self->{set_next_input_character}->($self); |
5488 |
|
|
} |
5489 |
|
|
|
5490 |
|
|
if ($self->{next_input_character} == 117) { # u |
5491 |
|
|
|
5492 |
|
|
if (@{$self->{char}}) { |
5493 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5494 |
|
|
} else { |
5495 |
|
|
$self->{set_next_input_character}->($self); |
5496 |
|
|
} |
5497 |
|
|
|
5498 |
|
|
if ($self->{next_input_character} == 116) { # t |
5499 |
|
|
|
5500 |
|
|
if (@{$self->{char}}) { |
5501 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5502 |
|
|
} else { |
5503 |
|
|
$self->{set_next_input_character}->($self); |
5504 |
|
|
} |
5505 |
|
|
|
5506 |
|
|
if ($self->{next_input_character} == 101) { # e |
5507 |
|
|
|
5508 |
|
|
if (@{$self->{char}}) { |
5509 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5510 |
|
|
} else { |
5511 |
|
|
$self->{set_next_input_character}->($self); |
5512 |
|
|
} |
5513 |
|
|
|
5514 |
|
|
{ |
5515 |
|
|
$r = {type => 'character', data => qq<\x{00DD}>}; # Yacute |
5516 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5517 |
|
|
|
5518 |
|
|
if (@{$self->{char}}) { |
5519 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5520 |
|
|
} else { |
5521 |
|
|
$self->{set_next_input_character}->($self); |
5522 |
|
|
} |
5523 |
|
|
|
5524 |
|
|
} else { |
5525 |
|
|
$self->{parse_error}->(); |
5526 |
|
|
## reconsume |
5527 |
|
|
} |
5528 |
|
|
} |
5529 |
|
|
} else { |
5530 |
|
|
$self->{parse_error}->(); |
5531 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
5532 |
|
|
$self->{next_input_character} = 89; |
5533 |
|
|
} |
5534 |
|
|
} else { |
5535 |
|
|
$self->{parse_error}->(); |
5536 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
5537 |
|
|
$self->{next_input_character} = 89; |
5538 |
|
|
} |
5539 |
|
|
} else { |
5540 |
|
|
$self->{parse_error}->(); |
5541 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
5542 |
|
|
$self->{next_input_character} = 89; |
5543 |
|
|
} |
5544 |
|
|
} else { |
5545 |
|
|
$self->{parse_error}->(); |
5546 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
5547 |
|
|
$self->{next_input_character} = 89; |
5548 |
|
|
} |
5549 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
5550 |
|
|
|
5551 |
|
|
if (@{$self->{char}}) { |
5552 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5553 |
|
|
} else { |
5554 |
|
|
$self->{set_next_input_character}->($self); |
5555 |
|
|
} |
5556 |
|
|
|
5557 |
|
|
if ($self->{next_input_character} == 109) { # m |
5558 |
|
|
|
5559 |
|
|
if (@{$self->{char}}) { |
5560 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5561 |
|
|
} else { |
5562 |
|
|
$self->{set_next_input_character}->($self); |
5563 |
|
|
} |
5564 |
|
|
|
5565 |
|
|
if ($self->{next_input_character} == 108) { # l |
5566 |
|
|
|
5567 |
|
|
if (@{$self->{char}}) { |
5568 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5569 |
|
|
} else { |
5570 |
|
|
$self->{set_next_input_character}->($self); |
5571 |
|
|
} |
5572 |
|
|
|
5573 |
|
|
{ |
5574 |
|
|
$r = {type => 'character', data => qq<\x{0178}>}; # Yuml |
5575 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5576 |
|
|
|
5577 |
|
|
if (@{$self->{char}}) { |
5578 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5579 |
|
|
} else { |
5580 |
|
|
$self->{set_next_input_character}->($self); |
5581 |
|
|
} |
5582 |
|
|
|
5583 |
|
|
} else { |
5584 |
|
|
$self->{parse_error}->(); |
5585 |
|
|
## reconsume |
5586 |
|
|
} |
5587 |
|
|
} |
5588 |
|
|
} else { |
5589 |
|
|
$self->{parse_error}->(); |
5590 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
5591 |
|
|
$self->{next_input_character} = 89; |
5592 |
|
|
} |
5593 |
|
|
} else { |
5594 |
|
|
$self->{parse_error}->(); |
5595 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
5596 |
|
|
$self->{next_input_character} = 89; |
5597 |
|
|
} |
5598 |
|
|
} else { |
5599 |
|
|
$self->{parse_error}->(); |
5600 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
5601 |
|
|
$self->{next_input_character} = 89; |
5602 |
|
|
} |
5603 |
|
|
} elsif ($self->{next_input_character} == 90) { # Z |
5604 |
|
|
|
5605 |
|
|
if (@{$self->{char}}) { |
5606 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5607 |
|
|
} else { |
5608 |
|
|
$self->{set_next_input_character}->($self); |
5609 |
|
|
} |
5610 |
|
|
|
5611 |
|
|
if ($self->{next_input_character} == 101) { # e |
5612 |
|
|
|
5613 |
|
|
if (@{$self->{char}}) { |
5614 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5615 |
|
|
} else { |
5616 |
|
|
$self->{set_next_input_character}->($self); |
5617 |
|
|
} |
5618 |
|
|
|
5619 |
|
|
if ($self->{next_input_character} == 116) { # t |
5620 |
|
|
|
5621 |
|
|
if (@{$self->{char}}) { |
5622 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5623 |
|
|
} else { |
5624 |
|
|
$self->{set_next_input_character}->($self); |
5625 |
|
|
} |
5626 |
|
|
|
5627 |
|
|
if ($self->{next_input_character} == 97) { # a |
5628 |
|
|
|
5629 |
|
|
if (@{$self->{char}}) { |
5630 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5631 |
|
|
} else { |
5632 |
|
|
$self->{set_next_input_character}->($self); |
5633 |
|
|
} |
5634 |
|
|
|
5635 |
|
|
{ |
5636 |
|
|
$r = {type => 'character', data => qq<\x{0396}>}; # Zeta |
5637 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5638 |
|
|
|
5639 |
|
|
if (@{$self->{char}}) { |
5640 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5641 |
|
|
} else { |
5642 |
|
|
$self->{set_next_input_character}->($self); |
5643 |
|
|
} |
5644 |
|
|
|
5645 |
|
|
} else { |
5646 |
|
|
$self->{parse_error}->(); |
5647 |
|
|
## reconsume |
5648 |
|
|
} |
5649 |
|
|
} |
5650 |
|
|
} else { |
5651 |
|
|
$self->{parse_error}->(); |
5652 |
|
|
unshift @{$self->{char}}, (101, 116, $self->{next_input_character}); |
5653 |
|
|
$self->{next_input_character} = 90; |
5654 |
|
|
} |
5655 |
|
|
} else { |
5656 |
|
|
$self->{parse_error}->(); |
5657 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
5658 |
|
|
$self->{next_input_character} = 90; |
5659 |
|
|
} |
5660 |
|
|
} else { |
5661 |
|
|
$self->{parse_error}->(); |
5662 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
5663 |
|
|
$self->{next_input_character} = 90; |
5664 |
|
|
} |
5665 |
|
|
} elsif ($self->{next_input_character} == 97) { # a |
5666 |
|
|
|
5667 |
|
|
if (@{$self->{char}}) { |
5668 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5669 |
|
|
} else { |
5670 |
|
|
$self->{set_next_input_character}->($self); |
5671 |
|
|
} |
5672 |
|
|
|
5673 |
|
|
if ($self->{next_input_character} == 97) { # a |
5674 |
|
|
|
5675 |
|
|
if (@{$self->{char}}) { |
5676 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5677 |
|
|
} else { |
5678 |
|
|
$self->{set_next_input_character}->($self); |
5679 |
|
|
} |
5680 |
|
|
|
5681 |
|
|
if ($self->{next_input_character} == 99) { # c |
5682 |
|
|
|
5683 |
|
|
if (@{$self->{char}}) { |
5684 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5685 |
|
|
} else { |
5686 |
|
|
$self->{set_next_input_character}->($self); |
5687 |
|
|
} |
5688 |
|
|
|
5689 |
|
|
if ($self->{next_input_character} == 117) { # u |
5690 |
|
|
|
5691 |
|
|
if (@{$self->{char}}) { |
5692 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5693 |
|
|
} else { |
5694 |
|
|
$self->{set_next_input_character}->($self); |
5695 |
|
|
} |
5696 |
|
|
|
5697 |
|
|
if ($self->{next_input_character} == 116) { # t |
5698 |
|
|
|
5699 |
|
|
if (@{$self->{char}}) { |
5700 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5701 |
|
|
} else { |
5702 |
|
|
$self->{set_next_input_character}->($self); |
5703 |
|
|
} |
5704 |
|
|
|
5705 |
|
|
if ($self->{next_input_character} == 101) { # e |
5706 |
|
|
|
5707 |
|
|
if (@{$self->{char}}) { |
5708 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5709 |
|
|
} else { |
5710 |
|
|
$self->{set_next_input_character}->($self); |
5711 |
|
|
} |
5712 |
|
|
|
5713 |
|
|
{ |
5714 |
|
|
$r = {type => 'character', data => qq<\x{00E1}>}; # aacute |
5715 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5716 |
|
|
|
5717 |
|
|
if (@{$self->{char}}) { |
5718 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5719 |
|
|
} else { |
5720 |
|
|
$self->{set_next_input_character}->($self); |
5721 |
|
|
} |
5722 |
|
|
|
5723 |
|
|
} else { |
5724 |
|
|
$self->{parse_error}->(); |
5725 |
|
|
## reconsume |
5726 |
|
|
} |
5727 |
|
|
} |
5728 |
|
|
} else { |
5729 |
|
|
$self->{parse_error}->(); |
5730 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
5731 |
|
|
$self->{next_input_character} = 97; |
5732 |
|
|
} |
5733 |
|
|
} else { |
5734 |
|
|
$self->{parse_error}->(); |
5735 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
5736 |
|
|
$self->{next_input_character} = 97; |
5737 |
|
|
} |
5738 |
|
|
} else { |
5739 |
|
|
$self->{parse_error}->(); |
5740 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
5741 |
|
|
$self->{next_input_character} = 97; |
5742 |
|
|
} |
5743 |
|
|
} else { |
5744 |
|
|
$self->{parse_error}->(); |
5745 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
5746 |
|
|
$self->{next_input_character} = 97; |
5747 |
|
|
} |
5748 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
5749 |
|
|
|
5750 |
|
|
if (@{$self->{char}}) { |
5751 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5752 |
|
|
} else { |
5753 |
|
|
$self->{set_next_input_character}->($self); |
5754 |
|
|
} |
5755 |
|
|
|
5756 |
|
|
if ($self->{next_input_character} == 105) { # i |
5757 |
|
|
|
5758 |
|
|
if (@{$self->{char}}) { |
5759 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5760 |
|
|
} else { |
5761 |
|
|
$self->{set_next_input_character}->($self); |
5762 |
|
|
} |
5763 |
|
|
|
5764 |
|
|
if ($self->{next_input_character} == 114) { # r |
5765 |
|
|
|
5766 |
|
|
if (@{$self->{char}}) { |
5767 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5768 |
|
|
} else { |
5769 |
|
|
$self->{set_next_input_character}->($self); |
5770 |
|
|
} |
5771 |
|
|
|
5772 |
|
|
if ($self->{next_input_character} == 99) { # c |
5773 |
|
|
|
5774 |
|
|
if (@{$self->{char}}) { |
5775 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5776 |
|
|
} else { |
5777 |
|
|
$self->{set_next_input_character}->($self); |
5778 |
|
|
} |
5779 |
|
|
|
5780 |
|
|
{ |
5781 |
|
|
$r = {type => 'character', data => qq<\x{00E2}>}; # acirc |
5782 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5783 |
|
|
|
5784 |
|
|
if (@{$self->{char}}) { |
5785 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5786 |
|
|
} else { |
5787 |
|
|
$self->{set_next_input_character}->($self); |
5788 |
|
|
} |
5789 |
|
|
|
5790 |
|
|
} else { |
5791 |
|
|
$self->{parse_error}->(); |
5792 |
|
|
## reconsume |
5793 |
|
|
} |
5794 |
|
|
} |
5795 |
|
|
} else { |
5796 |
|
|
$self->{parse_error}->(); |
5797 |
|
|
unshift @{$self->{char}}, (99, 105, 114, $self->{next_input_character}); |
5798 |
|
|
$self->{next_input_character} = 97; |
5799 |
|
|
} |
5800 |
|
|
} else { |
5801 |
|
|
$self->{parse_error}->(); |
5802 |
|
|
unshift @{$self->{char}}, (99, 105, $self->{next_input_character}); |
5803 |
|
|
$self->{next_input_character} = 97; |
5804 |
|
|
} |
5805 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
5806 |
|
|
|
5807 |
|
|
if (@{$self->{char}}) { |
5808 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5809 |
|
|
} else { |
5810 |
|
|
$self->{set_next_input_character}->($self); |
5811 |
|
|
} |
5812 |
|
|
|
5813 |
|
|
if ($self->{next_input_character} == 116) { # t |
5814 |
|
|
|
5815 |
|
|
if (@{$self->{char}}) { |
5816 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5817 |
|
|
} else { |
5818 |
|
|
$self->{set_next_input_character}->($self); |
5819 |
|
|
} |
5820 |
|
|
|
5821 |
|
|
if ($self->{next_input_character} == 101) { # e |
5822 |
|
|
|
5823 |
|
|
if (@{$self->{char}}) { |
5824 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5825 |
|
|
} else { |
5826 |
|
|
$self->{set_next_input_character}->($self); |
5827 |
|
|
} |
5828 |
|
|
|
5829 |
|
|
{ |
5830 |
|
|
$r = {type => 'character', data => qq<\x{00B4}>}; # acute |
5831 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5832 |
|
|
|
5833 |
|
|
if (@{$self->{char}}) { |
5834 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5835 |
|
|
} else { |
5836 |
|
|
$self->{set_next_input_character}->($self); |
5837 |
|
|
} |
5838 |
|
|
|
5839 |
|
|
} else { |
5840 |
|
|
$self->{parse_error}->(); |
5841 |
|
|
## reconsume |
5842 |
|
|
} |
5843 |
|
|
} |
5844 |
|
|
} else { |
5845 |
|
|
$self->{parse_error}->(); |
5846 |
|
|
unshift @{$self->{char}}, (99, 117, 116, $self->{next_input_character}); |
5847 |
|
|
$self->{next_input_character} = 97; |
5848 |
|
|
} |
5849 |
|
|
} else { |
5850 |
|
|
$self->{parse_error}->(); |
5851 |
|
|
unshift @{$self->{char}}, (99, 117, $self->{next_input_character}); |
5852 |
|
|
$self->{next_input_character} = 97; |
5853 |
|
|
} |
5854 |
|
|
} else { |
5855 |
|
|
$self->{parse_error}->(); |
5856 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
5857 |
|
|
$self->{next_input_character} = 97; |
5858 |
|
|
} |
5859 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
5860 |
|
|
|
5861 |
|
|
if (@{$self->{char}}) { |
5862 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5863 |
|
|
} else { |
5864 |
|
|
$self->{set_next_input_character}->($self); |
5865 |
|
|
} |
5866 |
|
|
|
5867 |
|
|
if ($self->{next_input_character} == 108) { # l |
5868 |
|
|
|
5869 |
|
|
if (@{$self->{char}}) { |
5870 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5871 |
|
|
} else { |
5872 |
|
|
$self->{set_next_input_character}->($self); |
5873 |
|
|
} |
5874 |
|
|
|
5875 |
|
|
if ($self->{next_input_character} == 105) { # i |
5876 |
|
|
|
5877 |
|
|
if (@{$self->{char}}) { |
5878 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5879 |
|
|
} else { |
5880 |
|
|
$self->{set_next_input_character}->($self); |
5881 |
|
|
} |
5882 |
|
|
|
5883 |
|
|
if ($self->{next_input_character} == 103) { # g |
5884 |
|
|
|
5885 |
|
|
if (@{$self->{char}}) { |
5886 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5887 |
|
|
} else { |
5888 |
|
|
$self->{set_next_input_character}->($self); |
5889 |
|
|
} |
5890 |
|
|
|
5891 |
|
|
{ |
5892 |
|
|
$r = {type => 'character', data => qq<\x{00E6}>}; # aelig |
5893 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5894 |
|
|
|
5895 |
|
|
if (@{$self->{char}}) { |
5896 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5897 |
|
|
} else { |
5898 |
|
|
$self->{set_next_input_character}->($self); |
5899 |
|
|
} |
5900 |
|
|
|
5901 |
|
|
} else { |
5902 |
|
|
$self->{parse_error}->(); |
5903 |
|
|
## reconsume |
5904 |
|
|
} |
5905 |
|
|
} |
5906 |
|
|
} else { |
5907 |
|
|
$self->{parse_error}->(); |
5908 |
|
|
unshift @{$self->{char}}, (101, 108, 105, $self->{next_input_character}); |
5909 |
|
|
$self->{next_input_character} = 97; |
5910 |
|
|
} |
5911 |
|
|
} else { |
5912 |
|
|
$self->{parse_error}->(); |
5913 |
|
|
unshift @{$self->{char}}, (101, 108, $self->{next_input_character}); |
5914 |
|
|
$self->{next_input_character} = 97; |
5915 |
|
|
} |
5916 |
|
|
} else { |
5917 |
|
|
$self->{parse_error}->(); |
5918 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
5919 |
|
|
$self->{next_input_character} = 97; |
5920 |
|
|
} |
5921 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
5922 |
|
|
|
5923 |
|
|
if (@{$self->{char}}) { |
5924 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5925 |
|
|
} else { |
5926 |
|
|
$self->{set_next_input_character}->($self); |
5927 |
|
|
} |
5928 |
|
|
|
5929 |
|
|
if ($self->{next_input_character} == 114) { # r |
5930 |
|
|
|
5931 |
|
|
if (@{$self->{char}}) { |
5932 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5933 |
|
|
} else { |
5934 |
|
|
$self->{set_next_input_character}->($self); |
5935 |
|
|
} |
5936 |
|
|
|
5937 |
|
|
if ($self->{next_input_character} == 97) { # a |
5938 |
|
|
|
5939 |
|
|
if (@{$self->{char}}) { |
5940 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5941 |
|
|
} else { |
5942 |
|
|
$self->{set_next_input_character}->($self); |
5943 |
|
|
} |
5944 |
|
|
|
5945 |
|
|
if ($self->{next_input_character} == 118) { # v |
5946 |
|
|
|
5947 |
|
|
if (@{$self->{char}}) { |
5948 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5949 |
|
|
} else { |
5950 |
|
|
$self->{set_next_input_character}->($self); |
5951 |
|
|
} |
5952 |
|
|
|
5953 |
|
|
if ($self->{next_input_character} == 101) { # e |
5954 |
|
|
|
5955 |
|
|
if (@{$self->{char}}) { |
5956 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5957 |
|
|
} else { |
5958 |
|
|
$self->{set_next_input_character}->($self); |
5959 |
|
|
} |
5960 |
|
|
|
5961 |
|
|
{ |
5962 |
|
|
$r = {type => 'character', data => qq<\x{00E0}>}; # agrave |
5963 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
5964 |
|
|
|
5965 |
|
|
if (@{$self->{char}}) { |
5966 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
5967 |
|
|
} else { |
5968 |
|
|
$self->{set_next_input_character}->($self); |
5969 |
|
|
} |
5970 |
|
|
|
5971 |
|
|
} else { |
5972 |
|
|
$self->{parse_error}->(); |
5973 |
|
|
## reconsume |
5974 |
|
|
} |
5975 |
|
|
} |
5976 |
|
|
} else { |
5977 |
|
|
$self->{parse_error}->(); |
5978 |
|
|
unshift @{$self->{char}}, (103, 114, 97, 118, $self->{next_input_character}); |
5979 |
|
|
$self->{next_input_character} = 97; |
5980 |
|
|
} |
5981 |
|
|
} else { |
5982 |
|
|
$self->{parse_error}->(); |
5983 |
|
|
unshift @{$self->{char}}, (103, 114, 97, $self->{next_input_character}); |
5984 |
|
|
$self->{next_input_character} = 97; |
5985 |
|
|
} |
5986 |
|
|
} else { |
5987 |
|
|
$self->{parse_error}->(); |
5988 |
|
|
unshift @{$self->{char}}, (103, 114, $self->{next_input_character}); |
5989 |
|
|
$self->{next_input_character} = 97; |
5990 |
|
|
} |
5991 |
|
|
} else { |
5992 |
|
|
$self->{parse_error}->(); |
5993 |
|
|
unshift @{$self->{char}}, (103, $self->{next_input_character}); |
5994 |
|
|
$self->{next_input_character} = 97; |
5995 |
|
|
} |
5996 |
|
|
} elsif ($self->{next_input_character} == 108) { # l |
5997 |
|
|
|
5998 |
|
|
if (@{$self->{char}}) { |
5999 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6000 |
|
|
} else { |
6001 |
|
|
$self->{set_next_input_character}->($self); |
6002 |
|
|
} |
6003 |
|
|
|
6004 |
|
|
if ($self->{next_input_character} == 101) { # e |
6005 |
|
|
|
6006 |
|
|
if (@{$self->{char}}) { |
6007 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6008 |
|
|
} else { |
6009 |
|
|
$self->{set_next_input_character}->($self); |
6010 |
|
|
} |
6011 |
|
|
|
6012 |
|
|
if ($self->{next_input_character} == 102) { # f |
6013 |
|
|
|
6014 |
|
|
if (@{$self->{char}}) { |
6015 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6016 |
|
|
} else { |
6017 |
|
|
$self->{set_next_input_character}->($self); |
6018 |
|
|
} |
6019 |
|
|
|
6020 |
|
|
if ($self->{next_input_character} == 115) { # s |
6021 |
|
|
|
6022 |
|
|
if (@{$self->{char}}) { |
6023 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6024 |
|
|
} else { |
6025 |
|
|
$self->{set_next_input_character}->($self); |
6026 |
|
|
} |
6027 |
|
|
|
6028 |
|
|
if ($self->{next_input_character} == 121) { # y |
6029 |
|
|
|
6030 |
|
|
if (@{$self->{char}}) { |
6031 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6032 |
|
|
} else { |
6033 |
|
|
$self->{set_next_input_character}->($self); |
6034 |
|
|
} |
6035 |
|
|
|
6036 |
|
|
if ($self->{next_input_character} == 109) { # m |
6037 |
|
|
|
6038 |
|
|
if (@{$self->{char}}) { |
6039 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6040 |
|
|
} else { |
6041 |
|
|
$self->{set_next_input_character}->($self); |
6042 |
|
|
} |
6043 |
|
|
|
6044 |
|
|
{ |
6045 |
|
|
$r = {type => 'character', data => qq<\x{2135}>}; # alefsym |
6046 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6047 |
|
|
|
6048 |
|
|
if (@{$self->{char}}) { |
6049 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6050 |
|
|
} else { |
6051 |
|
|
$self->{set_next_input_character}->($self); |
6052 |
|
|
} |
6053 |
|
|
|
6054 |
|
|
} else { |
6055 |
|
|
$self->{parse_error}->(); |
6056 |
|
|
## reconsume |
6057 |
|
|
} |
6058 |
|
|
} |
6059 |
|
|
} else { |
6060 |
|
|
$self->{parse_error}->(); |
6061 |
|
|
unshift @{$self->{char}}, (108, 101, 102, 115, 121, $self->{next_input_character}); |
6062 |
|
|
$self->{next_input_character} = 97; |
6063 |
|
|
} |
6064 |
|
|
} else { |
6065 |
|
|
$self->{parse_error}->(); |
6066 |
|
|
unshift @{$self->{char}}, (108, 101, 102, 115, $self->{next_input_character}); |
6067 |
|
|
$self->{next_input_character} = 97; |
6068 |
|
|
} |
6069 |
|
|
} else { |
6070 |
|
|
$self->{parse_error}->(); |
6071 |
|
|
unshift @{$self->{char}}, (108, 101, 102, $self->{next_input_character}); |
6072 |
|
|
$self->{next_input_character} = 97; |
6073 |
|
|
} |
6074 |
|
|
} else { |
6075 |
|
|
$self->{parse_error}->(); |
6076 |
|
|
unshift @{$self->{char}}, (108, 101, $self->{next_input_character}); |
6077 |
|
|
$self->{next_input_character} = 97; |
6078 |
|
|
} |
6079 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
6080 |
|
|
|
6081 |
|
|
if (@{$self->{char}}) { |
6082 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6083 |
|
|
} else { |
6084 |
|
|
$self->{set_next_input_character}->($self); |
6085 |
|
|
} |
6086 |
|
|
|
6087 |
|
|
if ($self->{next_input_character} == 104) { # h |
6088 |
|
|
|
6089 |
|
|
if (@{$self->{char}}) { |
6090 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6091 |
|
|
} else { |
6092 |
|
|
$self->{set_next_input_character}->($self); |
6093 |
|
|
} |
6094 |
|
|
|
6095 |
|
|
if ($self->{next_input_character} == 97) { # a |
6096 |
|
|
|
6097 |
|
|
if (@{$self->{char}}) { |
6098 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6099 |
|
|
} else { |
6100 |
|
|
$self->{set_next_input_character}->($self); |
6101 |
|
|
} |
6102 |
|
|
|
6103 |
|
|
{ |
6104 |
|
|
$r = {type => 'character', data => qq<\x{03B1}>}; # alpha |
6105 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6106 |
|
|
|
6107 |
|
|
if (@{$self->{char}}) { |
6108 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6109 |
|
|
} else { |
6110 |
|
|
$self->{set_next_input_character}->($self); |
6111 |
|
|
} |
6112 |
|
|
|
6113 |
|
|
} else { |
6114 |
|
|
$self->{parse_error}->(); |
6115 |
|
|
## reconsume |
6116 |
|
|
} |
6117 |
|
|
} |
6118 |
|
|
} else { |
6119 |
|
|
$self->{parse_error}->(); |
6120 |
|
|
unshift @{$self->{char}}, (108, 112, 104, $self->{next_input_character}); |
6121 |
|
|
$self->{next_input_character} = 97; |
6122 |
|
|
} |
6123 |
|
|
} else { |
6124 |
|
|
$self->{parse_error}->(); |
6125 |
|
|
unshift @{$self->{char}}, (108, 112, $self->{next_input_character}); |
6126 |
|
|
$self->{next_input_character} = 97; |
6127 |
|
|
} |
6128 |
|
|
} else { |
6129 |
|
|
$self->{parse_error}->(); |
6130 |
|
|
unshift @{$self->{char}}, (108, $self->{next_input_character}); |
6131 |
|
|
$self->{next_input_character} = 97; |
6132 |
|
|
} |
6133 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
6134 |
|
|
|
6135 |
|
|
if (@{$self->{char}}) { |
6136 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6137 |
|
|
} else { |
6138 |
|
|
$self->{set_next_input_character}->($self); |
6139 |
|
|
} |
6140 |
|
|
|
6141 |
|
|
if ($self->{next_input_character} == 112) { # p |
6142 |
|
|
|
6143 |
|
|
if (@{$self->{char}}) { |
6144 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6145 |
|
|
} else { |
6146 |
|
|
$self->{set_next_input_character}->($self); |
6147 |
|
|
} |
6148 |
|
|
|
6149 |
|
|
{ |
6150 |
|
|
$r = {type => 'character', data => qq<\x{0026}>}; # amp |
6151 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6152 |
|
|
|
6153 |
|
|
if (@{$self->{char}}) { |
6154 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6155 |
|
|
} else { |
6156 |
|
|
$self->{set_next_input_character}->($self); |
6157 |
|
|
} |
6158 |
|
|
|
6159 |
|
|
} else { |
6160 |
|
|
$self->{parse_error}->(); |
6161 |
|
|
## reconsume |
6162 |
|
|
} |
6163 |
|
|
} |
6164 |
|
|
} else { |
6165 |
|
|
$self->{parse_error}->(); |
6166 |
|
|
unshift @{$self->{char}}, (109, $self->{next_input_character}); |
6167 |
|
|
$self->{next_input_character} = 97; |
6168 |
|
|
} |
6169 |
|
|
} elsif ($self->{next_input_character} == 110) { # n |
6170 |
|
|
|
6171 |
|
|
if (@{$self->{char}}) { |
6172 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6173 |
|
|
} else { |
6174 |
|
|
$self->{set_next_input_character}->($self); |
6175 |
|
|
} |
6176 |
|
|
|
6177 |
|
|
if ($self->{next_input_character} == 100) { # d |
6178 |
|
|
|
6179 |
|
|
if (@{$self->{char}}) { |
6180 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6181 |
|
|
} else { |
6182 |
|
|
$self->{set_next_input_character}->($self); |
6183 |
|
|
} |
6184 |
|
|
|
6185 |
|
|
{ |
6186 |
|
|
$r = {type => 'character', data => qq<\x{2227}>}; # and |
6187 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6188 |
|
|
|
6189 |
|
|
if (@{$self->{char}}) { |
6190 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6191 |
|
|
} else { |
6192 |
|
|
$self->{set_next_input_character}->($self); |
6193 |
|
|
} |
6194 |
|
|
|
6195 |
|
|
} else { |
6196 |
|
|
$self->{parse_error}->(); |
6197 |
|
|
## reconsume |
6198 |
|
|
} |
6199 |
|
|
} |
6200 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
6201 |
|
|
|
6202 |
|
|
if (@{$self->{char}}) { |
6203 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6204 |
|
|
} else { |
6205 |
|
|
$self->{set_next_input_character}->($self); |
6206 |
|
|
} |
6207 |
|
|
|
6208 |
|
|
{ |
6209 |
|
|
$r = {type => 'character', data => qq<\x{2220}>}; # ang |
6210 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6211 |
|
|
|
6212 |
|
|
if (@{$self->{char}}) { |
6213 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6214 |
|
|
} else { |
6215 |
|
|
$self->{set_next_input_character}->($self); |
6216 |
|
|
} |
6217 |
|
|
|
6218 |
|
|
} else { |
6219 |
|
|
$self->{parse_error}->(); |
6220 |
|
|
## reconsume |
6221 |
|
|
} |
6222 |
|
|
} |
6223 |
|
|
} else { |
6224 |
|
|
$self->{parse_error}->(); |
6225 |
|
|
unshift @{$self->{char}}, (110, $self->{next_input_character}); |
6226 |
|
|
$self->{next_input_character} = 97; |
6227 |
|
|
} |
6228 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
6229 |
|
|
|
6230 |
|
|
if (@{$self->{char}}) { |
6231 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6232 |
|
|
} else { |
6233 |
|
|
$self->{set_next_input_character}->($self); |
6234 |
|
|
} |
6235 |
|
|
|
6236 |
|
|
if ($self->{next_input_character} == 111) { # o |
6237 |
|
|
|
6238 |
|
|
if (@{$self->{char}}) { |
6239 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6240 |
|
|
} else { |
6241 |
|
|
$self->{set_next_input_character}->($self); |
6242 |
|
|
} |
6243 |
|
|
|
6244 |
|
|
if ($self->{next_input_character} == 115) { # s |
6245 |
|
|
|
6246 |
|
|
if (@{$self->{char}}) { |
6247 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6248 |
|
|
} else { |
6249 |
|
|
$self->{set_next_input_character}->($self); |
6250 |
|
|
} |
6251 |
|
|
|
6252 |
|
|
{ |
6253 |
|
|
$r = {type => 'character', data => qq<\x{0027}>}; # apos |
6254 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6255 |
|
|
|
6256 |
|
|
if (@{$self->{char}}) { |
6257 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6258 |
|
|
} else { |
6259 |
|
|
$self->{set_next_input_character}->($self); |
6260 |
|
|
} |
6261 |
|
|
|
6262 |
|
|
} else { |
6263 |
|
|
$self->{parse_error}->(); |
6264 |
|
|
## reconsume |
6265 |
|
|
} |
6266 |
|
|
} |
6267 |
|
|
} else { |
6268 |
|
|
$self->{parse_error}->(); |
6269 |
|
|
unshift @{$self->{char}}, (112, 111, $self->{next_input_character}); |
6270 |
|
|
$self->{next_input_character} = 97; |
6271 |
|
|
} |
6272 |
|
|
} else { |
6273 |
|
|
$self->{parse_error}->(); |
6274 |
|
|
unshift @{$self->{char}}, (112, $self->{next_input_character}); |
6275 |
|
|
$self->{next_input_character} = 97; |
6276 |
|
|
} |
6277 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
6278 |
|
|
|
6279 |
|
|
if (@{$self->{char}}) { |
6280 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6281 |
|
|
} else { |
6282 |
|
|
$self->{set_next_input_character}->($self); |
6283 |
|
|
} |
6284 |
|
|
|
6285 |
|
|
if ($self->{next_input_character} == 105) { # i |
6286 |
|
|
|
6287 |
|
|
if (@{$self->{char}}) { |
6288 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6289 |
|
|
} else { |
6290 |
|
|
$self->{set_next_input_character}->($self); |
6291 |
|
|
} |
6292 |
|
|
|
6293 |
|
|
if ($self->{next_input_character} == 110) { # n |
6294 |
|
|
|
6295 |
|
|
if (@{$self->{char}}) { |
6296 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6297 |
|
|
} else { |
6298 |
|
|
$self->{set_next_input_character}->($self); |
6299 |
|
|
} |
6300 |
|
|
|
6301 |
|
|
if ($self->{next_input_character} == 103) { # g |
6302 |
|
|
|
6303 |
|
|
if (@{$self->{char}}) { |
6304 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6305 |
|
|
} else { |
6306 |
|
|
$self->{set_next_input_character}->($self); |
6307 |
|
|
} |
6308 |
|
|
|
6309 |
|
|
{ |
6310 |
|
|
$r = {type => 'character', data => qq<\x{00E5}>}; # aring |
6311 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6312 |
|
|
|
6313 |
|
|
if (@{$self->{char}}) { |
6314 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6315 |
|
|
} else { |
6316 |
|
|
$self->{set_next_input_character}->($self); |
6317 |
|
|
} |
6318 |
|
|
|
6319 |
|
|
} else { |
6320 |
|
|
$self->{parse_error}->(); |
6321 |
|
|
## reconsume |
6322 |
|
|
} |
6323 |
|
|
} |
6324 |
|
|
} else { |
6325 |
|
|
$self->{parse_error}->(); |
6326 |
|
|
unshift @{$self->{char}}, (114, 105, 110, $self->{next_input_character}); |
6327 |
|
|
$self->{next_input_character} = 97; |
6328 |
|
|
} |
6329 |
|
|
} else { |
6330 |
|
|
$self->{parse_error}->(); |
6331 |
|
|
unshift @{$self->{char}}, (114, 105, $self->{next_input_character}); |
6332 |
|
|
$self->{next_input_character} = 97; |
6333 |
|
|
} |
6334 |
|
|
} else { |
6335 |
|
|
$self->{parse_error}->(); |
6336 |
|
|
unshift @{$self->{char}}, (114, $self->{next_input_character}); |
6337 |
|
|
$self->{next_input_character} = 97; |
6338 |
|
|
} |
6339 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
6340 |
|
|
|
6341 |
|
|
if (@{$self->{char}}) { |
6342 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6343 |
|
|
} else { |
6344 |
|
|
$self->{set_next_input_character}->($self); |
6345 |
|
|
} |
6346 |
|
|
|
6347 |
|
|
if ($self->{next_input_character} == 121) { # y |
6348 |
|
|
|
6349 |
|
|
if (@{$self->{char}}) { |
6350 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6351 |
|
|
} else { |
6352 |
|
|
$self->{set_next_input_character}->($self); |
6353 |
|
|
} |
6354 |
|
|
|
6355 |
|
|
if ($self->{next_input_character} == 109) { # m |
6356 |
|
|
|
6357 |
|
|
if (@{$self->{char}}) { |
6358 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6359 |
|
|
} else { |
6360 |
|
|
$self->{set_next_input_character}->($self); |
6361 |
|
|
} |
6362 |
|
|
|
6363 |
|
|
if ($self->{next_input_character} == 112) { # p |
6364 |
|
|
|
6365 |
|
|
if (@{$self->{char}}) { |
6366 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6367 |
|
|
} else { |
6368 |
|
|
$self->{set_next_input_character}->($self); |
6369 |
|
|
} |
6370 |
|
|
|
6371 |
|
|
{ |
6372 |
|
|
$r = {type => 'character', data => qq<\x{2248}>}; # asymp |
6373 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6374 |
|
|
|
6375 |
|
|
if (@{$self->{char}}) { |
6376 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6377 |
|
|
} else { |
6378 |
|
|
$self->{set_next_input_character}->($self); |
6379 |
|
|
} |
6380 |
|
|
|
6381 |
|
|
} else { |
6382 |
|
|
$self->{parse_error}->(); |
6383 |
|
|
## reconsume |
6384 |
|
|
} |
6385 |
|
|
} |
6386 |
|
|
} else { |
6387 |
|
|
$self->{parse_error}->(); |
6388 |
|
|
unshift @{$self->{char}}, (115, 121, 109, $self->{next_input_character}); |
6389 |
|
|
$self->{next_input_character} = 97; |
6390 |
|
|
} |
6391 |
|
|
} else { |
6392 |
|
|
$self->{parse_error}->(); |
6393 |
|
|
unshift @{$self->{char}}, (115, 121, $self->{next_input_character}); |
6394 |
|
|
$self->{next_input_character} = 97; |
6395 |
|
|
} |
6396 |
|
|
} else { |
6397 |
|
|
$self->{parse_error}->(); |
6398 |
|
|
unshift @{$self->{char}}, (115, $self->{next_input_character}); |
6399 |
|
|
$self->{next_input_character} = 97; |
6400 |
|
|
} |
6401 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
6402 |
|
|
|
6403 |
|
|
if (@{$self->{char}}) { |
6404 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6405 |
|
|
} else { |
6406 |
|
|
$self->{set_next_input_character}->($self); |
6407 |
|
|
} |
6408 |
|
|
|
6409 |
|
|
if ($self->{next_input_character} == 105) { # i |
6410 |
|
|
|
6411 |
|
|
if (@{$self->{char}}) { |
6412 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6413 |
|
|
} else { |
6414 |
|
|
$self->{set_next_input_character}->($self); |
6415 |
|
|
} |
6416 |
|
|
|
6417 |
|
|
if ($self->{next_input_character} == 108) { # l |
6418 |
|
|
|
6419 |
|
|
if (@{$self->{char}}) { |
6420 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6421 |
|
|
} else { |
6422 |
|
|
$self->{set_next_input_character}->($self); |
6423 |
|
|
} |
6424 |
|
|
|
6425 |
|
|
if ($self->{next_input_character} == 100) { # d |
6426 |
|
|
|
6427 |
|
|
if (@{$self->{char}}) { |
6428 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6429 |
|
|
} else { |
6430 |
|
|
$self->{set_next_input_character}->($self); |
6431 |
|
|
} |
6432 |
|
|
|
6433 |
|
|
if ($self->{next_input_character} == 101) { # e |
6434 |
|
|
|
6435 |
|
|
if (@{$self->{char}}) { |
6436 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6437 |
|
|
} else { |
6438 |
|
|
$self->{set_next_input_character}->($self); |
6439 |
|
|
} |
6440 |
|
|
|
6441 |
|
|
{ |
6442 |
|
|
$r = {type => 'character', data => qq<\x{00E3}>}; # atilde |
6443 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6444 |
|
|
|
6445 |
|
|
if (@{$self->{char}}) { |
6446 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6447 |
|
|
} else { |
6448 |
|
|
$self->{set_next_input_character}->($self); |
6449 |
|
|
} |
6450 |
|
|
|
6451 |
|
|
} else { |
6452 |
|
|
$self->{parse_error}->(); |
6453 |
|
|
## reconsume |
6454 |
|
|
} |
6455 |
|
|
} |
6456 |
|
|
} else { |
6457 |
|
|
$self->{parse_error}->(); |
6458 |
|
|
unshift @{$self->{char}}, (116, 105, 108, 100, $self->{next_input_character}); |
6459 |
|
|
$self->{next_input_character} = 97; |
6460 |
|
|
} |
6461 |
|
|
} else { |
6462 |
|
|
$self->{parse_error}->(); |
6463 |
|
|
unshift @{$self->{char}}, (116, 105, 108, $self->{next_input_character}); |
6464 |
|
|
$self->{next_input_character} = 97; |
6465 |
|
|
} |
6466 |
|
|
} else { |
6467 |
|
|
$self->{parse_error}->(); |
6468 |
|
|
unshift @{$self->{char}}, (116, 105, $self->{next_input_character}); |
6469 |
|
|
$self->{next_input_character} = 97; |
6470 |
|
|
} |
6471 |
|
|
} else { |
6472 |
|
|
$self->{parse_error}->(); |
6473 |
|
|
unshift @{$self->{char}}, (116, $self->{next_input_character}); |
6474 |
|
|
$self->{next_input_character} = 97; |
6475 |
|
|
} |
6476 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
6477 |
|
|
|
6478 |
|
|
if (@{$self->{char}}) { |
6479 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6480 |
|
|
} else { |
6481 |
|
|
$self->{set_next_input_character}->($self); |
6482 |
|
|
} |
6483 |
|
|
|
6484 |
|
|
if ($self->{next_input_character} == 109) { # m |
6485 |
|
|
|
6486 |
|
|
if (@{$self->{char}}) { |
6487 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6488 |
|
|
} else { |
6489 |
|
|
$self->{set_next_input_character}->($self); |
6490 |
|
|
} |
6491 |
|
|
|
6492 |
|
|
if ($self->{next_input_character} == 108) { # l |
6493 |
|
|
|
6494 |
|
|
if (@{$self->{char}}) { |
6495 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6496 |
|
|
} else { |
6497 |
|
|
$self->{set_next_input_character}->($self); |
6498 |
|
|
} |
6499 |
|
|
|
6500 |
|
|
{ |
6501 |
|
|
$r = {type => 'character', data => qq<\x{00E4}>}; # auml |
6502 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6503 |
|
|
|
6504 |
|
|
if (@{$self->{char}}) { |
6505 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6506 |
|
|
} else { |
6507 |
|
|
$self->{set_next_input_character}->($self); |
6508 |
|
|
} |
6509 |
|
|
|
6510 |
|
|
} else { |
6511 |
|
|
$self->{parse_error}->(); |
6512 |
|
|
## reconsume |
6513 |
|
|
} |
6514 |
|
|
} |
6515 |
|
|
} else { |
6516 |
|
|
$self->{parse_error}->(); |
6517 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
6518 |
|
|
$self->{next_input_character} = 97; |
6519 |
|
|
} |
6520 |
|
|
} else { |
6521 |
|
|
$self->{parse_error}->(); |
6522 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
6523 |
|
|
$self->{next_input_character} = 97; |
6524 |
|
|
} |
6525 |
|
|
} else { |
6526 |
|
|
$self->{parse_error}->(); |
6527 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
6528 |
|
|
$self->{next_input_character} = 97; |
6529 |
|
|
} |
6530 |
|
|
} elsif ($self->{next_input_character} == 98) { # b |
6531 |
|
|
|
6532 |
|
|
if (@{$self->{char}}) { |
6533 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6534 |
|
|
} else { |
6535 |
|
|
$self->{set_next_input_character}->($self); |
6536 |
|
|
} |
6537 |
|
|
|
6538 |
|
|
if ($self->{next_input_character} == 100) { # d |
6539 |
|
|
|
6540 |
|
|
if (@{$self->{char}}) { |
6541 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6542 |
|
|
} else { |
6543 |
|
|
$self->{set_next_input_character}->($self); |
6544 |
|
|
} |
6545 |
|
|
|
6546 |
|
|
if ($self->{next_input_character} == 113) { # q |
6547 |
|
|
|
6548 |
|
|
if (@{$self->{char}}) { |
6549 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6550 |
|
|
} else { |
6551 |
|
|
$self->{set_next_input_character}->($self); |
6552 |
|
|
} |
6553 |
|
|
|
6554 |
|
|
if ($self->{next_input_character} == 117) { # u |
6555 |
|
|
|
6556 |
|
|
if (@{$self->{char}}) { |
6557 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6558 |
|
|
} else { |
6559 |
|
|
$self->{set_next_input_character}->($self); |
6560 |
|
|
} |
6561 |
|
|
|
6562 |
|
|
if ($self->{next_input_character} == 111) { # o |
6563 |
|
|
|
6564 |
|
|
if (@{$self->{char}}) { |
6565 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6566 |
|
|
} else { |
6567 |
|
|
$self->{set_next_input_character}->($self); |
6568 |
|
|
} |
6569 |
|
|
|
6570 |
|
|
{ |
6571 |
|
|
$r = {type => 'character', data => qq<\x{201E}>}; # bdquo |
6572 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6573 |
|
|
|
6574 |
|
|
if (@{$self->{char}}) { |
6575 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6576 |
|
|
} else { |
6577 |
|
|
$self->{set_next_input_character}->($self); |
6578 |
|
|
} |
6579 |
|
|
|
6580 |
|
|
} else { |
6581 |
|
|
$self->{parse_error}->(); |
6582 |
|
|
## reconsume |
6583 |
|
|
} |
6584 |
|
|
} |
6585 |
|
|
} else { |
6586 |
|
|
$self->{parse_error}->(); |
6587 |
|
|
unshift @{$self->{char}}, (100, 113, 117, $self->{next_input_character}); |
6588 |
|
|
$self->{next_input_character} = 98; |
6589 |
|
|
} |
6590 |
|
|
} else { |
6591 |
|
|
$self->{parse_error}->(); |
6592 |
|
|
unshift @{$self->{char}}, (100, 113, $self->{next_input_character}); |
6593 |
|
|
$self->{next_input_character} = 98; |
6594 |
|
|
} |
6595 |
|
|
} else { |
6596 |
|
|
$self->{parse_error}->(); |
6597 |
|
|
unshift @{$self->{char}}, (100, $self->{next_input_character}); |
6598 |
|
|
$self->{next_input_character} = 98; |
6599 |
|
|
} |
6600 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
6601 |
|
|
|
6602 |
|
|
if (@{$self->{char}}) { |
6603 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6604 |
|
|
} else { |
6605 |
|
|
$self->{set_next_input_character}->($self); |
6606 |
|
|
} |
6607 |
|
|
|
6608 |
|
|
if ($self->{next_input_character} == 116) { # t |
6609 |
|
|
|
6610 |
|
|
if (@{$self->{char}}) { |
6611 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6612 |
|
|
} else { |
6613 |
|
|
$self->{set_next_input_character}->($self); |
6614 |
|
|
} |
6615 |
|
|
|
6616 |
|
|
if ($self->{next_input_character} == 97) { # a |
6617 |
|
|
|
6618 |
|
|
if (@{$self->{char}}) { |
6619 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6620 |
|
|
} else { |
6621 |
|
|
$self->{set_next_input_character}->($self); |
6622 |
|
|
} |
6623 |
|
|
|
6624 |
|
|
{ |
6625 |
|
|
$r = {type => 'character', data => qq<\x{03B2}>}; # beta |
6626 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6627 |
|
|
|
6628 |
|
|
if (@{$self->{char}}) { |
6629 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6630 |
|
|
} else { |
6631 |
|
|
$self->{set_next_input_character}->($self); |
6632 |
|
|
} |
6633 |
|
|
|
6634 |
|
|
} else { |
6635 |
|
|
$self->{parse_error}->(); |
6636 |
|
|
## reconsume |
6637 |
|
|
} |
6638 |
|
|
} |
6639 |
|
|
} else { |
6640 |
|
|
$self->{parse_error}->(); |
6641 |
|
|
unshift @{$self->{char}}, (101, 116, $self->{next_input_character}); |
6642 |
|
|
$self->{next_input_character} = 98; |
6643 |
|
|
} |
6644 |
|
|
} else { |
6645 |
|
|
$self->{parse_error}->(); |
6646 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
6647 |
|
|
$self->{next_input_character} = 98; |
6648 |
|
|
} |
6649 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
6650 |
|
|
|
6651 |
|
|
if (@{$self->{char}}) { |
6652 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6653 |
|
|
} else { |
6654 |
|
|
$self->{set_next_input_character}->($self); |
6655 |
|
|
} |
6656 |
|
|
|
6657 |
|
|
if ($self->{next_input_character} == 118) { # v |
6658 |
|
|
|
6659 |
|
|
if (@{$self->{char}}) { |
6660 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6661 |
|
|
} else { |
6662 |
|
|
$self->{set_next_input_character}->($self); |
6663 |
|
|
} |
6664 |
|
|
|
6665 |
|
|
if ($self->{next_input_character} == 98) { # b |
6666 |
|
|
|
6667 |
|
|
if (@{$self->{char}}) { |
6668 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6669 |
|
|
} else { |
6670 |
|
|
$self->{set_next_input_character}->($self); |
6671 |
|
|
} |
6672 |
|
|
|
6673 |
|
|
if ($self->{next_input_character} == 97) { # a |
6674 |
|
|
|
6675 |
|
|
if (@{$self->{char}}) { |
6676 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6677 |
|
|
} else { |
6678 |
|
|
$self->{set_next_input_character}->($self); |
6679 |
|
|
} |
6680 |
|
|
|
6681 |
|
|
if ($self->{next_input_character} == 114) { # r |
6682 |
|
|
|
6683 |
|
|
if (@{$self->{char}}) { |
6684 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6685 |
|
|
} else { |
6686 |
|
|
$self->{set_next_input_character}->($self); |
6687 |
|
|
} |
6688 |
|
|
|
6689 |
|
|
{ |
6690 |
|
|
$r = {type => 'character', data => qq<\x{00A6}>}; # brvbar |
6691 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6692 |
|
|
|
6693 |
|
|
if (@{$self->{char}}) { |
6694 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6695 |
|
|
} else { |
6696 |
|
|
$self->{set_next_input_character}->($self); |
6697 |
|
|
} |
6698 |
|
|
|
6699 |
|
|
} else { |
6700 |
|
|
$self->{parse_error}->(); |
6701 |
|
|
## reconsume |
6702 |
|
|
} |
6703 |
|
|
} |
6704 |
|
|
} else { |
6705 |
|
|
$self->{parse_error}->(); |
6706 |
|
|
unshift @{$self->{char}}, (114, 118, 98, 97, $self->{next_input_character}); |
6707 |
|
|
$self->{next_input_character} = 98; |
6708 |
|
|
} |
6709 |
|
|
} else { |
6710 |
|
|
$self->{parse_error}->(); |
6711 |
|
|
unshift @{$self->{char}}, (114, 118, 98, $self->{next_input_character}); |
6712 |
|
|
$self->{next_input_character} = 98; |
6713 |
|
|
} |
6714 |
|
|
} else { |
6715 |
|
|
$self->{parse_error}->(); |
6716 |
|
|
unshift @{$self->{char}}, (114, 118, $self->{next_input_character}); |
6717 |
|
|
$self->{next_input_character} = 98; |
6718 |
|
|
} |
6719 |
|
|
} else { |
6720 |
|
|
$self->{parse_error}->(); |
6721 |
|
|
unshift @{$self->{char}}, (114, $self->{next_input_character}); |
6722 |
|
|
$self->{next_input_character} = 98; |
6723 |
|
|
} |
6724 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
6725 |
|
|
|
6726 |
|
|
if (@{$self->{char}}) { |
6727 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6728 |
|
|
} else { |
6729 |
|
|
$self->{set_next_input_character}->($self); |
6730 |
|
|
} |
6731 |
|
|
|
6732 |
|
|
if ($self->{next_input_character} == 108) { # l |
6733 |
|
|
|
6734 |
|
|
if (@{$self->{char}}) { |
6735 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6736 |
|
|
} else { |
6737 |
|
|
$self->{set_next_input_character}->($self); |
6738 |
|
|
} |
6739 |
|
|
|
6740 |
|
|
if ($self->{next_input_character} == 108) { # l |
6741 |
|
|
|
6742 |
|
|
if (@{$self->{char}}) { |
6743 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6744 |
|
|
} else { |
6745 |
|
|
$self->{set_next_input_character}->($self); |
6746 |
|
|
} |
6747 |
|
|
|
6748 |
|
|
{ |
6749 |
|
|
$r = {type => 'character', data => qq<\x{2022}>}; # bull |
6750 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6751 |
|
|
|
6752 |
|
|
if (@{$self->{char}}) { |
6753 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6754 |
|
|
} else { |
6755 |
|
|
$self->{set_next_input_character}->($self); |
6756 |
|
|
} |
6757 |
|
|
|
6758 |
|
|
} else { |
6759 |
|
|
$self->{parse_error}->(); |
6760 |
|
|
## reconsume |
6761 |
|
|
} |
6762 |
|
|
} |
6763 |
|
|
} else { |
6764 |
|
|
$self->{parse_error}->(); |
6765 |
|
|
unshift @{$self->{char}}, (117, 108, $self->{next_input_character}); |
6766 |
|
|
$self->{next_input_character} = 98; |
6767 |
|
|
} |
6768 |
|
|
} else { |
6769 |
|
|
$self->{parse_error}->(); |
6770 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
6771 |
|
|
$self->{next_input_character} = 98; |
6772 |
|
|
} |
6773 |
|
|
} else { |
6774 |
|
|
$self->{parse_error}->(); |
6775 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
6776 |
|
|
$self->{next_input_character} = 98; |
6777 |
|
|
} |
6778 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
6779 |
|
|
|
6780 |
|
|
if (@{$self->{char}}) { |
6781 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6782 |
|
|
} else { |
6783 |
|
|
$self->{set_next_input_character}->($self); |
6784 |
|
|
} |
6785 |
|
|
|
6786 |
|
|
if ($self->{next_input_character} == 97) { # a |
6787 |
|
|
|
6788 |
|
|
if (@{$self->{char}}) { |
6789 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6790 |
|
|
} else { |
6791 |
|
|
$self->{set_next_input_character}->($self); |
6792 |
|
|
} |
6793 |
|
|
|
6794 |
|
|
if ($self->{next_input_character} == 112) { # p |
6795 |
|
|
|
6796 |
|
|
if (@{$self->{char}}) { |
6797 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6798 |
|
|
} else { |
6799 |
|
|
$self->{set_next_input_character}->($self); |
6800 |
|
|
} |
6801 |
|
|
|
6802 |
|
|
{ |
6803 |
|
|
$r = {type => 'character', data => qq<\x{2229}>}; # cap |
6804 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6805 |
|
|
|
6806 |
|
|
if (@{$self->{char}}) { |
6807 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6808 |
|
|
} else { |
6809 |
|
|
$self->{set_next_input_character}->($self); |
6810 |
|
|
} |
6811 |
|
|
|
6812 |
|
|
} else { |
6813 |
|
|
$self->{parse_error}->(); |
6814 |
|
|
## reconsume |
6815 |
|
|
} |
6816 |
|
|
} |
6817 |
|
|
} else { |
6818 |
|
|
$self->{parse_error}->(); |
6819 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
6820 |
|
|
$self->{next_input_character} = 99; |
6821 |
|
|
} |
6822 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
6823 |
|
|
|
6824 |
|
|
if (@{$self->{char}}) { |
6825 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6826 |
|
|
} else { |
6827 |
|
|
$self->{set_next_input_character}->($self); |
6828 |
|
|
} |
6829 |
|
|
|
6830 |
|
|
if ($self->{next_input_character} == 101) { # e |
6831 |
|
|
|
6832 |
|
|
if (@{$self->{char}}) { |
6833 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6834 |
|
|
} else { |
6835 |
|
|
$self->{set_next_input_character}->($self); |
6836 |
|
|
} |
6837 |
|
|
|
6838 |
|
|
if ($self->{next_input_character} == 100) { # d |
6839 |
|
|
|
6840 |
|
|
if (@{$self->{char}}) { |
6841 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6842 |
|
|
} else { |
6843 |
|
|
$self->{set_next_input_character}->($self); |
6844 |
|
|
} |
6845 |
|
|
|
6846 |
|
|
if ($self->{next_input_character} == 105) { # i |
6847 |
|
|
|
6848 |
|
|
if (@{$self->{char}}) { |
6849 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6850 |
|
|
} else { |
6851 |
|
|
$self->{set_next_input_character}->($self); |
6852 |
|
|
} |
6853 |
|
|
|
6854 |
|
|
if ($self->{next_input_character} == 108) { # l |
6855 |
|
|
|
6856 |
|
|
if (@{$self->{char}}) { |
6857 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6858 |
|
|
} else { |
6859 |
|
|
$self->{set_next_input_character}->($self); |
6860 |
|
|
} |
6861 |
|
|
|
6862 |
|
|
{ |
6863 |
|
|
$r = {type => 'character', data => qq<\x{00E7}>}; # ccedil |
6864 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6865 |
|
|
|
6866 |
|
|
if (@{$self->{char}}) { |
6867 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6868 |
|
|
} else { |
6869 |
|
|
$self->{set_next_input_character}->($self); |
6870 |
|
|
} |
6871 |
|
|
|
6872 |
|
|
} else { |
6873 |
|
|
$self->{parse_error}->(); |
6874 |
|
|
## reconsume |
6875 |
|
|
} |
6876 |
|
|
} |
6877 |
|
|
} else { |
6878 |
|
|
$self->{parse_error}->(); |
6879 |
|
|
unshift @{$self->{char}}, (99, 101, 100, 105, $self->{next_input_character}); |
6880 |
|
|
$self->{next_input_character} = 99; |
6881 |
|
|
} |
6882 |
|
|
} else { |
6883 |
|
|
$self->{parse_error}->(); |
6884 |
|
|
unshift @{$self->{char}}, (99, 101, 100, $self->{next_input_character}); |
6885 |
|
|
$self->{next_input_character} = 99; |
6886 |
|
|
} |
6887 |
|
|
} else { |
6888 |
|
|
$self->{parse_error}->(); |
6889 |
|
|
unshift @{$self->{char}}, (99, 101, $self->{next_input_character}); |
6890 |
|
|
$self->{next_input_character} = 99; |
6891 |
|
|
} |
6892 |
|
|
} else { |
6893 |
|
|
$self->{parse_error}->(); |
6894 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
6895 |
|
|
$self->{next_input_character} = 99; |
6896 |
|
|
} |
6897 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
6898 |
|
|
|
6899 |
|
|
if (@{$self->{char}}) { |
6900 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6901 |
|
|
} else { |
6902 |
|
|
$self->{set_next_input_character}->($self); |
6903 |
|
|
} |
6904 |
|
|
|
6905 |
|
|
if ($self->{next_input_character} == 100) { # d |
6906 |
|
|
|
6907 |
|
|
if (@{$self->{char}}) { |
6908 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6909 |
|
|
} else { |
6910 |
|
|
$self->{set_next_input_character}->($self); |
6911 |
|
|
} |
6912 |
|
|
|
6913 |
|
|
if ($self->{next_input_character} == 105) { # i |
6914 |
|
|
|
6915 |
|
|
if (@{$self->{char}}) { |
6916 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6917 |
|
|
} else { |
6918 |
|
|
$self->{set_next_input_character}->($self); |
6919 |
|
|
} |
6920 |
|
|
|
6921 |
|
|
if ($self->{next_input_character} == 108) { # l |
6922 |
|
|
|
6923 |
|
|
if (@{$self->{char}}) { |
6924 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6925 |
|
|
} else { |
6926 |
|
|
$self->{set_next_input_character}->($self); |
6927 |
|
|
} |
6928 |
|
|
|
6929 |
|
|
{ |
6930 |
|
|
$r = {type => 'character', data => qq<\x{00B8}>}; # cedil |
6931 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6932 |
|
|
|
6933 |
|
|
if (@{$self->{char}}) { |
6934 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6935 |
|
|
} else { |
6936 |
|
|
$self->{set_next_input_character}->($self); |
6937 |
|
|
} |
6938 |
|
|
|
6939 |
|
|
} else { |
6940 |
|
|
$self->{parse_error}->(); |
6941 |
|
|
## reconsume |
6942 |
|
|
} |
6943 |
|
|
} |
6944 |
|
|
} else { |
6945 |
|
|
$self->{parse_error}->(); |
6946 |
|
|
unshift @{$self->{char}}, (101, 100, 105, $self->{next_input_character}); |
6947 |
|
|
$self->{next_input_character} = 99; |
6948 |
|
|
} |
6949 |
|
|
} else { |
6950 |
|
|
$self->{parse_error}->(); |
6951 |
|
|
unshift @{$self->{char}}, (101, 100, $self->{next_input_character}); |
6952 |
|
|
$self->{next_input_character} = 99; |
6953 |
|
|
} |
6954 |
|
|
} elsif ($self->{next_input_character} == 110) { # n |
6955 |
|
|
|
6956 |
|
|
if (@{$self->{char}}) { |
6957 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6958 |
|
|
} else { |
6959 |
|
|
$self->{set_next_input_character}->($self); |
6960 |
|
|
} |
6961 |
|
|
|
6962 |
|
|
if ($self->{next_input_character} == 116) { # t |
6963 |
|
|
|
6964 |
|
|
if (@{$self->{char}}) { |
6965 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6966 |
|
|
} else { |
6967 |
|
|
$self->{set_next_input_character}->($self); |
6968 |
|
|
} |
6969 |
|
|
|
6970 |
|
|
{ |
6971 |
|
|
$r = {type => 'character', data => qq<\x{00A2}>}; # cent |
6972 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
6973 |
|
|
|
6974 |
|
|
if (@{$self->{char}}) { |
6975 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6976 |
|
|
} else { |
6977 |
|
|
$self->{set_next_input_character}->($self); |
6978 |
|
|
} |
6979 |
|
|
|
6980 |
|
|
} else { |
6981 |
|
|
$self->{parse_error}->(); |
6982 |
|
|
## reconsume |
6983 |
|
|
} |
6984 |
|
|
} |
6985 |
|
|
} else { |
6986 |
|
|
$self->{parse_error}->(); |
6987 |
|
|
unshift @{$self->{char}}, (101, 110, $self->{next_input_character}); |
6988 |
|
|
$self->{next_input_character} = 99; |
6989 |
|
|
} |
6990 |
|
|
} else { |
6991 |
|
|
$self->{parse_error}->(); |
6992 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
6993 |
|
|
$self->{next_input_character} = 99; |
6994 |
|
|
} |
6995 |
|
|
} elsif ($self->{next_input_character} == 104) { # h |
6996 |
|
|
|
6997 |
|
|
if (@{$self->{char}}) { |
6998 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
6999 |
|
|
} else { |
7000 |
|
|
$self->{set_next_input_character}->($self); |
7001 |
|
|
} |
7002 |
|
|
|
7003 |
|
|
if ($self->{next_input_character} == 105) { # i |
7004 |
|
|
|
7005 |
|
|
if (@{$self->{char}}) { |
7006 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7007 |
|
|
} else { |
7008 |
|
|
$self->{set_next_input_character}->($self); |
7009 |
|
|
} |
7010 |
|
|
|
7011 |
|
|
{ |
7012 |
|
|
$r = {type => 'character', data => qq<\x{03C7}>}; # chi |
7013 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7014 |
|
|
|
7015 |
|
|
if (@{$self->{char}}) { |
7016 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7017 |
|
|
} else { |
7018 |
|
|
$self->{set_next_input_character}->($self); |
7019 |
|
|
} |
7020 |
|
|
|
7021 |
|
|
} else { |
7022 |
|
|
$self->{parse_error}->(); |
7023 |
|
|
## reconsume |
7024 |
|
|
} |
7025 |
|
|
} |
7026 |
|
|
} else { |
7027 |
|
|
$self->{parse_error}->(); |
7028 |
|
|
unshift @{$self->{char}}, (104, $self->{next_input_character}); |
7029 |
|
|
$self->{next_input_character} = 99; |
7030 |
|
|
} |
7031 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
7032 |
|
|
|
7033 |
|
|
if (@{$self->{char}}) { |
7034 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7035 |
|
|
} else { |
7036 |
|
|
$self->{set_next_input_character}->($self); |
7037 |
|
|
} |
7038 |
|
|
|
7039 |
|
|
if ($self->{next_input_character} == 114) { # r |
7040 |
|
|
|
7041 |
|
|
if (@{$self->{char}}) { |
7042 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7043 |
|
|
} else { |
7044 |
|
|
$self->{set_next_input_character}->($self); |
7045 |
|
|
} |
7046 |
|
|
|
7047 |
|
|
if ($self->{next_input_character} == 99) { # c |
7048 |
|
|
|
7049 |
|
|
if (@{$self->{char}}) { |
7050 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7051 |
|
|
} else { |
7052 |
|
|
$self->{set_next_input_character}->($self); |
7053 |
|
|
} |
7054 |
|
|
|
7055 |
|
|
{ |
7056 |
|
|
$r = {type => 'character', data => qq<\x{02C6}>}; # circ |
7057 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7058 |
|
|
|
7059 |
|
|
if (@{$self->{char}}) { |
7060 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7061 |
|
|
} else { |
7062 |
|
|
$self->{set_next_input_character}->($self); |
7063 |
|
|
} |
7064 |
|
|
|
7065 |
|
|
} else { |
7066 |
|
|
$self->{parse_error}->(); |
7067 |
|
|
## reconsume |
7068 |
|
|
} |
7069 |
|
|
} |
7070 |
|
|
} else { |
7071 |
|
|
$self->{parse_error}->(); |
7072 |
|
|
unshift @{$self->{char}}, (105, 114, $self->{next_input_character}); |
7073 |
|
|
$self->{next_input_character} = 99; |
7074 |
|
|
} |
7075 |
|
|
} else { |
7076 |
|
|
$self->{parse_error}->(); |
7077 |
|
|
unshift @{$self->{char}}, (105, $self->{next_input_character}); |
7078 |
|
|
$self->{next_input_character} = 99; |
7079 |
|
|
} |
7080 |
|
|
} elsif ($self->{next_input_character} == 108) { # l |
7081 |
|
|
|
7082 |
|
|
if (@{$self->{char}}) { |
7083 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7084 |
|
|
} else { |
7085 |
|
|
$self->{set_next_input_character}->($self); |
7086 |
|
|
} |
7087 |
|
|
|
7088 |
|
|
if ($self->{next_input_character} == 117) { # u |
7089 |
|
|
|
7090 |
|
|
if (@{$self->{char}}) { |
7091 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7092 |
|
|
} else { |
7093 |
|
|
$self->{set_next_input_character}->($self); |
7094 |
|
|
} |
7095 |
|
|
|
7096 |
|
|
if ($self->{next_input_character} == 98) { # b |
7097 |
|
|
|
7098 |
|
|
if (@{$self->{char}}) { |
7099 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7100 |
|
|
} else { |
7101 |
|
|
$self->{set_next_input_character}->($self); |
7102 |
|
|
} |
7103 |
|
|
|
7104 |
|
|
if ($self->{next_input_character} == 115) { # s |
7105 |
|
|
|
7106 |
|
|
if (@{$self->{char}}) { |
7107 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7108 |
|
|
} else { |
7109 |
|
|
$self->{set_next_input_character}->($self); |
7110 |
|
|
} |
7111 |
|
|
|
7112 |
|
|
{ |
7113 |
|
|
$r = {type => 'character', data => qq<\x{2663}>}; # clubs |
7114 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7115 |
|
|
|
7116 |
|
|
if (@{$self->{char}}) { |
7117 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7118 |
|
|
} else { |
7119 |
|
|
$self->{set_next_input_character}->($self); |
7120 |
|
|
} |
7121 |
|
|
|
7122 |
|
|
} else { |
7123 |
|
|
$self->{parse_error}->(); |
7124 |
|
|
## reconsume |
7125 |
|
|
} |
7126 |
|
|
} |
7127 |
|
|
} else { |
7128 |
|
|
$self->{parse_error}->(); |
7129 |
|
|
unshift @{$self->{char}}, (108, 117, 98, $self->{next_input_character}); |
7130 |
|
|
$self->{next_input_character} = 99; |
7131 |
|
|
} |
7132 |
|
|
} else { |
7133 |
|
|
$self->{parse_error}->(); |
7134 |
|
|
unshift @{$self->{char}}, (108, 117, $self->{next_input_character}); |
7135 |
|
|
$self->{next_input_character} = 99; |
7136 |
|
|
} |
7137 |
|
|
} else { |
7138 |
|
|
$self->{parse_error}->(); |
7139 |
|
|
unshift @{$self->{char}}, (108, $self->{next_input_character}); |
7140 |
|
|
$self->{next_input_character} = 99; |
7141 |
|
|
} |
7142 |
|
|
} elsif ($self->{next_input_character} == 111) { # o |
7143 |
|
|
|
7144 |
|
|
if (@{$self->{char}}) { |
7145 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7146 |
|
|
} else { |
7147 |
|
|
$self->{set_next_input_character}->($self); |
7148 |
|
|
} |
7149 |
|
|
|
7150 |
|
|
if ($self->{next_input_character} == 110) { # n |
7151 |
|
|
|
7152 |
|
|
if (@{$self->{char}}) { |
7153 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7154 |
|
|
} else { |
7155 |
|
|
$self->{set_next_input_character}->($self); |
7156 |
|
|
} |
7157 |
|
|
|
7158 |
|
|
if ($self->{next_input_character} == 103) { # g |
7159 |
|
|
|
7160 |
|
|
if (@{$self->{char}}) { |
7161 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7162 |
|
|
} else { |
7163 |
|
|
$self->{set_next_input_character}->($self); |
7164 |
|
|
} |
7165 |
|
|
|
7166 |
|
|
{ |
7167 |
|
|
$r = {type => 'character', data => qq<\x{2245}>}; # cong |
7168 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7169 |
|
|
|
7170 |
|
|
if (@{$self->{char}}) { |
7171 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7172 |
|
|
} else { |
7173 |
|
|
$self->{set_next_input_character}->($self); |
7174 |
|
|
} |
7175 |
|
|
|
7176 |
|
|
} else { |
7177 |
|
|
$self->{parse_error}->(); |
7178 |
|
|
## reconsume |
7179 |
|
|
} |
7180 |
|
|
} |
7181 |
|
|
} else { |
7182 |
|
|
$self->{parse_error}->(); |
7183 |
|
|
unshift @{$self->{char}}, (111, 110, $self->{next_input_character}); |
7184 |
|
|
$self->{next_input_character} = 99; |
7185 |
|
|
} |
7186 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
7187 |
|
|
|
7188 |
|
|
if (@{$self->{char}}) { |
7189 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7190 |
|
|
} else { |
7191 |
|
|
$self->{set_next_input_character}->($self); |
7192 |
|
|
} |
7193 |
|
|
|
7194 |
|
|
if ($self->{next_input_character} == 121) { # y |
7195 |
|
|
|
7196 |
|
|
if (@{$self->{char}}) { |
7197 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7198 |
|
|
} else { |
7199 |
|
|
$self->{set_next_input_character}->($self); |
7200 |
|
|
} |
7201 |
|
|
|
7202 |
|
|
{ |
7203 |
|
|
$r = {type => 'character', data => qq<\x{00A9}>}; # copy |
7204 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7205 |
|
|
|
7206 |
|
|
if (@{$self->{char}}) { |
7207 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7208 |
|
|
} else { |
7209 |
|
|
$self->{set_next_input_character}->($self); |
7210 |
|
|
} |
7211 |
|
|
|
7212 |
|
|
} else { |
7213 |
|
|
$self->{parse_error}->(); |
7214 |
|
|
## reconsume |
7215 |
|
|
} |
7216 |
|
|
} |
7217 |
|
|
} else { |
7218 |
|
|
$self->{parse_error}->(); |
7219 |
|
|
unshift @{$self->{char}}, (111, 112, $self->{next_input_character}); |
7220 |
|
|
$self->{next_input_character} = 99; |
7221 |
|
|
} |
7222 |
|
|
} else { |
7223 |
|
|
$self->{parse_error}->(); |
7224 |
|
|
unshift @{$self->{char}}, (111, $self->{next_input_character}); |
7225 |
|
|
$self->{next_input_character} = 99; |
7226 |
|
|
} |
7227 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
7228 |
|
|
|
7229 |
|
|
if (@{$self->{char}}) { |
7230 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7231 |
|
|
} else { |
7232 |
|
|
$self->{set_next_input_character}->($self); |
7233 |
|
|
} |
7234 |
|
|
|
7235 |
|
|
if ($self->{next_input_character} == 97) { # a |
7236 |
|
|
|
7237 |
|
|
if (@{$self->{char}}) { |
7238 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7239 |
|
|
} else { |
7240 |
|
|
$self->{set_next_input_character}->($self); |
7241 |
|
|
} |
7242 |
|
|
|
7243 |
|
|
if ($self->{next_input_character} == 114) { # r |
7244 |
|
|
|
7245 |
|
|
if (@{$self->{char}}) { |
7246 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7247 |
|
|
} else { |
7248 |
|
|
$self->{set_next_input_character}->($self); |
7249 |
|
|
} |
7250 |
|
|
|
7251 |
|
|
if ($self->{next_input_character} == 114) { # r |
7252 |
|
|
|
7253 |
|
|
if (@{$self->{char}}) { |
7254 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7255 |
|
|
} else { |
7256 |
|
|
$self->{set_next_input_character}->($self); |
7257 |
|
|
} |
7258 |
|
|
|
7259 |
|
|
{ |
7260 |
|
|
$r = {type => 'character', data => qq<\x{21B5}>}; # crarr |
7261 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7262 |
|
|
|
7263 |
|
|
if (@{$self->{char}}) { |
7264 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7265 |
|
|
} else { |
7266 |
|
|
$self->{set_next_input_character}->($self); |
7267 |
|
|
} |
7268 |
|
|
|
7269 |
|
|
} else { |
7270 |
|
|
$self->{parse_error}->(); |
7271 |
|
|
## reconsume |
7272 |
|
|
} |
7273 |
|
|
} |
7274 |
|
|
} else { |
7275 |
|
|
$self->{parse_error}->(); |
7276 |
|
|
unshift @{$self->{char}}, (114, 97, 114, $self->{next_input_character}); |
7277 |
|
|
$self->{next_input_character} = 99; |
7278 |
|
|
} |
7279 |
|
|
} else { |
7280 |
|
|
$self->{parse_error}->(); |
7281 |
|
|
unshift @{$self->{char}}, (114, 97, $self->{next_input_character}); |
7282 |
|
|
$self->{next_input_character} = 99; |
7283 |
|
|
} |
7284 |
|
|
} else { |
7285 |
|
|
$self->{parse_error}->(); |
7286 |
|
|
unshift @{$self->{char}}, (114, $self->{next_input_character}); |
7287 |
|
|
$self->{next_input_character} = 99; |
7288 |
|
|
} |
7289 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
7290 |
|
|
|
7291 |
|
|
if (@{$self->{char}}) { |
7292 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7293 |
|
|
} else { |
7294 |
|
|
$self->{set_next_input_character}->($self); |
7295 |
|
|
} |
7296 |
|
|
|
7297 |
|
|
if ($self->{next_input_character} == 112) { # p |
7298 |
|
|
|
7299 |
|
|
if (@{$self->{char}}) { |
7300 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7301 |
|
|
} else { |
7302 |
|
|
$self->{set_next_input_character}->($self); |
7303 |
|
|
} |
7304 |
|
|
|
7305 |
|
|
{ |
7306 |
|
|
$r = {type => 'character', data => qq<\x{222A}>}; # cup |
7307 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7308 |
|
|
|
7309 |
|
|
if (@{$self->{char}}) { |
7310 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7311 |
|
|
} else { |
7312 |
|
|
$self->{set_next_input_character}->($self); |
7313 |
|
|
} |
7314 |
|
|
|
7315 |
|
|
} else { |
7316 |
|
|
$self->{parse_error}->(); |
7317 |
|
|
## reconsume |
7318 |
|
|
} |
7319 |
|
|
} |
7320 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
7321 |
|
|
|
7322 |
|
|
if (@{$self->{char}}) { |
7323 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7324 |
|
|
} else { |
7325 |
|
|
$self->{set_next_input_character}->($self); |
7326 |
|
|
} |
7327 |
|
|
|
7328 |
|
|
if ($self->{next_input_character} == 114) { # r |
7329 |
|
|
|
7330 |
|
|
if (@{$self->{char}}) { |
7331 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7332 |
|
|
} else { |
7333 |
|
|
$self->{set_next_input_character}->($self); |
7334 |
|
|
} |
7335 |
|
|
|
7336 |
|
|
if ($self->{next_input_character} == 101) { # e |
7337 |
|
|
|
7338 |
|
|
if (@{$self->{char}}) { |
7339 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7340 |
|
|
} else { |
7341 |
|
|
$self->{set_next_input_character}->($self); |
7342 |
|
|
} |
7343 |
|
|
|
7344 |
|
|
if ($self->{next_input_character} == 110) { # n |
7345 |
|
|
|
7346 |
|
|
if (@{$self->{char}}) { |
7347 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7348 |
|
|
} else { |
7349 |
|
|
$self->{set_next_input_character}->($self); |
7350 |
|
|
} |
7351 |
|
|
|
7352 |
|
|
{ |
7353 |
|
|
$r = {type => 'character', data => qq<\x{00A4}>}; # curren |
7354 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7355 |
|
|
|
7356 |
|
|
if (@{$self->{char}}) { |
7357 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7358 |
|
|
} else { |
7359 |
|
|
$self->{set_next_input_character}->($self); |
7360 |
|
|
} |
7361 |
|
|
|
7362 |
|
|
} else { |
7363 |
|
|
$self->{parse_error}->(); |
7364 |
|
|
## reconsume |
7365 |
|
|
} |
7366 |
|
|
} |
7367 |
|
|
} else { |
7368 |
|
|
$self->{parse_error}->(); |
7369 |
|
|
unshift @{$self->{char}}, (117, 114, 114, 101, $self->{next_input_character}); |
7370 |
|
|
$self->{next_input_character} = 99; |
7371 |
|
|
} |
7372 |
|
|
} else { |
7373 |
|
|
$self->{parse_error}->(); |
7374 |
|
|
unshift @{$self->{char}}, (117, 114, 114, $self->{next_input_character}); |
7375 |
|
|
$self->{next_input_character} = 99; |
7376 |
|
|
} |
7377 |
|
|
} else { |
7378 |
|
|
$self->{parse_error}->(); |
7379 |
|
|
unshift @{$self->{char}}, (117, 114, $self->{next_input_character}); |
7380 |
|
|
$self->{next_input_character} = 99; |
7381 |
|
|
} |
7382 |
|
|
} else { |
7383 |
|
|
$self->{parse_error}->(); |
7384 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
7385 |
|
|
$self->{next_input_character} = 99; |
7386 |
|
|
} |
7387 |
|
|
} else { |
7388 |
|
|
$self->{parse_error}->(); |
7389 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
7390 |
|
|
$self->{next_input_character} = 99; |
7391 |
|
|
} |
7392 |
|
|
} elsif ($self->{next_input_character} == 100) { # d |
7393 |
|
|
|
7394 |
|
|
if (@{$self->{char}}) { |
7395 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7396 |
|
|
} else { |
7397 |
|
|
$self->{set_next_input_character}->($self); |
7398 |
|
|
} |
7399 |
|
|
|
7400 |
|
|
if ($self->{next_input_character} == 65) { # A |
7401 |
|
|
|
7402 |
|
|
if (@{$self->{char}}) { |
7403 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7404 |
|
|
} else { |
7405 |
|
|
$self->{set_next_input_character}->($self); |
7406 |
|
|
} |
7407 |
|
|
|
7408 |
|
|
if ($self->{next_input_character} == 114) { # r |
7409 |
|
|
|
7410 |
|
|
if (@{$self->{char}}) { |
7411 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7412 |
|
|
} else { |
7413 |
|
|
$self->{set_next_input_character}->($self); |
7414 |
|
|
} |
7415 |
|
|
|
7416 |
|
|
if ($self->{next_input_character} == 114) { # r |
7417 |
|
|
|
7418 |
|
|
if (@{$self->{char}}) { |
7419 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7420 |
|
|
} else { |
7421 |
|
|
$self->{set_next_input_character}->($self); |
7422 |
|
|
} |
7423 |
|
|
|
7424 |
|
|
{ |
7425 |
|
|
$r = {type => 'character', data => qq<\x{21D3}>}; # dArr |
7426 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7427 |
|
|
|
7428 |
|
|
if (@{$self->{char}}) { |
7429 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7430 |
|
|
} else { |
7431 |
|
|
$self->{set_next_input_character}->($self); |
7432 |
|
|
} |
7433 |
|
|
|
7434 |
|
|
} else { |
7435 |
|
|
$self->{parse_error}->(); |
7436 |
|
|
## reconsume |
7437 |
|
|
} |
7438 |
|
|
} |
7439 |
|
|
} else { |
7440 |
|
|
$self->{parse_error}->(); |
7441 |
|
|
unshift @{$self->{char}}, (65, 114, $self->{next_input_character}); |
7442 |
|
|
$self->{next_input_character} = 100; |
7443 |
|
|
} |
7444 |
|
|
} else { |
7445 |
|
|
$self->{parse_error}->(); |
7446 |
|
|
unshift @{$self->{char}}, (65, $self->{next_input_character}); |
7447 |
|
|
$self->{next_input_character} = 100; |
7448 |
|
|
} |
7449 |
|
|
} elsif ($self->{next_input_character} == 97) { # a |
7450 |
|
|
|
7451 |
|
|
if (@{$self->{char}}) { |
7452 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7453 |
|
|
} else { |
7454 |
|
|
$self->{set_next_input_character}->($self); |
7455 |
|
|
} |
7456 |
|
|
|
7457 |
|
|
if ($self->{next_input_character} == 103) { # g |
7458 |
|
|
|
7459 |
|
|
if (@{$self->{char}}) { |
7460 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7461 |
|
|
} else { |
7462 |
|
|
$self->{set_next_input_character}->($self); |
7463 |
|
|
} |
7464 |
|
|
|
7465 |
|
|
if ($self->{next_input_character} == 103) { # g |
7466 |
|
|
|
7467 |
|
|
if (@{$self->{char}}) { |
7468 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7469 |
|
|
} else { |
7470 |
|
|
$self->{set_next_input_character}->($self); |
7471 |
|
|
} |
7472 |
|
|
|
7473 |
|
|
if ($self->{next_input_character} == 101) { # e |
7474 |
|
|
|
7475 |
|
|
if (@{$self->{char}}) { |
7476 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7477 |
|
|
} else { |
7478 |
|
|
$self->{set_next_input_character}->($self); |
7479 |
|
|
} |
7480 |
|
|
|
7481 |
|
|
if ($self->{next_input_character} == 114) { # r |
7482 |
|
|
|
7483 |
|
|
if (@{$self->{char}}) { |
7484 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7485 |
|
|
} else { |
7486 |
|
|
$self->{set_next_input_character}->($self); |
7487 |
|
|
} |
7488 |
|
|
|
7489 |
|
|
{ |
7490 |
|
|
$r = {type => 'character', data => qq<\x{2020}>}; # dagger |
7491 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7492 |
|
|
|
7493 |
|
|
if (@{$self->{char}}) { |
7494 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7495 |
|
|
} else { |
7496 |
|
|
$self->{set_next_input_character}->($self); |
7497 |
|
|
} |
7498 |
|
|
|
7499 |
|
|
} else { |
7500 |
|
|
$self->{parse_error}->(); |
7501 |
|
|
## reconsume |
7502 |
|
|
} |
7503 |
|
|
} |
7504 |
|
|
} else { |
7505 |
|
|
$self->{parse_error}->(); |
7506 |
|
|
unshift @{$self->{char}}, (97, 103, 103, 101, $self->{next_input_character}); |
7507 |
|
|
$self->{next_input_character} = 100; |
7508 |
|
|
} |
7509 |
|
|
} else { |
7510 |
|
|
$self->{parse_error}->(); |
7511 |
|
|
unshift @{$self->{char}}, (97, 103, 103, $self->{next_input_character}); |
7512 |
|
|
$self->{next_input_character} = 100; |
7513 |
|
|
} |
7514 |
|
|
} else { |
7515 |
|
|
$self->{parse_error}->(); |
7516 |
|
|
unshift @{$self->{char}}, (97, 103, $self->{next_input_character}); |
7517 |
|
|
$self->{next_input_character} = 100; |
7518 |
|
|
} |
7519 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
7520 |
|
|
|
7521 |
|
|
if (@{$self->{char}}) { |
7522 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7523 |
|
|
} else { |
7524 |
|
|
$self->{set_next_input_character}->($self); |
7525 |
|
|
} |
7526 |
|
|
|
7527 |
|
|
if ($self->{next_input_character} == 114) { # r |
7528 |
|
|
|
7529 |
|
|
if (@{$self->{char}}) { |
7530 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7531 |
|
|
} else { |
7532 |
|
|
$self->{set_next_input_character}->($self); |
7533 |
|
|
} |
7534 |
|
|
|
7535 |
|
|
{ |
7536 |
|
|
$r = {type => 'character', data => qq<\x{2193}>}; # darr |
7537 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7538 |
|
|
|
7539 |
|
|
if (@{$self->{char}}) { |
7540 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7541 |
|
|
} else { |
7542 |
|
|
$self->{set_next_input_character}->($self); |
7543 |
|
|
} |
7544 |
|
|
|
7545 |
|
|
} else { |
7546 |
|
|
$self->{parse_error}->(); |
7547 |
|
|
## reconsume |
7548 |
|
|
} |
7549 |
|
|
} |
7550 |
|
|
} else { |
7551 |
|
|
$self->{parse_error}->(); |
7552 |
|
|
unshift @{$self->{char}}, (97, 114, $self->{next_input_character}); |
7553 |
|
|
$self->{next_input_character} = 100; |
7554 |
|
|
} |
7555 |
|
|
} else { |
7556 |
|
|
$self->{parse_error}->(); |
7557 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
7558 |
|
|
$self->{next_input_character} = 100; |
7559 |
|
|
} |
7560 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
7561 |
|
|
|
7562 |
|
|
if (@{$self->{char}}) { |
7563 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7564 |
|
|
} else { |
7565 |
|
|
$self->{set_next_input_character}->($self); |
7566 |
|
|
} |
7567 |
|
|
|
7568 |
|
|
if ($self->{next_input_character} == 103) { # g |
7569 |
|
|
|
7570 |
|
|
if (@{$self->{char}}) { |
7571 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7572 |
|
|
} else { |
7573 |
|
|
$self->{set_next_input_character}->($self); |
7574 |
|
|
} |
7575 |
|
|
|
7576 |
|
|
{ |
7577 |
|
|
$r = {type => 'character', data => qq<\x{00B0}>}; # deg |
7578 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7579 |
|
|
|
7580 |
|
|
if (@{$self->{char}}) { |
7581 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7582 |
|
|
} else { |
7583 |
|
|
$self->{set_next_input_character}->($self); |
7584 |
|
|
} |
7585 |
|
|
|
7586 |
|
|
} else { |
7587 |
|
|
$self->{parse_error}->(); |
7588 |
|
|
## reconsume |
7589 |
|
|
} |
7590 |
|
|
} |
7591 |
|
|
} elsif ($self->{next_input_character} == 108) { # l |
7592 |
|
|
|
7593 |
|
|
if (@{$self->{char}}) { |
7594 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7595 |
|
|
} else { |
7596 |
|
|
$self->{set_next_input_character}->($self); |
7597 |
|
|
} |
7598 |
|
|
|
7599 |
|
|
if ($self->{next_input_character} == 116) { # t |
7600 |
|
|
|
7601 |
|
|
if (@{$self->{char}}) { |
7602 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7603 |
|
|
} else { |
7604 |
|
|
$self->{set_next_input_character}->($self); |
7605 |
|
|
} |
7606 |
|
|
|
7607 |
|
|
if ($self->{next_input_character} == 97) { # a |
7608 |
|
|
|
7609 |
|
|
if (@{$self->{char}}) { |
7610 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7611 |
|
|
} else { |
7612 |
|
|
$self->{set_next_input_character}->($self); |
7613 |
|
|
} |
7614 |
|
|
|
7615 |
|
|
{ |
7616 |
|
|
$r = {type => 'character', data => qq<\x{03B4}>}; # delta |
7617 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7618 |
|
|
|
7619 |
|
|
if (@{$self->{char}}) { |
7620 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7621 |
|
|
} else { |
7622 |
|
|
$self->{set_next_input_character}->($self); |
7623 |
|
|
} |
7624 |
|
|
|
7625 |
|
|
} else { |
7626 |
|
|
$self->{parse_error}->(); |
7627 |
|
|
## reconsume |
7628 |
|
|
} |
7629 |
|
|
} |
7630 |
|
|
} else { |
7631 |
|
|
$self->{parse_error}->(); |
7632 |
|
|
unshift @{$self->{char}}, (101, 108, 116, $self->{next_input_character}); |
7633 |
|
|
$self->{next_input_character} = 100; |
7634 |
|
|
} |
7635 |
|
|
} else { |
7636 |
|
|
$self->{parse_error}->(); |
7637 |
|
|
unshift @{$self->{char}}, (101, 108, $self->{next_input_character}); |
7638 |
|
|
$self->{next_input_character} = 100; |
7639 |
|
|
} |
7640 |
|
|
} else { |
7641 |
|
|
$self->{parse_error}->(); |
7642 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
7643 |
|
|
$self->{next_input_character} = 100; |
7644 |
|
|
} |
7645 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
7646 |
|
|
|
7647 |
|
|
if (@{$self->{char}}) { |
7648 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7649 |
|
|
} else { |
7650 |
|
|
$self->{set_next_input_character}->($self); |
7651 |
|
|
} |
7652 |
|
|
|
7653 |
|
|
if ($self->{next_input_character} == 97) { # a |
7654 |
|
|
|
7655 |
|
|
if (@{$self->{char}}) { |
7656 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7657 |
|
|
} else { |
7658 |
|
|
$self->{set_next_input_character}->($self); |
7659 |
|
|
} |
7660 |
|
|
|
7661 |
|
|
if ($self->{next_input_character} == 109) { # m |
7662 |
|
|
|
7663 |
|
|
if (@{$self->{char}}) { |
7664 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7665 |
|
|
} else { |
7666 |
|
|
$self->{set_next_input_character}->($self); |
7667 |
|
|
} |
7668 |
|
|
|
7669 |
|
|
if ($self->{next_input_character} == 115) { # s |
7670 |
|
|
|
7671 |
|
|
if (@{$self->{char}}) { |
7672 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7673 |
|
|
} else { |
7674 |
|
|
$self->{set_next_input_character}->($self); |
7675 |
|
|
} |
7676 |
|
|
|
7677 |
|
|
{ |
7678 |
|
|
$r = {type => 'character', data => qq<\x{2666}>}; # diams |
7679 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7680 |
|
|
|
7681 |
|
|
if (@{$self->{char}}) { |
7682 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7683 |
|
|
} else { |
7684 |
|
|
$self->{set_next_input_character}->($self); |
7685 |
|
|
} |
7686 |
|
|
|
7687 |
|
|
} else { |
7688 |
|
|
$self->{parse_error}->(); |
7689 |
|
|
## reconsume |
7690 |
|
|
} |
7691 |
|
|
} |
7692 |
|
|
} else { |
7693 |
|
|
$self->{parse_error}->(); |
7694 |
|
|
unshift @{$self->{char}}, (105, 97, 109, $self->{next_input_character}); |
7695 |
|
|
$self->{next_input_character} = 100; |
7696 |
|
|
} |
7697 |
|
|
} else { |
7698 |
|
|
$self->{parse_error}->(); |
7699 |
|
|
unshift @{$self->{char}}, (105, 97, $self->{next_input_character}); |
7700 |
|
|
$self->{next_input_character} = 100; |
7701 |
|
|
} |
7702 |
|
|
} elsif ($self->{next_input_character} == 118) { # v |
7703 |
|
|
|
7704 |
|
|
if (@{$self->{char}}) { |
7705 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7706 |
|
|
} else { |
7707 |
|
|
$self->{set_next_input_character}->($self); |
7708 |
|
|
} |
7709 |
|
|
|
7710 |
|
|
if ($self->{next_input_character} == 105) { # i |
7711 |
|
|
|
7712 |
|
|
if (@{$self->{char}}) { |
7713 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7714 |
|
|
} else { |
7715 |
|
|
$self->{set_next_input_character}->($self); |
7716 |
|
|
} |
7717 |
|
|
|
7718 |
|
|
if ($self->{next_input_character} == 100) { # d |
7719 |
|
|
|
7720 |
|
|
if (@{$self->{char}}) { |
7721 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7722 |
|
|
} else { |
7723 |
|
|
$self->{set_next_input_character}->($self); |
7724 |
|
|
} |
7725 |
|
|
|
7726 |
|
|
if ($self->{next_input_character} == 101) { # e |
7727 |
|
|
|
7728 |
|
|
if (@{$self->{char}}) { |
7729 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7730 |
|
|
} else { |
7731 |
|
|
$self->{set_next_input_character}->($self); |
7732 |
|
|
} |
7733 |
|
|
|
7734 |
|
|
{ |
7735 |
|
|
$r = {type => 'character', data => qq<\x{00F7}>}; # divide |
7736 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7737 |
|
|
|
7738 |
|
|
if (@{$self->{char}}) { |
7739 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7740 |
|
|
} else { |
7741 |
|
|
$self->{set_next_input_character}->($self); |
7742 |
|
|
} |
7743 |
|
|
|
7744 |
|
|
} else { |
7745 |
|
|
$self->{parse_error}->(); |
7746 |
|
|
## reconsume |
7747 |
|
|
} |
7748 |
|
|
} |
7749 |
|
|
} else { |
7750 |
|
|
$self->{parse_error}->(); |
7751 |
|
|
unshift @{$self->{char}}, (105, 118, 105, 100, $self->{next_input_character}); |
7752 |
|
|
$self->{next_input_character} = 100; |
7753 |
|
|
} |
7754 |
|
|
} else { |
7755 |
|
|
$self->{parse_error}->(); |
7756 |
|
|
unshift @{$self->{char}}, (105, 118, 105, $self->{next_input_character}); |
7757 |
|
|
$self->{next_input_character} = 100; |
7758 |
|
|
} |
7759 |
|
|
} else { |
7760 |
|
|
$self->{parse_error}->(); |
7761 |
|
|
unshift @{$self->{char}}, (105, 118, $self->{next_input_character}); |
7762 |
|
|
$self->{next_input_character} = 100; |
7763 |
|
|
} |
7764 |
|
|
} else { |
7765 |
|
|
$self->{parse_error}->(); |
7766 |
|
|
unshift @{$self->{char}}, (105, $self->{next_input_character}); |
7767 |
|
|
$self->{next_input_character} = 100; |
7768 |
|
|
} |
7769 |
|
|
} else { |
7770 |
|
|
$self->{parse_error}->(); |
7771 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
7772 |
|
|
$self->{next_input_character} = 100; |
7773 |
|
|
} |
7774 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
7775 |
|
|
|
7776 |
|
|
if (@{$self->{char}}) { |
7777 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7778 |
|
|
} else { |
7779 |
|
|
$self->{set_next_input_character}->($self); |
7780 |
|
|
} |
7781 |
|
|
|
7782 |
|
|
if ($self->{next_input_character} == 97) { # a |
7783 |
|
|
|
7784 |
|
|
if (@{$self->{char}}) { |
7785 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7786 |
|
|
} else { |
7787 |
|
|
$self->{set_next_input_character}->($self); |
7788 |
|
|
} |
7789 |
|
|
|
7790 |
|
|
if ($self->{next_input_character} == 99) { # c |
7791 |
|
|
|
7792 |
|
|
if (@{$self->{char}}) { |
7793 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7794 |
|
|
} else { |
7795 |
|
|
$self->{set_next_input_character}->($self); |
7796 |
|
|
} |
7797 |
|
|
|
7798 |
|
|
if ($self->{next_input_character} == 117) { # u |
7799 |
|
|
|
7800 |
|
|
if (@{$self->{char}}) { |
7801 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7802 |
|
|
} else { |
7803 |
|
|
$self->{set_next_input_character}->($self); |
7804 |
|
|
} |
7805 |
|
|
|
7806 |
|
|
if ($self->{next_input_character} == 116) { # t |
7807 |
|
|
|
7808 |
|
|
if (@{$self->{char}}) { |
7809 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7810 |
|
|
} else { |
7811 |
|
|
$self->{set_next_input_character}->($self); |
7812 |
|
|
} |
7813 |
|
|
|
7814 |
|
|
if ($self->{next_input_character} == 101) { # e |
7815 |
|
|
|
7816 |
|
|
if (@{$self->{char}}) { |
7817 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7818 |
|
|
} else { |
7819 |
|
|
$self->{set_next_input_character}->($self); |
7820 |
|
|
} |
7821 |
|
|
|
7822 |
|
|
{ |
7823 |
|
|
$r = {type => 'character', data => qq<\x{00E9}>}; # eacute |
7824 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7825 |
|
|
|
7826 |
|
|
if (@{$self->{char}}) { |
7827 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7828 |
|
|
} else { |
7829 |
|
|
$self->{set_next_input_character}->($self); |
7830 |
|
|
} |
7831 |
|
|
|
7832 |
|
|
} else { |
7833 |
|
|
$self->{parse_error}->(); |
7834 |
|
|
## reconsume |
7835 |
|
|
} |
7836 |
|
|
} |
7837 |
|
|
} else { |
7838 |
|
|
$self->{parse_error}->(); |
7839 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
7840 |
|
|
$self->{next_input_character} = 101; |
7841 |
|
|
} |
7842 |
|
|
} else { |
7843 |
|
|
$self->{parse_error}->(); |
7844 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
7845 |
|
|
$self->{next_input_character} = 101; |
7846 |
|
|
} |
7847 |
|
|
} else { |
7848 |
|
|
$self->{parse_error}->(); |
7849 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
7850 |
|
|
$self->{next_input_character} = 101; |
7851 |
|
|
} |
7852 |
|
|
} else { |
7853 |
|
|
$self->{parse_error}->(); |
7854 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
7855 |
|
|
$self->{next_input_character} = 101; |
7856 |
|
|
} |
7857 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
7858 |
|
|
|
7859 |
|
|
if (@{$self->{char}}) { |
7860 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7861 |
|
|
} else { |
7862 |
|
|
$self->{set_next_input_character}->($self); |
7863 |
|
|
} |
7864 |
|
|
|
7865 |
|
|
if ($self->{next_input_character} == 105) { # i |
7866 |
|
|
|
7867 |
|
|
if (@{$self->{char}}) { |
7868 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7869 |
|
|
} else { |
7870 |
|
|
$self->{set_next_input_character}->($self); |
7871 |
|
|
} |
7872 |
|
|
|
7873 |
|
|
if ($self->{next_input_character} == 114) { # r |
7874 |
|
|
|
7875 |
|
|
if (@{$self->{char}}) { |
7876 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7877 |
|
|
} else { |
7878 |
|
|
$self->{set_next_input_character}->($self); |
7879 |
|
|
} |
7880 |
|
|
|
7881 |
|
|
if ($self->{next_input_character} == 99) { # c |
7882 |
|
|
|
7883 |
|
|
if (@{$self->{char}}) { |
7884 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7885 |
|
|
} else { |
7886 |
|
|
$self->{set_next_input_character}->($self); |
7887 |
|
|
} |
7888 |
|
|
|
7889 |
|
|
{ |
7890 |
|
|
$r = {type => 'character', data => qq<\x{00EA}>}; # ecirc |
7891 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7892 |
|
|
|
7893 |
|
|
if (@{$self->{char}}) { |
7894 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7895 |
|
|
} else { |
7896 |
|
|
$self->{set_next_input_character}->($self); |
7897 |
|
|
} |
7898 |
|
|
|
7899 |
|
|
} else { |
7900 |
|
|
$self->{parse_error}->(); |
7901 |
|
|
## reconsume |
7902 |
|
|
} |
7903 |
|
|
} |
7904 |
|
|
} else { |
7905 |
|
|
$self->{parse_error}->(); |
7906 |
|
|
unshift @{$self->{char}}, (99, 105, 114, $self->{next_input_character}); |
7907 |
|
|
$self->{next_input_character} = 101; |
7908 |
|
|
} |
7909 |
|
|
} else { |
7910 |
|
|
$self->{parse_error}->(); |
7911 |
|
|
unshift @{$self->{char}}, (99, 105, $self->{next_input_character}); |
7912 |
|
|
$self->{next_input_character} = 101; |
7913 |
|
|
} |
7914 |
|
|
} else { |
7915 |
|
|
$self->{parse_error}->(); |
7916 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
7917 |
|
|
$self->{next_input_character} = 101; |
7918 |
|
|
} |
7919 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
7920 |
|
|
|
7921 |
|
|
if (@{$self->{char}}) { |
7922 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7923 |
|
|
} else { |
7924 |
|
|
$self->{set_next_input_character}->($self); |
7925 |
|
|
} |
7926 |
|
|
|
7927 |
|
|
if ($self->{next_input_character} == 114) { # r |
7928 |
|
|
|
7929 |
|
|
if (@{$self->{char}}) { |
7930 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7931 |
|
|
} else { |
7932 |
|
|
$self->{set_next_input_character}->($self); |
7933 |
|
|
} |
7934 |
|
|
|
7935 |
|
|
if ($self->{next_input_character} == 97) { # a |
7936 |
|
|
|
7937 |
|
|
if (@{$self->{char}}) { |
7938 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7939 |
|
|
} else { |
7940 |
|
|
$self->{set_next_input_character}->($self); |
7941 |
|
|
} |
7942 |
|
|
|
7943 |
|
|
if ($self->{next_input_character} == 118) { # v |
7944 |
|
|
|
7945 |
|
|
if (@{$self->{char}}) { |
7946 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7947 |
|
|
} else { |
7948 |
|
|
$self->{set_next_input_character}->($self); |
7949 |
|
|
} |
7950 |
|
|
|
7951 |
|
|
if ($self->{next_input_character} == 101) { # e |
7952 |
|
|
|
7953 |
|
|
if (@{$self->{char}}) { |
7954 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7955 |
|
|
} else { |
7956 |
|
|
$self->{set_next_input_character}->($self); |
7957 |
|
|
} |
7958 |
|
|
|
7959 |
|
|
{ |
7960 |
|
|
$r = {type => 'character', data => qq<\x{00E8}>}; # egrave |
7961 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
7962 |
|
|
|
7963 |
|
|
if (@{$self->{char}}) { |
7964 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7965 |
|
|
} else { |
7966 |
|
|
$self->{set_next_input_character}->($self); |
7967 |
|
|
} |
7968 |
|
|
|
7969 |
|
|
} else { |
7970 |
|
|
$self->{parse_error}->(); |
7971 |
|
|
## reconsume |
7972 |
|
|
} |
7973 |
|
|
} |
7974 |
|
|
} else { |
7975 |
|
|
$self->{parse_error}->(); |
7976 |
|
|
unshift @{$self->{char}}, (103, 114, 97, 118, $self->{next_input_character}); |
7977 |
|
|
$self->{next_input_character} = 101; |
7978 |
|
|
} |
7979 |
|
|
} else { |
7980 |
|
|
$self->{parse_error}->(); |
7981 |
|
|
unshift @{$self->{char}}, (103, 114, 97, $self->{next_input_character}); |
7982 |
|
|
$self->{next_input_character} = 101; |
7983 |
|
|
} |
7984 |
|
|
} else { |
7985 |
|
|
$self->{parse_error}->(); |
7986 |
|
|
unshift @{$self->{char}}, (103, 114, $self->{next_input_character}); |
7987 |
|
|
$self->{next_input_character} = 101; |
7988 |
|
|
} |
7989 |
|
|
} else { |
7990 |
|
|
$self->{parse_error}->(); |
7991 |
|
|
unshift @{$self->{char}}, (103, $self->{next_input_character}); |
7992 |
|
|
$self->{next_input_character} = 101; |
7993 |
|
|
} |
7994 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
7995 |
|
|
|
7996 |
|
|
if (@{$self->{char}}) { |
7997 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
7998 |
|
|
} else { |
7999 |
|
|
$self->{set_next_input_character}->($self); |
8000 |
|
|
} |
8001 |
|
|
|
8002 |
|
|
if ($self->{next_input_character} == 112) { # p |
8003 |
|
|
|
8004 |
|
|
if (@{$self->{char}}) { |
8005 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8006 |
|
|
} else { |
8007 |
|
|
$self->{set_next_input_character}->($self); |
8008 |
|
|
} |
8009 |
|
|
|
8010 |
|
|
if ($self->{next_input_character} == 116) { # t |
8011 |
|
|
|
8012 |
|
|
if (@{$self->{char}}) { |
8013 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8014 |
|
|
} else { |
8015 |
|
|
$self->{set_next_input_character}->($self); |
8016 |
|
|
} |
8017 |
|
|
|
8018 |
|
|
if ($self->{next_input_character} == 121) { # y |
8019 |
|
|
|
8020 |
|
|
if (@{$self->{char}}) { |
8021 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8022 |
|
|
} else { |
8023 |
|
|
$self->{set_next_input_character}->($self); |
8024 |
|
|
} |
8025 |
|
|
|
8026 |
|
|
{ |
8027 |
|
|
$r = {type => 'character', data => qq<\x{2205}>}; # empty |
8028 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8029 |
|
|
|
8030 |
|
|
if (@{$self->{char}}) { |
8031 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8032 |
|
|
} else { |
8033 |
|
|
$self->{set_next_input_character}->($self); |
8034 |
|
|
} |
8035 |
|
|
|
8036 |
|
|
} else { |
8037 |
|
|
$self->{parse_error}->(); |
8038 |
|
|
## reconsume |
8039 |
|
|
} |
8040 |
|
|
} |
8041 |
|
|
} else { |
8042 |
|
|
$self->{parse_error}->(); |
8043 |
|
|
unshift @{$self->{char}}, (109, 112, 116, $self->{next_input_character}); |
8044 |
|
|
$self->{next_input_character} = 101; |
8045 |
|
|
} |
8046 |
|
|
} else { |
8047 |
|
|
$self->{parse_error}->(); |
8048 |
|
|
unshift @{$self->{char}}, (109, 112, $self->{next_input_character}); |
8049 |
|
|
$self->{next_input_character} = 101; |
8050 |
|
|
} |
8051 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
8052 |
|
|
|
8053 |
|
|
if (@{$self->{char}}) { |
8054 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8055 |
|
|
} else { |
8056 |
|
|
$self->{set_next_input_character}->($self); |
8057 |
|
|
} |
8058 |
|
|
|
8059 |
|
|
if ($self->{next_input_character} == 112) { # p |
8060 |
|
|
|
8061 |
|
|
if (@{$self->{char}}) { |
8062 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8063 |
|
|
} else { |
8064 |
|
|
$self->{set_next_input_character}->($self); |
8065 |
|
|
} |
8066 |
|
|
|
8067 |
|
|
{ |
8068 |
|
|
$r = {type => 'character', data => qq<\x{2003}>}; # emsp |
8069 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8070 |
|
|
|
8071 |
|
|
if (@{$self->{char}}) { |
8072 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8073 |
|
|
} else { |
8074 |
|
|
$self->{set_next_input_character}->($self); |
8075 |
|
|
} |
8076 |
|
|
|
8077 |
|
|
} else { |
8078 |
|
|
$self->{parse_error}->(); |
8079 |
|
|
## reconsume |
8080 |
|
|
} |
8081 |
|
|
} |
8082 |
|
|
} else { |
8083 |
|
|
$self->{parse_error}->(); |
8084 |
|
|
unshift @{$self->{char}}, (109, 115, $self->{next_input_character}); |
8085 |
|
|
$self->{next_input_character} = 101; |
8086 |
|
|
} |
8087 |
|
|
} else { |
8088 |
|
|
$self->{parse_error}->(); |
8089 |
|
|
unshift @{$self->{char}}, (109, $self->{next_input_character}); |
8090 |
|
|
$self->{next_input_character} = 101; |
8091 |
|
|
} |
8092 |
|
|
} elsif ($self->{next_input_character} == 110) { # n |
8093 |
|
|
|
8094 |
|
|
if (@{$self->{char}}) { |
8095 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8096 |
|
|
} else { |
8097 |
|
|
$self->{set_next_input_character}->($self); |
8098 |
|
|
} |
8099 |
|
|
|
8100 |
|
|
if ($self->{next_input_character} == 115) { # s |
8101 |
|
|
|
8102 |
|
|
if (@{$self->{char}}) { |
8103 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8104 |
|
|
} else { |
8105 |
|
|
$self->{set_next_input_character}->($self); |
8106 |
|
|
} |
8107 |
|
|
|
8108 |
|
|
if ($self->{next_input_character} == 112) { # p |
8109 |
|
|
|
8110 |
|
|
if (@{$self->{char}}) { |
8111 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8112 |
|
|
} else { |
8113 |
|
|
$self->{set_next_input_character}->($self); |
8114 |
|
|
} |
8115 |
|
|
|
8116 |
|
|
{ |
8117 |
|
|
$r = {type => 'character', data => qq<\x{2002}>}; # ensp |
8118 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8119 |
|
|
|
8120 |
|
|
if (@{$self->{char}}) { |
8121 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8122 |
|
|
} else { |
8123 |
|
|
$self->{set_next_input_character}->($self); |
8124 |
|
|
} |
8125 |
|
|
|
8126 |
|
|
} else { |
8127 |
|
|
$self->{parse_error}->(); |
8128 |
|
|
## reconsume |
8129 |
|
|
} |
8130 |
|
|
} |
8131 |
|
|
} else { |
8132 |
|
|
$self->{parse_error}->(); |
8133 |
|
|
unshift @{$self->{char}}, (110, 115, $self->{next_input_character}); |
8134 |
|
|
$self->{next_input_character} = 101; |
8135 |
|
|
} |
8136 |
|
|
} else { |
8137 |
|
|
$self->{parse_error}->(); |
8138 |
|
|
unshift @{$self->{char}}, (110, $self->{next_input_character}); |
8139 |
|
|
$self->{next_input_character} = 101; |
8140 |
|
|
} |
8141 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
8142 |
|
|
|
8143 |
|
|
if (@{$self->{char}}) { |
8144 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8145 |
|
|
} else { |
8146 |
|
|
$self->{set_next_input_character}->($self); |
8147 |
|
|
} |
8148 |
|
|
|
8149 |
|
|
if ($self->{next_input_character} == 115) { # s |
8150 |
|
|
|
8151 |
|
|
if (@{$self->{char}}) { |
8152 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8153 |
|
|
} else { |
8154 |
|
|
$self->{set_next_input_character}->($self); |
8155 |
|
|
} |
8156 |
|
|
|
8157 |
|
|
if ($self->{next_input_character} == 105) { # i |
8158 |
|
|
|
8159 |
|
|
if (@{$self->{char}}) { |
8160 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8161 |
|
|
} else { |
8162 |
|
|
$self->{set_next_input_character}->($self); |
8163 |
|
|
} |
8164 |
|
|
|
8165 |
|
|
if ($self->{next_input_character} == 108) { # l |
8166 |
|
|
|
8167 |
|
|
if (@{$self->{char}}) { |
8168 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8169 |
|
|
} else { |
8170 |
|
|
$self->{set_next_input_character}->($self); |
8171 |
|
|
} |
8172 |
|
|
|
8173 |
|
|
if ($self->{next_input_character} == 111) { # o |
8174 |
|
|
|
8175 |
|
|
if (@{$self->{char}}) { |
8176 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8177 |
|
|
} else { |
8178 |
|
|
$self->{set_next_input_character}->($self); |
8179 |
|
|
} |
8180 |
|
|
|
8181 |
|
|
if ($self->{next_input_character} == 110) { # n |
8182 |
|
|
|
8183 |
|
|
if (@{$self->{char}}) { |
8184 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8185 |
|
|
} else { |
8186 |
|
|
$self->{set_next_input_character}->($self); |
8187 |
|
|
} |
8188 |
|
|
|
8189 |
|
|
{ |
8190 |
|
|
$r = {type => 'character', data => qq<\x{03B5}>}; # epsilon |
8191 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8192 |
|
|
|
8193 |
|
|
if (@{$self->{char}}) { |
8194 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8195 |
|
|
} else { |
8196 |
|
|
$self->{set_next_input_character}->($self); |
8197 |
|
|
} |
8198 |
|
|
|
8199 |
|
|
} else { |
8200 |
|
|
$self->{parse_error}->(); |
8201 |
|
|
## reconsume |
8202 |
|
|
} |
8203 |
|
|
} |
8204 |
|
|
} else { |
8205 |
|
|
$self->{parse_error}->(); |
8206 |
|
|
unshift @{$self->{char}}, (112, 115, 105, 108, 111, $self->{next_input_character}); |
8207 |
|
|
$self->{next_input_character} = 101; |
8208 |
|
|
} |
8209 |
|
|
} else { |
8210 |
|
|
$self->{parse_error}->(); |
8211 |
|
|
unshift @{$self->{char}}, (112, 115, 105, 108, $self->{next_input_character}); |
8212 |
|
|
$self->{next_input_character} = 101; |
8213 |
|
|
} |
8214 |
|
|
} else { |
8215 |
|
|
$self->{parse_error}->(); |
8216 |
|
|
unshift @{$self->{char}}, (112, 115, 105, $self->{next_input_character}); |
8217 |
|
|
$self->{next_input_character} = 101; |
8218 |
|
|
} |
8219 |
|
|
} else { |
8220 |
|
|
$self->{parse_error}->(); |
8221 |
|
|
unshift @{$self->{char}}, (112, 115, $self->{next_input_character}); |
8222 |
|
|
$self->{next_input_character} = 101; |
8223 |
|
|
} |
8224 |
|
|
} else { |
8225 |
|
|
$self->{parse_error}->(); |
8226 |
|
|
unshift @{$self->{char}}, (112, $self->{next_input_character}); |
8227 |
|
|
$self->{next_input_character} = 101; |
8228 |
|
|
} |
8229 |
|
|
} elsif ($self->{next_input_character} == 113) { # q |
8230 |
|
|
|
8231 |
|
|
if (@{$self->{char}}) { |
8232 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8233 |
|
|
} else { |
8234 |
|
|
$self->{set_next_input_character}->($self); |
8235 |
|
|
} |
8236 |
|
|
|
8237 |
|
|
if ($self->{next_input_character} == 117) { # u |
8238 |
|
|
|
8239 |
|
|
if (@{$self->{char}}) { |
8240 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8241 |
|
|
} else { |
8242 |
|
|
$self->{set_next_input_character}->($self); |
8243 |
|
|
} |
8244 |
|
|
|
8245 |
|
|
if ($self->{next_input_character} == 105) { # i |
8246 |
|
|
|
8247 |
|
|
if (@{$self->{char}}) { |
8248 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8249 |
|
|
} else { |
8250 |
|
|
$self->{set_next_input_character}->($self); |
8251 |
|
|
} |
8252 |
|
|
|
8253 |
|
|
if ($self->{next_input_character} == 118) { # v |
8254 |
|
|
|
8255 |
|
|
if (@{$self->{char}}) { |
8256 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8257 |
|
|
} else { |
8258 |
|
|
$self->{set_next_input_character}->($self); |
8259 |
|
|
} |
8260 |
|
|
|
8261 |
|
|
{ |
8262 |
|
|
$r = {type => 'character', data => qq<\x{2261}>}; # equiv |
8263 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8264 |
|
|
|
8265 |
|
|
if (@{$self->{char}}) { |
8266 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8267 |
|
|
} else { |
8268 |
|
|
$self->{set_next_input_character}->($self); |
8269 |
|
|
} |
8270 |
|
|
|
8271 |
|
|
} else { |
8272 |
|
|
$self->{parse_error}->(); |
8273 |
|
|
## reconsume |
8274 |
|
|
} |
8275 |
|
|
} |
8276 |
|
|
} else { |
8277 |
|
|
$self->{parse_error}->(); |
8278 |
|
|
unshift @{$self->{char}}, (113, 117, 105, $self->{next_input_character}); |
8279 |
|
|
$self->{next_input_character} = 101; |
8280 |
|
|
} |
8281 |
|
|
} else { |
8282 |
|
|
$self->{parse_error}->(); |
8283 |
|
|
unshift @{$self->{char}}, (113, 117, $self->{next_input_character}); |
8284 |
|
|
$self->{next_input_character} = 101; |
8285 |
|
|
} |
8286 |
|
|
} else { |
8287 |
|
|
$self->{parse_error}->(); |
8288 |
|
|
unshift @{$self->{char}}, (113, $self->{next_input_character}); |
8289 |
|
|
$self->{next_input_character} = 101; |
8290 |
|
|
} |
8291 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
8292 |
|
|
|
8293 |
|
|
if (@{$self->{char}}) { |
8294 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8295 |
|
|
} else { |
8296 |
|
|
$self->{set_next_input_character}->($self); |
8297 |
|
|
} |
8298 |
|
|
|
8299 |
|
|
if ($self->{next_input_character} == 97) { # a |
8300 |
|
|
|
8301 |
|
|
if (@{$self->{char}}) { |
8302 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8303 |
|
|
} else { |
8304 |
|
|
$self->{set_next_input_character}->($self); |
8305 |
|
|
} |
8306 |
|
|
|
8307 |
|
|
{ |
8308 |
|
|
$r = {type => 'character', data => qq<\x{03B7}>}; # eta |
8309 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8310 |
|
|
|
8311 |
|
|
if (@{$self->{char}}) { |
8312 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8313 |
|
|
} else { |
8314 |
|
|
$self->{set_next_input_character}->($self); |
8315 |
|
|
} |
8316 |
|
|
|
8317 |
|
|
} else { |
8318 |
|
|
$self->{parse_error}->(); |
8319 |
|
|
## reconsume |
8320 |
|
|
} |
8321 |
|
|
} |
8322 |
|
|
} elsif ($self->{next_input_character} == 104) { # h |
8323 |
|
|
|
8324 |
|
|
if (@{$self->{char}}) { |
8325 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8326 |
|
|
} else { |
8327 |
|
|
$self->{set_next_input_character}->($self); |
8328 |
|
|
} |
8329 |
|
|
|
8330 |
|
|
{ |
8331 |
|
|
$r = {type => 'character', data => qq<\x{00F0}>}; # eth |
8332 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8333 |
|
|
|
8334 |
|
|
if (@{$self->{char}}) { |
8335 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8336 |
|
|
} else { |
8337 |
|
|
$self->{set_next_input_character}->($self); |
8338 |
|
|
} |
8339 |
|
|
|
8340 |
|
|
} else { |
8341 |
|
|
$self->{parse_error}->(); |
8342 |
|
|
## reconsume |
8343 |
|
|
} |
8344 |
|
|
} |
8345 |
|
|
} else { |
8346 |
|
|
$self->{parse_error}->(); |
8347 |
|
|
unshift @{$self->{char}}, (116, $self->{next_input_character}); |
8348 |
|
|
$self->{next_input_character} = 101; |
8349 |
|
|
} |
8350 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
8351 |
|
|
|
8352 |
|
|
if (@{$self->{char}}) { |
8353 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8354 |
|
|
} else { |
8355 |
|
|
$self->{set_next_input_character}->($self); |
8356 |
|
|
} |
8357 |
|
|
|
8358 |
|
|
if ($self->{next_input_character} == 109) { # m |
8359 |
|
|
|
8360 |
|
|
if (@{$self->{char}}) { |
8361 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8362 |
|
|
} else { |
8363 |
|
|
$self->{set_next_input_character}->($self); |
8364 |
|
|
} |
8365 |
|
|
|
8366 |
|
|
if ($self->{next_input_character} == 108) { # l |
8367 |
|
|
|
8368 |
|
|
if (@{$self->{char}}) { |
8369 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8370 |
|
|
} else { |
8371 |
|
|
$self->{set_next_input_character}->($self); |
8372 |
|
|
} |
8373 |
|
|
|
8374 |
|
|
{ |
8375 |
|
|
$r = {type => 'character', data => qq<\x{00EB}>}; # euml |
8376 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8377 |
|
|
|
8378 |
|
|
if (@{$self->{char}}) { |
8379 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8380 |
|
|
} else { |
8381 |
|
|
$self->{set_next_input_character}->($self); |
8382 |
|
|
} |
8383 |
|
|
|
8384 |
|
|
} else { |
8385 |
|
|
$self->{parse_error}->(); |
8386 |
|
|
## reconsume |
8387 |
|
|
} |
8388 |
|
|
} |
8389 |
|
|
} else { |
8390 |
|
|
$self->{parse_error}->(); |
8391 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
8392 |
|
|
$self->{next_input_character} = 101; |
8393 |
|
|
} |
8394 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
8395 |
|
|
|
8396 |
|
|
if (@{$self->{char}}) { |
8397 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8398 |
|
|
} else { |
8399 |
|
|
$self->{set_next_input_character}->($self); |
8400 |
|
|
} |
8401 |
|
|
|
8402 |
|
|
if ($self->{next_input_character} == 111) { # o |
8403 |
|
|
|
8404 |
|
|
if (@{$self->{char}}) { |
8405 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8406 |
|
|
} else { |
8407 |
|
|
$self->{set_next_input_character}->($self); |
8408 |
|
|
} |
8409 |
|
|
|
8410 |
|
|
{ |
8411 |
|
|
$r = {type => 'character', data => qq<\x{20AC}>}; # euro |
8412 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8413 |
|
|
|
8414 |
|
|
if (@{$self->{char}}) { |
8415 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8416 |
|
|
} else { |
8417 |
|
|
$self->{set_next_input_character}->($self); |
8418 |
|
|
} |
8419 |
|
|
|
8420 |
|
|
} else { |
8421 |
|
|
$self->{parse_error}->(); |
8422 |
|
|
## reconsume |
8423 |
|
|
} |
8424 |
|
|
} |
8425 |
|
|
} else { |
8426 |
|
|
$self->{parse_error}->(); |
8427 |
|
|
unshift @{$self->{char}}, (117, 114, $self->{next_input_character}); |
8428 |
|
|
$self->{next_input_character} = 101; |
8429 |
|
|
} |
8430 |
|
|
} else { |
8431 |
|
|
$self->{parse_error}->(); |
8432 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
8433 |
|
|
$self->{next_input_character} = 101; |
8434 |
|
|
} |
8435 |
|
|
} elsif ($self->{next_input_character} == 120) { # x |
8436 |
|
|
|
8437 |
|
|
if (@{$self->{char}}) { |
8438 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8439 |
|
|
} else { |
8440 |
|
|
$self->{set_next_input_character}->($self); |
8441 |
|
|
} |
8442 |
|
|
|
8443 |
|
|
if ($self->{next_input_character} == 105) { # i |
8444 |
|
|
|
8445 |
|
|
if (@{$self->{char}}) { |
8446 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8447 |
|
|
} else { |
8448 |
|
|
$self->{set_next_input_character}->($self); |
8449 |
|
|
} |
8450 |
|
|
|
8451 |
|
|
if ($self->{next_input_character} == 115) { # s |
8452 |
|
|
|
8453 |
|
|
if (@{$self->{char}}) { |
8454 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8455 |
|
|
} else { |
8456 |
|
|
$self->{set_next_input_character}->($self); |
8457 |
|
|
} |
8458 |
|
|
|
8459 |
|
|
if ($self->{next_input_character} == 116) { # t |
8460 |
|
|
|
8461 |
|
|
if (@{$self->{char}}) { |
8462 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8463 |
|
|
} else { |
8464 |
|
|
$self->{set_next_input_character}->($self); |
8465 |
|
|
} |
8466 |
|
|
|
8467 |
|
|
{ |
8468 |
|
|
$r = {type => 'character', data => qq<\x{2203}>}; # exist |
8469 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8470 |
|
|
|
8471 |
|
|
if (@{$self->{char}}) { |
8472 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8473 |
|
|
} else { |
8474 |
|
|
$self->{set_next_input_character}->($self); |
8475 |
|
|
} |
8476 |
|
|
|
8477 |
|
|
} else { |
8478 |
|
|
$self->{parse_error}->(); |
8479 |
|
|
## reconsume |
8480 |
|
|
} |
8481 |
|
|
} |
8482 |
|
|
} else { |
8483 |
|
|
$self->{parse_error}->(); |
8484 |
|
|
unshift @{$self->{char}}, (120, 105, 115, $self->{next_input_character}); |
8485 |
|
|
$self->{next_input_character} = 101; |
8486 |
|
|
} |
8487 |
|
|
} else { |
8488 |
|
|
$self->{parse_error}->(); |
8489 |
|
|
unshift @{$self->{char}}, (120, 105, $self->{next_input_character}); |
8490 |
|
|
$self->{next_input_character} = 101; |
8491 |
|
|
} |
8492 |
|
|
} else { |
8493 |
|
|
$self->{parse_error}->(); |
8494 |
|
|
unshift @{$self->{char}}, (120, $self->{next_input_character}); |
8495 |
|
|
$self->{next_input_character} = 101; |
8496 |
|
|
} |
8497 |
|
|
} else { |
8498 |
|
|
$self->{parse_error}->(); |
8499 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
8500 |
|
|
$self->{next_input_character} = 101; |
8501 |
|
|
} |
8502 |
|
|
} elsif ($self->{next_input_character} == 102) { # f |
8503 |
|
|
|
8504 |
|
|
if (@{$self->{char}}) { |
8505 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8506 |
|
|
} else { |
8507 |
|
|
$self->{set_next_input_character}->($self); |
8508 |
|
|
} |
8509 |
|
|
|
8510 |
|
|
if ($self->{next_input_character} == 110) { # n |
8511 |
|
|
|
8512 |
|
|
if (@{$self->{char}}) { |
8513 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8514 |
|
|
} else { |
8515 |
|
|
$self->{set_next_input_character}->($self); |
8516 |
|
|
} |
8517 |
|
|
|
8518 |
|
|
if ($self->{next_input_character} == 111) { # o |
8519 |
|
|
|
8520 |
|
|
if (@{$self->{char}}) { |
8521 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8522 |
|
|
} else { |
8523 |
|
|
$self->{set_next_input_character}->($self); |
8524 |
|
|
} |
8525 |
|
|
|
8526 |
|
|
if ($self->{next_input_character} == 102) { # f |
8527 |
|
|
|
8528 |
|
|
if (@{$self->{char}}) { |
8529 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8530 |
|
|
} else { |
8531 |
|
|
$self->{set_next_input_character}->($self); |
8532 |
|
|
} |
8533 |
|
|
|
8534 |
|
|
{ |
8535 |
|
|
$r = {type => 'character', data => qq<\x{0192}>}; # fnof |
8536 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8537 |
|
|
|
8538 |
|
|
if (@{$self->{char}}) { |
8539 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8540 |
|
|
} else { |
8541 |
|
|
$self->{set_next_input_character}->($self); |
8542 |
|
|
} |
8543 |
|
|
|
8544 |
|
|
} else { |
8545 |
|
|
$self->{parse_error}->(); |
8546 |
|
|
## reconsume |
8547 |
|
|
} |
8548 |
|
|
} |
8549 |
|
|
} else { |
8550 |
|
|
$self->{parse_error}->(); |
8551 |
|
|
unshift @{$self->{char}}, (110, 111, $self->{next_input_character}); |
8552 |
|
|
$self->{next_input_character} = 102; |
8553 |
|
|
} |
8554 |
|
|
} else { |
8555 |
|
|
$self->{parse_error}->(); |
8556 |
|
|
unshift @{$self->{char}}, (110, $self->{next_input_character}); |
8557 |
|
|
$self->{next_input_character} = 102; |
8558 |
|
|
} |
8559 |
|
|
} elsif ($self->{next_input_character} == 111) { # o |
8560 |
|
|
|
8561 |
|
|
if (@{$self->{char}}) { |
8562 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8563 |
|
|
} else { |
8564 |
|
|
$self->{set_next_input_character}->($self); |
8565 |
|
|
} |
8566 |
|
|
|
8567 |
|
|
if ($self->{next_input_character} == 114) { # r |
8568 |
|
|
|
8569 |
|
|
if (@{$self->{char}}) { |
8570 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8571 |
|
|
} else { |
8572 |
|
|
$self->{set_next_input_character}->($self); |
8573 |
|
|
} |
8574 |
|
|
|
8575 |
|
|
if ($self->{next_input_character} == 97) { # a |
8576 |
|
|
|
8577 |
|
|
if (@{$self->{char}}) { |
8578 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8579 |
|
|
} else { |
8580 |
|
|
$self->{set_next_input_character}->($self); |
8581 |
|
|
} |
8582 |
|
|
|
8583 |
|
|
if ($self->{next_input_character} == 108) { # l |
8584 |
|
|
|
8585 |
|
|
if (@{$self->{char}}) { |
8586 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8587 |
|
|
} else { |
8588 |
|
|
$self->{set_next_input_character}->($self); |
8589 |
|
|
} |
8590 |
|
|
|
8591 |
|
|
if ($self->{next_input_character} == 108) { # l |
8592 |
|
|
|
8593 |
|
|
if (@{$self->{char}}) { |
8594 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8595 |
|
|
} else { |
8596 |
|
|
$self->{set_next_input_character}->($self); |
8597 |
|
|
} |
8598 |
|
|
|
8599 |
|
|
{ |
8600 |
|
|
$r = {type => 'character', data => qq<\x{2200}>}; # forall |
8601 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8602 |
|
|
|
8603 |
|
|
if (@{$self->{char}}) { |
8604 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8605 |
|
|
} else { |
8606 |
|
|
$self->{set_next_input_character}->($self); |
8607 |
|
|
} |
8608 |
|
|
|
8609 |
|
|
} else { |
8610 |
|
|
$self->{parse_error}->(); |
8611 |
|
|
## reconsume |
8612 |
|
|
} |
8613 |
|
|
} |
8614 |
|
|
} else { |
8615 |
|
|
$self->{parse_error}->(); |
8616 |
|
|
unshift @{$self->{char}}, (111, 114, 97, 108, $self->{next_input_character}); |
8617 |
|
|
$self->{next_input_character} = 102; |
8618 |
|
|
} |
8619 |
|
|
} else { |
8620 |
|
|
$self->{parse_error}->(); |
8621 |
|
|
unshift @{$self->{char}}, (111, 114, 97, $self->{next_input_character}); |
8622 |
|
|
$self->{next_input_character} = 102; |
8623 |
|
|
} |
8624 |
|
|
} else { |
8625 |
|
|
$self->{parse_error}->(); |
8626 |
|
|
unshift @{$self->{char}}, (111, 114, $self->{next_input_character}); |
8627 |
|
|
$self->{next_input_character} = 102; |
8628 |
|
|
} |
8629 |
|
|
} else { |
8630 |
|
|
$self->{parse_error}->(); |
8631 |
|
|
unshift @{$self->{char}}, (111, $self->{next_input_character}); |
8632 |
|
|
$self->{next_input_character} = 102; |
8633 |
|
|
} |
8634 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
8635 |
|
|
|
8636 |
|
|
if (@{$self->{char}}) { |
8637 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8638 |
|
|
} else { |
8639 |
|
|
$self->{set_next_input_character}->($self); |
8640 |
|
|
} |
8641 |
|
|
|
8642 |
|
|
if ($self->{next_input_character} == 97) { # a |
8643 |
|
|
|
8644 |
|
|
if (@{$self->{char}}) { |
8645 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8646 |
|
|
} else { |
8647 |
|
|
$self->{set_next_input_character}->($self); |
8648 |
|
|
} |
8649 |
|
|
|
8650 |
|
|
if ($self->{next_input_character} == 99) { # c |
8651 |
|
|
|
8652 |
|
|
if (@{$self->{char}}) { |
8653 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8654 |
|
|
} else { |
8655 |
|
|
$self->{set_next_input_character}->($self); |
8656 |
|
|
} |
8657 |
|
|
|
8658 |
|
|
if ($self->{next_input_character} == 49) { # 1 |
8659 |
|
|
|
8660 |
|
|
if (@{$self->{char}}) { |
8661 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8662 |
|
|
} else { |
8663 |
|
|
$self->{set_next_input_character}->($self); |
8664 |
|
|
} |
8665 |
|
|
|
8666 |
|
|
if ($self->{next_input_character} == 50) { # 2 |
8667 |
|
|
|
8668 |
|
|
if (@{$self->{char}}) { |
8669 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8670 |
|
|
} else { |
8671 |
|
|
$self->{set_next_input_character}->($self); |
8672 |
|
|
} |
8673 |
|
|
|
8674 |
|
|
{ |
8675 |
|
|
$r = {type => 'character', data => qq<\x{00BD}>}; # frac12 |
8676 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8677 |
|
|
|
8678 |
|
|
if (@{$self->{char}}) { |
8679 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8680 |
|
|
} else { |
8681 |
|
|
$self->{set_next_input_character}->($self); |
8682 |
|
|
} |
8683 |
|
|
|
8684 |
|
|
} else { |
8685 |
|
|
$self->{parse_error}->(); |
8686 |
|
|
## reconsume |
8687 |
|
|
} |
8688 |
|
|
} |
8689 |
|
|
} elsif ($self->{next_input_character} == 52) { # 4 |
8690 |
|
|
|
8691 |
|
|
if (@{$self->{char}}) { |
8692 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8693 |
|
|
} else { |
8694 |
|
|
$self->{set_next_input_character}->($self); |
8695 |
|
|
} |
8696 |
|
|
|
8697 |
|
|
{ |
8698 |
|
|
$r = {type => 'character', data => qq<\x{00BC}>}; # frac14 |
8699 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8700 |
|
|
|
8701 |
|
|
if (@{$self->{char}}) { |
8702 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8703 |
|
|
} else { |
8704 |
|
|
$self->{set_next_input_character}->($self); |
8705 |
|
|
} |
8706 |
|
|
|
8707 |
|
|
} else { |
8708 |
|
|
$self->{parse_error}->(); |
8709 |
|
|
## reconsume |
8710 |
|
|
} |
8711 |
|
|
} |
8712 |
|
|
} else { |
8713 |
|
|
$self->{parse_error}->(); |
8714 |
|
|
unshift @{$self->{char}}, (114, 97, 99, 49, $self->{next_input_character}); |
8715 |
|
|
$self->{next_input_character} = 102; |
8716 |
|
|
} |
8717 |
|
|
} elsif ($self->{next_input_character} == 51) { # 3 |
8718 |
|
|
|
8719 |
|
|
if (@{$self->{char}}) { |
8720 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8721 |
|
|
} else { |
8722 |
|
|
$self->{set_next_input_character}->($self); |
8723 |
|
|
} |
8724 |
|
|
|
8725 |
|
|
if ($self->{next_input_character} == 52) { # 4 |
8726 |
|
|
|
8727 |
|
|
if (@{$self->{char}}) { |
8728 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8729 |
|
|
} else { |
8730 |
|
|
$self->{set_next_input_character}->($self); |
8731 |
|
|
} |
8732 |
|
|
|
8733 |
|
|
{ |
8734 |
|
|
$r = {type => 'character', data => qq<\x{00BE}>}; # frac34 |
8735 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8736 |
|
|
|
8737 |
|
|
if (@{$self->{char}}) { |
8738 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8739 |
|
|
} else { |
8740 |
|
|
$self->{set_next_input_character}->($self); |
8741 |
|
|
} |
8742 |
|
|
|
8743 |
|
|
} else { |
8744 |
|
|
$self->{parse_error}->(); |
8745 |
|
|
## reconsume |
8746 |
|
|
} |
8747 |
|
|
} |
8748 |
|
|
} else { |
8749 |
|
|
$self->{parse_error}->(); |
8750 |
|
|
unshift @{$self->{char}}, (114, 97, 99, 51, $self->{next_input_character}); |
8751 |
|
|
$self->{next_input_character} = 102; |
8752 |
|
|
} |
8753 |
|
|
} else { |
8754 |
|
|
$self->{parse_error}->(); |
8755 |
|
|
unshift @{$self->{char}}, (114, 97, 99, $self->{next_input_character}); |
8756 |
|
|
$self->{next_input_character} = 102; |
8757 |
|
|
} |
8758 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
8759 |
|
|
|
8760 |
|
|
if (@{$self->{char}}) { |
8761 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8762 |
|
|
} else { |
8763 |
|
|
$self->{set_next_input_character}->($self); |
8764 |
|
|
} |
8765 |
|
|
|
8766 |
|
|
if ($self->{next_input_character} == 108) { # l |
8767 |
|
|
|
8768 |
|
|
if (@{$self->{char}}) { |
8769 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8770 |
|
|
} else { |
8771 |
|
|
$self->{set_next_input_character}->($self); |
8772 |
|
|
} |
8773 |
|
|
|
8774 |
|
|
{ |
8775 |
|
|
$r = {type => 'character', data => qq<\x{2044}>}; # frasl |
8776 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8777 |
|
|
|
8778 |
|
|
if (@{$self->{char}}) { |
8779 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8780 |
|
|
} else { |
8781 |
|
|
$self->{set_next_input_character}->($self); |
8782 |
|
|
} |
8783 |
|
|
|
8784 |
|
|
} else { |
8785 |
|
|
$self->{parse_error}->(); |
8786 |
|
|
## reconsume |
8787 |
|
|
} |
8788 |
|
|
} |
8789 |
|
|
} else { |
8790 |
|
|
$self->{parse_error}->(); |
8791 |
|
|
unshift @{$self->{char}}, (114, 97, 115, $self->{next_input_character}); |
8792 |
|
|
$self->{next_input_character} = 102; |
8793 |
|
|
} |
8794 |
|
|
} else { |
8795 |
|
|
$self->{parse_error}->(); |
8796 |
|
|
unshift @{$self->{char}}, (114, 97, $self->{next_input_character}); |
8797 |
|
|
$self->{next_input_character} = 102; |
8798 |
|
|
} |
8799 |
|
|
} else { |
8800 |
|
|
$self->{parse_error}->(); |
8801 |
|
|
unshift @{$self->{char}}, (114, $self->{next_input_character}); |
8802 |
|
|
$self->{next_input_character} = 102; |
8803 |
|
|
} |
8804 |
|
|
} else { |
8805 |
|
|
$self->{parse_error}->(); |
8806 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
8807 |
|
|
$self->{next_input_character} = 102; |
8808 |
|
|
} |
8809 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
8810 |
|
|
|
8811 |
|
|
if (@{$self->{char}}) { |
8812 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8813 |
|
|
} else { |
8814 |
|
|
$self->{set_next_input_character}->($self); |
8815 |
|
|
} |
8816 |
|
|
|
8817 |
|
|
if ($self->{next_input_character} == 97) { # a |
8818 |
|
|
|
8819 |
|
|
if (@{$self->{char}}) { |
8820 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8821 |
|
|
} else { |
8822 |
|
|
$self->{set_next_input_character}->($self); |
8823 |
|
|
} |
8824 |
|
|
|
8825 |
|
|
if ($self->{next_input_character} == 109) { # m |
8826 |
|
|
|
8827 |
|
|
if (@{$self->{char}}) { |
8828 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8829 |
|
|
} else { |
8830 |
|
|
$self->{set_next_input_character}->($self); |
8831 |
|
|
} |
8832 |
|
|
|
8833 |
|
|
if ($self->{next_input_character} == 109) { # m |
8834 |
|
|
|
8835 |
|
|
if (@{$self->{char}}) { |
8836 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8837 |
|
|
} else { |
8838 |
|
|
$self->{set_next_input_character}->($self); |
8839 |
|
|
} |
8840 |
|
|
|
8841 |
|
|
if ($self->{next_input_character} == 97) { # a |
8842 |
|
|
|
8843 |
|
|
if (@{$self->{char}}) { |
8844 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8845 |
|
|
} else { |
8846 |
|
|
$self->{set_next_input_character}->($self); |
8847 |
|
|
} |
8848 |
|
|
|
8849 |
|
|
{ |
8850 |
|
|
$r = {type => 'character', data => qq<\x{03B3}>}; # gamma |
8851 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8852 |
|
|
|
8853 |
|
|
if (@{$self->{char}}) { |
8854 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8855 |
|
|
} else { |
8856 |
|
|
$self->{set_next_input_character}->($self); |
8857 |
|
|
} |
8858 |
|
|
|
8859 |
|
|
} else { |
8860 |
|
|
$self->{parse_error}->(); |
8861 |
|
|
## reconsume |
8862 |
|
|
} |
8863 |
|
|
} |
8864 |
|
|
} else { |
8865 |
|
|
$self->{parse_error}->(); |
8866 |
|
|
unshift @{$self->{char}}, (97, 109, 109, $self->{next_input_character}); |
8867 |
|
|
$self->{next_input_character} = 103; |
8868 |
|
|
} |
8869 |
|
|
} else { |
8870 |
|
|
$self->{parse_error}->(); |
8871 |
|
|
unshift @{$self->{char}}, (97, 109, $self->{next_input_character}); |
8872 |
|
|
$self->{next_input_character} = 103; |
8873 |
|
|
} |
8874 |
|
|
} else { |
8875 |
|
|
$self->{parse_error}->(); |
8876 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
8877 |
|
|
$self->{next_input_character} = 103; |
8878 |
|
|
} |
8879 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
8880 |
|
|
|
8881 |
|
|
if (@{$self->{char}}) { |
8882 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8883 |
|
|
} else { |
8884 |
|
|
$self->{set_next_input_character}->($self); |
8885 |
|
|
} |
8886 |
|
|
|
8887 |
|
|
{ |
8888 |
|
|
$r = {type => 'character', data => qq<\x{2265}>}; # ge |
8889 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8890 |
|
|
|
8891 |
|
|
if (@{$self->{char}}) { |
8892 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8893 |
|
|
} else { |
8894 |
|
|
$self->{set_next_input_character}->($self); |
8895 |
|
|
} |
8896 |
|
|
|
8897 |
|
|
} else { |
8898 |
|
|
$self->{parse_error}->(); |
8899 |
|
|
## reconsume |
8900 |
|
|
} |
8901 |
|
|
} |
8902 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
8903 |
|
|
|
8904 |
|
|
if (@{$self->{char}}) { |
8905 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8906 |
|
|
} else { |
8907 |
|
|
$self->{set_next_input_character}->($self); |
8908 |
|
|
} |
8909 |
|
|
|
8910 |
|
|
{ |
8911 |
|
|
$r = {type => 'character', data => qq<\x{003E}>}; # gt |
8912 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8913 |
|
|
|
8914 |
|
|
if (@{$self->{char}}) { |
8915 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8916 |
|
|
} else { |
8917 |
|
|
$self->{set_next_input_character}->($self); |
8918 |
|
|
} |
8919 |
|
|
|
8920 |
|
|
} else { |
8921 |
|
|
$self->{parse_error}->(); |
8922 |
|
|
## reconsume |
8923 |
|
|
} |
8924 |
|
|
} |
8925 |
|
|
} else { |
8926 |
|
|
$self->{parse_error}->(); |
8927 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
8928 |
|
|
$self->{next_input_character} = 103; |
8929 |
|
|
} |
8930 |
|
|
} elsif ($self->{next_input_character} == 104) { # h |
8931 |
|
|
|
8932 |
|
|
if (@{$self->{char}}) { |
8933 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8934 |
|
|
} else { |
8935 |
|
|
$self->{set_next_input_character}->($self); |
8936 |
|
|
} |
8937 |
|
|
|
8938 |
|
|
if ($self->{next_input_character} == 65) { # A |
8939 |
|
|
|
8940 |
|
|
if (@{$self->{char}}) { |
8941 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8942 |
|
|
} else { |
8943 |
|
|
$self->{set_next_input_character}->($self); |
8944 |
|
|
} |
8945 |
|
|
|
8946 |
|
|
if ($self->{next_input_character} == 114) { # r |
8947 |
|
|
|
8948 |
|
|
if (@{$self->{char}}) { |
8949 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8950 |
|
|
} else { |
8951 |
|
|
$self->{set_next_input_character}->($self); |
8952 |
|
|
} |
8953 |
|
|
|
8954 |
|
|
if ($self->{next_input_character} == 114) { # r |
8955 |
|
|
|
8956 |
|
|
if (@{$self->{char}}) { |
8957 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8958 |
|
|
} else { |
8959 |
|
|
$self->{set_next_input_character}->($self); |
8960 |
|
|
} |
8961 |
|
|
|
8962 |
|
|
{ |
8963 |
|
|
$r = {type => 'character', data => qq<\x{21D4}>}; # hArr |
8964 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
8965 |
|
|
|
8966 |
|
|
if (@{$self->{char}}) { |
8967 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8968 |
|
|
} else { |
8969 |
|
|
$self->{set_next_input_character}->($self); |
8970 |
|
|
} |
8971 |
|
|
|
8972 |
|
|
} else { |
8973 |
|
|
$self->{parse_error}->(); |
8974 |
|
|
## reconsume |
8975 |
|
|
} |
8976 |
|
|
} |
8977 |
|
|
} else { |
8978 |
|
|
$self->{parse_error}->(); |
8979 |
|
|
unshift @{$self->{char}}, (65, 114, $self->{next_input_character}); |
8980 |
|
|
$self->{next_input_character} = 104; |
8981 |
|
|
} |
8982 |
|
|
} else { |
8983 |
|
|
$self->{parse_error}->(); |
8984 |
|
|
unshift @{$self->{char}}, (65, $self->{next_input_character}); |
8985 |
|
|
$self->{next_input_character} = 104; |
8986 |
|
|
} |
8987 |
|
|
} elsif ($self->{next_input_character} == 97) { # a |
8988 |
|
|
|
8989 |
|
|
if (@{$self->{char}}) { |
8990 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8991 |
|
|
} else { |
8992 |
|
|
$self->{set_next_input_character}->($self); |
8993 |
|
|
} |
8994 |
|
|
|
8995 |
|
|
if ($self->{next_input_character} == 114) { # r |
8996 |
|
|
|
8997 |
|
|
if (@{$self->{char}}) { |
8998 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
8999 |
|
|
} else { |
9000 |
|
|
$self->{set_next_input_character}->($self); |
9001 |
|
|
} |
9002 |
|
|
|
9003 |
|
|
if ($self->{next_input_character} == 114) { # r |
9004 |
|
|
|
9005 |
|
|
if (@{$self->{char}}) { |
9006 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9007 |
|
|
} else { |
9008 |
|
|
$self->{set_next_input_character}->($self); |
9009 |
|
|
} |
9010 |
|
|
|
9011 |
|
|
{ |
9012 |
|
|
$r = {type => 'character', data => qq<\x{2194}>}; # harr |
9013 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9014 |
|
|
|
9015 |
|
|
if (@{$self->{char}}) { |
9016 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9017 |
|
|
} else { |
9018 |
|
|
$self->{set_next_input_character}->($self); |
9019 |
|
|
} |
9020 |
|
|
|
9021 |
|
|
} else { |
9022 |
|
|
$self->{parse_error}->(); |
9023 |
|
|
## reconsume |
9024 |
|
|
} |
9025 |
|
|
} |
9026 |
|
|
} else { |
9027 |
|
|
$self->{parse_error}->(); |
9028 |
|
|
unshift @{$self->{char}}, (97, 114, $self->{next_input_character}); |
9029 |
|
|
$self->{next_input_character} = 104; |
9030 |
|
|
} |
9031 |
|
|
} else { |
9032 |
|
|
$self->{parse_error}->(); |
9033 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
9034 |
|
|
$self->{next_input_character} = 104; |
9035 |
|
|
} |
9036 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
9037 |
|
|
|
9038 |
|
|
if (@{$self->{char}}) { |
9039 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9040 |
|
|
} else { |
9041 |
|
|
$self->{set_next_input_character}->($self); |
9042 |
|
|
} |
9043 |
|
|
|
9044 |
|
|
if ($self->{next_input_character} == 97) { # a |
9045 |
|
|
|
9046 |
|
|
if (@{$self->{char}}) { |
9047 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9048 |
|
|
} else { |
9049 |
|
|
$self->{set_next_input_character}->($self); |
9050 |
|
|
} |
9051 |
|
|
|
9052 |
|
|
if ($self->{next_input_character} == 114) { # r |
9053 |
|
|
|
9054 |
|
|
if (@{$self->{char}}) { |
9055 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9056 |
|
|
} else { |
9057 |
|
|
$self->{set_next_input_character}->($self); |
9058 |
|
|
} |
9059 |
|
|
|
9060 |
|
|
if ($self->{next_input_character} == 116) { # t |
9061 |
|
|
|
9062 |
|
|
if (@{$self->{char}}) { |
9063 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9064 |
|
|
} else { |
9065 |
|
|
$self->{set_next_input_character}->($self); |
9066 |
|
|
} |
9067 |
|
|
|
9068 |
|
|
if ($self->{next_input_character} == 115) { # s |
9069 |
|
|
|
9070 |
|
|
if (@{$self->{char}}) { |
9071 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9072 |
|
|
} else { |
9073 |
|
|
$self->{set_next_input_character}->($self); |
9074 |
|
|
} |
9075 |
|
|
|
9076 |
|
|
{ |
9077 |
|
|
$r = {type => 'character', data => qq<\x{2665}>}; # hearts |
9078 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9079 |
|
|
|
9080 |
|
|
if (@{$self->{char}}) { |
9081 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9082 |
|
|
} else { |
9083 |
|
|
$self->{set_next_input_character}->($self); |
9084 |
|
|
} |
9085 |
|
|
|
9086 |
|
|
} else { |
9087 |
|
|
$self->{parse_error}->(); |
9088 |
|
|
## reconsume |
9089 |
|
|
} |
9090 |
|
|
} |
9091 |
|
|
} else { |
9092 |
|
|
$self->{parse_error}->(); |
9093 |
|
|
unshift @{$self->{char}}, (101, 97, 114, 116, $self->{next_input_character}); |
9094 |
|
|
$self->{next_input_character} = 104; |
9095 |
|
|
} |
9096 |
|
|
} else { |
9097 |
|
|
$self->{parse_error}->(); |
9098 |
|
|
unshift @{$self->{char}}, (101, 97, 114, $self->{next_input_character}); |
9099 |
|
|
$self->{next_input_character} = 104; |
9100 |
|
|
} |
9101 |
|
|
} else { |
9102 |
|
|
$self->{parse_error}->(); |
9103 |
|
|
unshift @{$self->{char}}, (101, 97, $self->{next_input_character}); |
9104 |
|
|
$self->{next_input_character} = 104; |
9105 |
|
|
} |
9106 |
|
|
} elsif ($self->{next_input_character} == 108) { # l |
9107 |
|
|
|
9108 |
|
|
if (@{$self->{char}}) { |
9109 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9110 |
|
|
} else { |
9111 |
|
|
$self->{set_next_input_character}->($self); |
9112 |
|
|
} |
9113 |
|
|
|
9114 |
|
|
if ($self->{next_input_character} == 108) { # l |
9115 |
|
|
|
9116 |
|
|
if (@{$self->{char}}) { |
9117 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9118 |
|
|
} else { |
9119 |
|
|
$self->{set_next_input_character}->($self); |
9120 |
|
|
} |
9121 |
|
|
|
9122 |
|
|
if ($self->{next_input_character} == 105) { # i |
9123 |
|
|
|
9124 |
|
|
if (@{$self->{char}}) { |
9125 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9126 |
|
|
} else { |
9127 |
|
|
$self->{set_next_input_character}->($self); |
9128 |
|
|
} |
9129 |
|
|
|
9130 |
|
|
if ($self->{next_input_character} == 112) { # p |
9131 |
|
|
|
9132 |
|
|
if (@{$self->{char}}) { |
9133 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9134 |
|
|
} else { |
9135 |
|
|
$self->{set_next_input_character}->($self); |
9136 |
|
|
} |
9137 |
|
|
|
9138 |
|
|
{ |
9139 |
|
|
$r = {type => 'character', data => qq<\x{2026}>}; # hellip |
9140 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9141 |
|
|
|
9142 |
|
|
if (@{$self->{char}}) { |
9143 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9144 |
|
|
} else { |
9145 |
|
|
$self->{set_next_input_character}->($self); |
9146 |
|
|
} |
9147 |
|
|
|
9148 |
|
|
} else { |
9149 |
|
|
$self->{parse_error}->(); |
9150 |
|
|
## reconsume |
9151 |
|
|
} |
9152 |
|
|
} |
9153 |
|
|
} else { |
9154 |
|
|
$self->{parse_error}->(); |
9155 |
|
|
unshift @{$self->{char}}, (101, 108, 108, 105, $self->{next_input_character}); |
9156 |
|
|
$self->{next_input_character} = 104; |
9157 |
|
|
} |
9158 |
|
|
} else { |
9159 |
|
|
$self->{parse_error}->(); |
9160 |
|
|
unshift @{$self->{char}}, (101, 108, 108, $self->{next_input_character}); |
9161 |
|
|
$self->{next_input_character} = 104; |
9162 |
|
|
} |
9163 |
|
|
} else { |
9164 |
|
|
$self->{parse_error}->(); |
9165 |
|
|
unshift @{$self->{char}}, (101, 108, $self->{next_input_character}); |
9166 |
|
|
$self->{next_input_character} = 104; |
9167 |
|
|
} |
9168 |
|
|
} else { |
9169 |
|
|
$self->{parse_error}->(); |
9170 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
9171 |
|
|
$self->{next_input_character} = 104; |
9172 |
|
|
} |
9173 |
|
|
} else { |
9174 |
|
|
$self->{parse_error}->(); |
9175 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
9176 |
|
|
$self->{next_input_character} = 104; |
9177 |
|
|
} |
9178 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
9179 |
|
|
|
9180 |
|
|
if (@{$self->{char}}) { |
9181 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9182 |
|
|
} else { |
9183 |
|
|
$self->{set_next_input_character}->($self); |
9184 |
|
|
} |
9185 |
|
|
|
9186 |
|
|
if ($self->{next_input_character} == 97) { # a |
9187 |
|
|
|
9188 |
|
|
if (@{$self->{char}}) { |
9189 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9190 |
|
|
} else { |
9191 |
|
|
$self->{set_next_input_character}->($self); |
9192 |
|
|
} |
9193 |
|
|
|
9194 |
|
|
if ($self->{next_input_character} == 99) { # c |
9195 |
|
|
|
9196 |
|
|
if (@{$self->{char}}) { |
9197 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9198 |
|
|
} else { |
9199 |
|
|
$self->{set_next_input_character}->($self); |
9200 |
|
|
} |
9201 |
|
|
|
9202 |
|
|
if ($self->{next_input_character} == 117) { # u |
9203 |
|
|
|
9204 |
|
|
if (@{$self->{char}}) { |
9205 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9206 |
|
|
} else { |
9207 |
|
|
$self->{set_next_input_character}->($self); |
9208 |
|
|
} |
9209 |
|
|
|
9210 |
|
|
if ($self->{next_input_character} == 116) { # t |
9211 |
|
|
|
9212 |
|
|
if (@{$self->{char}}) { |
9213 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9214 |
|
|
} else { |
9215 |
|
|
$self->{set_next_input_character}->($self); |
9216 |
|
|
} |
9217 |
|
|
|
9218 |
|
|
if ($self->{next_input_character} == 101) { # e |
9219 |
|
|
|
9220 |
|
|
if (@{$self->{char}}) { |
9221 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9222 |
|
|
} else { |
9223 |
|
|
$self->{set_next_input_character}->($self); |
9224 |
|
|
} |
9225 |
|
|
|
9226 |
|
|
{ |
9227 |
|
|
$r = {type => 'character', data => qq<\x{00ED}>}; # iacute |
9228 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9229 |
|
|
|
9230 |
|
|
if (@{$self->{char}}) { |
9231 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9232 |
|
|
} else { |
9233 |
|
|
$self->{set_next_input_character}->($self); |
9234 |
|
|
} |
9235 |
|
|
|
9236 |
|
|
} else { |
9237 |
|
|
$self->{parse_error}->(); |
9238 |
|
|
## reconsume |
9239 |
|
|
} |
9240 |
|
|
} |
9241 |
|
|
} else { |
9242 |
|
|
$self->{parse_error}->(); |
9243 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
9244 |
|
|
$self->{next_input_character} = 105; |
9245 |
|
|
} |
9246 |
|
|
} else { |
9247 |
|
|
$self->{parse_error}->(); |
9248 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
9249 |
|
|
$self->{next_input_character} = 105; |
9250 |
|
|
} |
9251 |
|
|
} else { |
9252 |
|
|
$self->{parse_error}->(); |
9253 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
9254 |
|
|
$self->{next_input_character} = 105; |
9255 |
|
|
} |
9256 |
|
|
} else { |
9257 |
|
|
$self->{parse_error}->(); |
9258 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
9259 |
|
|
$self->{next_input_character} = 105; |
9260 |
|
|
} |
9261 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
9262 |
|
|
|
9263 |
|
|
if (@{$self->{char}}) { |
9264 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9265 |
|
|
} else { |
9266 |
|
|
$self->{set_next_input_character}->($self); |
9267 |
|
|
} |
9268 |
|
|
|
9269 |
|
|
if ($self->{next_input_character} == 105) { # i |
9270 |
|
|
|
9271 |
|
|
if (@{$self->{char}}) { |
9272 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9273 |
|
|
} else { |
9274 |
|
|
$self->{set_next_input_character}->($self); |
9275 |
|
|
} |
9276 |
|
|
|
9277 |
|
|
if ($self->{next_input_character} == 114) { # r |
9278 |
|
|
|
9279 |
|
|
if (@{$self->{char}}) { |
9280 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9281 |
|
|
} else { |
9282 |
|
|
$self->{set_next_input_character}->($self); |
9283 |
|
|
} |
9284 |
|
|
|
9285 |
|
|
if ($self->{next_input_character} == 99) { # c |
9286 |
|
|
|
9287 |
|
|
if (@{$self->{char}}) { |
9288 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9289 |
|
|
} else { |
9290 |
|
|
$self->{set_next_input_character}->($self); |
9291 |
|
|
} |
9292 |
|
|
|
9293 |
|
|
{ |
9294 |
|
|
$r = {type => 'character', data => qq<\x{00EE}>}; # icirc |
9295 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9296 |
|
|
|
9297 |
|
|
if (@{$self->{char}}) { |
9298 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9299 |
|
|
} else { |
9300 |
|
|
$self->{set_next_input_character}->($self); |
9301 |
|
|
} |
9302 |
|
|
|
9303 |
|
|
} else { |
9304 |
|
|
$self->{parse_error}->(); |
9305 |
|
|
## reconsume |
9306 |
|
|
} |
9307 |
|
|
} |
9308 |
|
|
} else { |
9309 |
|
|
$self->{parse_error}->(); |
9310 |
|
|
unshift @{$self->{char}}, (99, 105, 114, $self->{next_input_character}); |
9311 |
|
|
$self->{next_input_character} = 105; |
9312 |
|
|
} |
9313 |
|
|
} else { |
9314 |
|
|
$self->{parse_error}->(); |
9315 |
|
|
unshift @{$self->{char}}, (99, 105, $self->{next_input_character}); |
9316 |
|
|
$self->{next_input_character} = 105; |
9317 |
|
|
} |
9318 |
|
|
} else { |
9319 |
|
|
$self->{parse_error}->(); |
9320 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
9321 |
|
|
$self->{next_input_character} = 105; |
9322 |
|
|
} |
9323 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
9324 |
|
|
|
9325 |
|
|
if (@{$self->{char}}) { |
9326 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9327 |
|
|
} else { |
9328 |
|
|
$self->{set_next_input_character}->($self); |
9329 |
|
|
} |
9330 |
|
|
|
9331 |
|
|
if ($self->{next_input_character} == 120) { # x |
9332 |
|
|
|
9333 |
|
|
if (@{$self->{char}}) { |
9334 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9335 |
|
|
} else { |
9336 |
|
|
$self->{set_next_input_character}->($self); |
9337 |
|
|
} |
9338 |
|
|
|
9339 |
|
|
if ($self->{next_input_character} == 99) { # c |
9340 |
|
|
|
9341 |
|
|
if (@{$self->{char}}) { |
9342 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9343 |
|
|
} else { |
9344 |
|
|
$self->{set_next_input_character}->($self); |
9345 |
|
|
} |
9346 |
|
|
|
9347 |
|
|
if ($self->{next_input_character} == 108) { # l |
9348 |
|
|
|
9349 |
|
|
if (@{$self->{char}}) { |
9350 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9351 |
|
|
} else { |
9352 |
|
|
$self->{set_next_input_character}->($self); |
9353 |
|
|
} |
9354 |
|
|
|
9355 |
|
|
{ |
9356 |
|
|
$r = {type => 'character', data => qq<\x{00A1}>}; # iexcl |
9357 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9358 |
|
|
|
9359 |
|
|
if (@{$self->{char}}) { |
9360 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9361 |
|
|
} else { |
9362 |
|
|
$self->{set_next_input_character}->($self); |
9363 |
|
|
} |
9364 |
|
|
|
9365 |
|
|
} else { |
9366 |
|
|
$self->{parse_error}->(); |
9367 |
|
|
## reconsume |
9368 |
|
|
} |
9369 |
|
|
} |
9370 |
|
|
} else { |
9371 |
|
|
$self->{parse_error}->(); |
9372 |
|
|
unshift @{$self->{char}}, (101, 120, 99, $self->{next_input_character}); |
9373 |
|
|
$self->{next_input_character} = 105; |
9374 |
|
|
} |
9375 |
|
|
} else { |
9376 |
|
|
$self->{parse_error}->(); |
9377 |
|
|
unshift @{$self->{char}}, (101, 120, $self->{next_input_character}); |
9378 |
|
|
$self->{next_input_character} = 105; |
9379 |
|
|
} |
9380 |
|
|
} else { |
9381 |
|
|
$self->{parse_error}->(); |
9382 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
9383 |
|
|
$self->{next_input_character} = 105; |
9384 |
|
|
} |
9385 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
9386 |
|
|
|
9387 |
|
|
if (@{$self->{char}}) { |
9388 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9389 |
|
|
} else { |
9390 |
|
|
$self->{set_next_input_character}->($self); |
9391 |
|
|
} |
9392 |
|
|
|
9393 |
|
|
if ($self->{next_input_character} == 114) { # r |
9394 |
|
|
|
9395 |
|
|
if (@{$self->{char}}) { |
9396 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9397 |
|
|
} else { |
9398 |
|
|
$self->{set_next_input_character}->($self); |
9399 |
|
|
} |
9400 |
|
|
|
9401 |
|
|
if ($self->{next_input_character} == 97) { # a |
9402 |
|
|
|
9403 |
|
|
if (@{$self->{char}}) { |
9404 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9405 |
|
|
} else { |
9406 |
|
|
$self->{set_next_input_character}->($self); |
9407 |
|
|
} |
9408 |
|
|
|
9409 |
|
|
if ($self->{next_input_character} == 118) { # v |
9410 |
|
|
|
9411 |
|
|
if (@{$self->{char}}) { |
9412 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9413 |
|
|
} else { |
9414 |
|
|
$self->{set_next_input_character}->($self); |
9415 |
|
|
} |
9416 |
|
|
|
9417 |
|
|
if ($self->{next_input_character} == 101) { # e |
9418 |
|
|
|
9419 |
|
|
if (@{$self->{char}}) { |
9420 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9421 |
|
|
} else { |
9422 |
|
|
$self->{set_next_input_character}->($self); |
9423 |
|
|
} |
9424 |
|
|
|
9425 |
|
|
{ |
9426 |
|
|
$r = {type => 'character', data => qq<\x{00EC}>}; # igrave |
9427 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9428 |
|
|
|
9429 |
|
|
if (@{$self->{char}}) { |
9430 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9431 |
|
|
} else { |
9432 |
|
|
$self->{set_next_input_character}->($self); |
9433 |
|
|
} |
9434 |
|
|
|
9435 |
|
|
} else { |
9436 |
|
|
$self->{parse_error}->(); |
9437 |
|
|
## reconsume |
9438 |
|
|
} |
9439 |
|
|
} |
9440 |
|
|
} else { |
9441 |
|
|
$self->{parse_error}->(); |
9442 |
|
|
unshift @{$self->{char}}, (103, 114, 97, 118, $self->{next_input_character}); |
9443 |
|
|
$self->{next_input_character} = 105; |
9444 |
|
|
} |
9445 |
|
|
} else { |
9446 |
|
|
$self->{parse_error}->(); |
9447 |
|
|
unshift @{$self->{char}}, (103, 114, 97, $self->{next_input_character}); |
9448 |
|
|
$self->{next_input_character} = 105; |
9449 |
|
|
} |
9450 |
|
|
} else { |
9451 |
|
|
$self->{parse_error}->(); |
9452 |
|
|
unshift @{$self->{char}}, (103, 114, $self->{next_input_character}); |
9453 |
|
|
$self->{next_input_character} = 105; |
9454 |
|
|
} |
9455 |
|
|
} else { |
9456 |
|
|
$self->{parse_error}->(); |
9457 |
|
|
unshift @{$self->{char}}, (103, $self->{next_input_character}); |
9458 |
|
|
$self->{next_input_character} = 105; |
9459 |
|
|
} |
9460 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
9461 |
|
|
|
9462 |
|
|
if (@{$self->{char}}) { |
9463 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9464 |
|
|
} else { |
9465 |
|
|
$self->{set_next_input_character}->($self); |
9466 |
|
|
} |
9467 |
|
|
|
9468 |
|
|
if ($self->{next_input_character} == 97) { # a |
9469 |
|
|
|
9470 |
|
|
if (@{$self->{char}}) { |
9471 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9472 |
|
|
} else { |
9473 |
|
|
$self->{set_next_input_character}->($self); |
9474 |
|
|
} |
9475 |
|
|
|
9476 |
|
|
if ($self->{next_input_character} == 103) { # g |
9477 |
|
|
|
9478 |
|
|
if (@{$self->{char}}) { |
9479 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9480 |
|
|
} else { |
9481 |
|
|
$self->{set_next_input_character}->($self); |
9482 |
|
|
} |
9483 |
|
|
|
9484 |
|
|
if ($self->{next_input_character} == 101) { # e |
9485 |
|
|
|
9486 |
|
|
if (@{$self->{char}}) { |
9487 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9488 |
|
|
} else { |
9489 |
|
|
$self->{set_next_input_character}->($self); |
9490 |
|
|
} |
9491 |
|
|
|
9492 |
|
|
{ |
9493 |
|
|
$r = {type => 'character', data => qq<\x{2111}>}; # image |
9494 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9495 |
|
|
|
9496 |
|
|
if (@{$self->{char}}) { |
9497 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9498 |
|
|
} else { |
9499 |
|
|
$self->{set_next_input_character}->($self); |
9500 |
|
|
} |
9501 |
|
|
|
9502 |
|
|
} else { |
9503 |
|
|
$self->{parse_error}->(); |
9504 |
|
|
## reconsume |
9505 |
|
|
} |
9506 |
|
|
} |
9507 |
|
|
} else { |
9508 |
|
|
$self->{parse_error}->(); |
9509 |
|
|
unshift @{$self->{char}}, (109, 97, 103, $self->{next_input_character}); |
9510 |
|
|
$self->{next_input_character} = 105; |
9511 |
|
|
} |
9512 |
|
|
} else { |
9513 |
|
|
$self->{parse_error}->(); |
9514 |
|
|
unshift @{$self->{char}}, (109, 97, $self->{next_input_character}); |
9515 |
|
|
$self->{next_input_character} = 105; |
9516 |
|
|
} |
9517 |
|
|
} else { |
9518 |
|
|
$self->{parse_error}->(); |
9519 |
|
|
unshift @{$self->{char}}, (109, $self->{next_input_character}); |
9520 |
|
|
$self->{next_input_character} = 105; |
9521 |
|
|
} |
9522 |
|
|
} elsif ($self->{next_input_character} == 110) { # n |
9523 |
|
|
|
9524 |
|
|
if (@{$self->{char}}) { |
9525 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9526 |
|
|
} else { |
9527 |
|
|
$self->{set_next_input_character}->($self); |
9528 |
|
|
} |
9529 |
|
|
|
9530 |
|
|
if ($self->{next_input_character} == 102) { # f |
9531 |
|
|
|
9532 |
|
|
if (@{$self->{char}}) { |
9533 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9534 |
|
|
} else { |
9535 |
|
|
$self->{set_next_input_character}->($self); |
9536 |
|
|
} |
9537 |
|
|
|
9538 |
|
|
if ($self->{next_input_character} == 105) { # i |
9539 |
|
|
|
9540 |
|
|
if (@{$self->{char}}) { |
9541 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9542 |
|
|
} else { |
9543 |
|
|
$self->{set_next_input_character}->($self); |
9544 |
|
|
} |
9545 |
|
|
|
9546 |
|
|
if ($self->{next_input_character} == 110) { # n |
9547 |
|
|
|
9548 |
|
|
if (@{$self->{char}}) { |
9549 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9550 |
|
|
} else { |
9551 |
|
|
$self->{set_next_input_character}->($self); |
9552 |
|
|
} |
9553 |
|
|
|
9554 |
|
|
{ |
9555 |
|
|
$r = {type => 'character', data => qq<\x{221E}>}; # infin |
9556 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9557 |
|
|
|
9558 |
|
|
if (@{$self->{char}}) { |
9559 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9560 |
|
|
} else { |
9561 |
|
|
$self->{set_next_input_character}->($self); |
9562 |
|
|
} |
9563 |
|
|
|
9564 |
|
|
} else { |
9565 |
|
|
$self->{parse_error}->(); |
9566 |
|
|
## reconsume |
9567 |
|
|
} |
9568 |
|
|
} |
9569 |
|
|
} else { |
9570 |
|
|
$self->{parse_error}->(); |
9571 |
|
|
unshift @{$self->{char}}, (110, 102, 105, $self->{next_input_character}); |
9572 |
|
|
$self->{next_input_character} = 105; |
9573 |
|
|
} |
9574 |
|
|
} else { |
9575 |
|
|
$self->{parse_error}->(); |
9576 |
|
|
unshift @{$self->{char}}, (110, 102, $self->{next_input_character}); |
9577 |
|
|
$self->{next_input_character} = 105; |
9578 |
|
|
} |
9579 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
9580 |
|
|
|
9581 |
|
|
if (@{$self->{char}}) { |
9582 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9583 |
|
|
} else { |
9584 |
|
|
$self->{set_next_input_character}->($self); |
9585 |
|
|
} |
9586 |
|
|
|
9587 |
|
|
{ |
9588 |
|
|
$r = {type => 'character', data => qq<\x{222B}>}; # int |
9589 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9590 |
|
|
|
9591 |
|
|
if (@{$self->{char}}) { |
9592 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9593 |
|
|
} else { |
9594 |
|
|
$self->{set_next_input_character}->($self); |
9595 |
|
|
} |
9596 |
|
|
|
9597 |
|
|
} else { |
9598 |
|
|
$self->{parse_error}->(); |
9599 |
|
|
## reconsume |
9600 |
|
|
} |
9601 |
|
|
} |
9602 |
|
|
} else { |
9603 |
|
|
$self->{parse_error}->(); |
9604 |
|
|
unshift @{$self->{char}}, (110, $self->{next_input_character}); |
9605 |
|
|
$self->{next_input_character} = 105; |
9606 |
|
|
} |
9607 |
|
|
} elsif ($self->{next_input_character} == 111) { # o |
9608 |
|
|
|
9609 |
|
|
if (@{$self->{char}}) { |
9610 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9611 |
|
|
} else { |
9612 |
|
|
$self->{set_next_input_character}->($self); |
9613 |
|
|
} |
9614 |
|
|
|
9615 |
|
|
if ($self->{next_input_character} == 116) { # t |
9616 |
|
|
|
9617 |
|
|
if (@{$self->{char}}) { |
9618 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9619 |
|
|
} else { |
9620 |
|
|
$self->{set_next_input_character}->($self); |
9621 |
|
|
} |
9622 |
|
|
|
9623 |
|
|
if ($self->{next_input_character} == 97) { # a |
9624 |
|
|
|
9625 |
|
|
if (@{$self->{char}}) { |
9626 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9627 |
|
|
} else { |
9628 |
|
|
$self->{set_next_input_character}->($self); |
9629 |
|
|
} |
9630 |
|
|
|
9631 |
|
|
{ |
9632 |
|
|
$r = {type => 'character', data => qq<\x{03B9}>}; # iota |
9633 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9634 |
|
|
|
9635 |
|
|
if (@{$self->{char}}) { |
9636 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9637 |
|
|
} else { |
9638 |
|
|
$self->{set_next_input_character}->($self); |
9639 |
|
|
} |
9640 |
|
|
|
9641 |
|
|
} else { |
9642 |
|
|
$self->{parse_error}->(); |
9643 |
|
|
## reconsume |
9644 |
|
|
} |
9645 |
|
|
} |
9646 |
|
|
} else { |
9647 |
|
|
$self->{parse_error}->(); |
9648 |
|
|
unshift @{$self->{char}}, (111, 116, $self->{next_input_character}); |
9649 |
|
|
$self->{next_input_character} = 105; |
9650 |
|
|
} |
9651 |
|
|
} else { |
9652 |
|
|
$self->{parse_error}->(); |
9653 |
|
|
unshift @{$self->{char}}, (111, $self->{next_input_character}); |
9654 |
|
|
$self->{next_input_character} = 105; |
9655 |
|
|
} |
9656 |
|
|
} elsif ($self->{next_input_character} == 113) { # q |
9657 |
|
|
|
9658 |
|
|
if (@{$self->{char}}) { |
9659 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9660 |
|
|
} else { |
9661 |
|
|
$self->{set_next_input_character}->($self); |
9662 |
|
|
} |
9663 |
|
|
|
9664 |
|
|
if ($self->{next_input_character} == 117) { # u |
9665 |
|
|
|
9666 |
|
|
if (@{$self->{char}}) { |
9667 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9668 |
|
|
} else { |
9669 |
|
|
$self->{set_next_input_character}->($self); |
9670 |
|
|
} |
9671 |
|
|
|
9672 |
|
|
if ($self->{next_input_character} == 101) { # e |
9673 |
|
|
|
9674 |
|
|
if (@{$self->{char}}) { |
9675 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9676 |
|
|
} else { |
9677 |
|
|
$self->{set_next_input_character}->($self); |
9678 |
|
|
} |
9679 |
|
|
|
9680 |
|
|
if ($self->{next_input_character} == 115) { # s |
9681 |
|
|
|
9682 |
|
|
if (@{$self->{char}}) { |
9683 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9684 |
|
|
} else { |
9685 |
|
|
$self->{set_next_input_character}->($self); |
9686 |
|
|
} |
9687 |
|
|
|
9688 |
|
|
if ($self->{next_input_character} == 116) { # t |
9689 |
|
|
|
9690 |
|
|
if (@{$self->{char}}) { |
9691 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9692 |
|
|
} else { |
9693 |
|
|
$self->{set_next_input_character}->($self); |
9694 |
|
|
} |
9695 |
|
|
|
9696 |
|
|
{ |
9697 |
|
|
$r = {type => 'character', data => qq<\x{00BF}>}; # iquest |
9698 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9699 |
|
|
|
9700 |
|
|
if (@{$self->{char}}) { |
9701 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9702 |
|
|
} else { |
9703 |
|
|
$self->{set_next_input_character}->($self); |
9704 |
|
|
} |
9705 |
|
|
|
9706 |
|
|
} else { |
9707 |
|
|
$self->{parse_error}->(); |
9708 |
|
|
## reconsume |
9709 |
|
|
} |
9710 |
|
|
} |
9711 |
|
|
} else { |
9712 |
|
|
$self->{parse_error}->(); |
9713 |
|
|
unshift @{$self->{char}}, (113, 117, 101, 115, $self->{next_input_character}); |
9714 |
|
|
$self->{next_input_character} = 105; |
9715 |
|
|
} |
9716 |
|
|
} else { |
9717 |
|
|
$self->{parse_error}->(); |
9718 |
|
|
unshift @{$self->{char}}, (113, 117, 101, $self->{next_input_character}); |
9719 |
|
|
$self->{next_input_character} = 105; |
9720 |
|
|
} |
9721 |
|
|
} else { |
9722 |
|
|
$self->{parse_error}->(); |
9723 |
|
|
unshift @{$self->{char}}, (113, 117, $self->{next_input_character}); |
9724 |
|
|
$self->{next_input_character} = 105; |
9725 |
|
|
} |
9726 |
|
|
} else { |
9727 |
|
|
$self->{parse_error}->(); |
9728 |
|
|
unshift @{$self->{char}}, (113, $self->{next_input_character}); |
9729 |
|
|
$self->{next_input_character} = 105; |
9730 |
|
|
} |
9731 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
9732 |
|
|
|
9733 |
|
|
if (@{$self->{char}}) { |
9734 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9735 |
|
|
} else { |
9736 |
|
|
$self->{set_next_input_character}->($self); |
9737 |
|
|
} |
9738 |
|
|
|
9739 |
|
|
if ($self->{next_input_character} == 105) { # i |
9740 |
|
|
|
9741 |
|
|
if (@{$self->{char}}) { |
9742 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9743 |
|
|
} else { |
9744 |
|
|
$self->{set_next_input_character}->($self); |
9745 |
|
|
} |
9746 |
|
|
|
9747 |
|
|
if ($self->{next_input_character} == 110) { # n |
9748 |
|
|
|
9749 |
|
|
if (@{$self->{char}}) { |
9750 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9751 |
|
|
} else { |
9752 |
|
|
$self->{set_next_input_character}->($self); |
9753 |
|
|
} |
9754 |
|
|
|
9755 |
|
|
{ |
9756 |
|
|
$r = {type => 'character', data => qq<\x{2208}>}; # isin |
9757 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9758 |
|
|
|
9759 |
|
|
if (@{$self->{char}}) { |
9760 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9761 |
|
|
} else { |
9762 |
|
|
$self->{set_next_input_character}->($self); |
9763 |
|
|
} |
9764 |
|
|
|
9765 |
|
|
} else { |
9766 |
|
|
$self->{parse_error}->(); |
9767 |
|
|
## reconsume |
9768 |
|
|
} |
9769 |
|
|
} |
9770 |
|
|
} else { |
9771 |
|
|
$self->{parse_error}->(); |
9772 |
|
|
unshift @{$self->{char}}, (115, 105, $self->{next_input_character}); |
9773 |
|
|
$self->{next_input_character} = 105; |
9774 |
|
|
} |
9775 |
|
|
} else { |
9776 |
|
|
$self->{parse_error}->(); |
9777 |
|
|
unshift @{$self->{char}}, (115, $self->{next_input_character}); |
9778 |
|
|
$self->{next_input_character} = 105; |
9779 |
|
|
} |
9780 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
9781 |
|
|
|
9782 |
|
|
if (@{$self->{char}}) { |
9783 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9784 |
|
|
} else { |
9785 |
|
|
$self->{set_next_input_character}->($self); |
9786 |
|
|
} |
9787 |
|
|
|
9788 |
|
|
if ($self->{next_input_character} == 109) { # m |
9789 |
|
|
|
9790 |
|
|
if (@{$self->{char}}) { |
9791 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9792 |
|
|
} else { |
9793 |
|
|
$self->{set_next_input_character}->($self); |
9794 |
|
|
} |
9795 |
|
|
|
9796 |
|
|
if ($self->{next_input_character} == 108) { # l |
9797 |
|
|
|
9798 |
|
|
if (@{$self->{char}}) { |
9799 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9800 |
|
|
} else { |
9801 |
|
|
$self->{set_next_input_character}->($self); |
9802 |
|
|
} |
9803 |
|
|
|
9804 |
|
|
{ |
9805 |
|
|
$r = {type => 'character', data => qq<\x{00EF}>}; # iuml |
9806 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9807 |
|
|
|
9808 |
|
|
if (@{$self->{char}}) { |
9809 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9810 |
|
|
} else { |
9811 |
|
|
$self->{set_next_input_character}->($self); |
9812 |
|
|
} |
9813 |
|
|
|
9814 |
|
|
} else { |
9815 |
|
|
$self->{parse_error}->(); |
9816 |
|
|
## reconsume |
9817 |
|
|
} |
9818 |
|
|
} |
9819 |
|
|
} else { |
9820 |
|
|
$self->{parse_error}->(); |
9821 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
9822 |
|
|
$self->{next_input_character} = 105; |
9823 |
|
|
} |
9824 |
|
|
} else { |
9825 |
|
|
$self->{parse_error}->(); |
9826 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
9827 |
|
|
$self->{next_input_character} = 105; |
9828 |
|
|
} |
9829 |
|
|
} else { |
9830 |
|
|
$self->{parse_error}->(); |
9831 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
9832 |
|
|
$self->{next_input_character} = 105; |
9833 |
|
|
} |
9834 |
|
|
} elsif ($self->{next_input_character} == 107) { # k |
9835 |
|
|
|
9836 |
|
|
if (@{$self->{char}}) { |
9837 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9838 |
|
|
} else { |
9839 |
|
|
$self->{set_next_input_character}->($self); |
9840 |
|
|
} |
9841 |
|
|
|
9842 |
|
|
if ($self->{next_input_character} == 97) { # a |
9843 |
|
|
|
9844 |
|
|
if (@{$self->{char}}) { |
9845 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9846 |
|
|
} else { |
9847 |
|
|
$self->{set_next_input_character}->($self); |
9848 |
|
|
} |
9849 |
|
|
|
9850 |
|
|
if ($self->{next_input_character} == 112) { # p |
9851 |
|
|
|
9852 |
|
|
if (@{$self->{char}}) { |
9853 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9854 |
|
|
} else { |
9855 |
|
|
$self->{set_next_input_character}->($self); |
9856 |
|
|
} |
9857 |
|
|
|
9858 |
|
|
if ($self->{next_input_character} == 112) { # p |
9859 |
|
|
|
9860 |
|
|
if (@{$self->{char}}) { |
9861 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9862 |
|
|
} else { |
9863 |
|
|
$self->{set_next_input_character}->($self); |
9864 |
|
|
} |
9865 |
|
|
|
9866 |
|
|
if ($self->{next_input_character} == 97) { # a |
9867 |
|
|
|
9868 |
|
|
if (@{$self->{char}}) { |
9869 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9870 |
|
|
} else { |
9871 |
|
|
$self->{set_next_input_character}->($self); |
9872 |
|
|
} |
9873 |
|
|
|
9874 |
|
|
{ |
9875 |
|
|
$r = {type => 'character', data => qq<\x{03BA}>}; # kappa |
9876 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9877 |
|
|
|
9878 |
|
|
if (@{$self->{char}}) { |
9879 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9880 |
|
|
} else { |
9881 |
|
|
$self->{set_next_input_character}->($self); |
9882 |
|
|
} |
9883 |
|
|
|
9884 |
|
|
} else { |
9885 |
|
|
$self->{parse_error}->(); |
9886 |
|
|
## reconsume |
9887 |
|
|
} |
9888 |
|
|
} |
9889 |
|
|
} else { |
9890 |
|
|
$self->{parse_error}->(); |
9891 |
|
|
unshift @{$self->{char}}, (97, 112, 112, $self->{next_input_character}); |
9892 |
|
|
$self->{next_input_character} = 107; |
9893 |
|
|
} |
9894 |
|
|
} else { |
9895 |
|
|
$self->{parse_error}->(); |
9896 |
|
|
unshift @{$self->{char}}, (97, 112, $self->{next_input_character}); |
9897 |
|
|
$self->{next_input_character} = 107; |
9898 |
|
|
} |
9899 |
|
|
} else { |
9900 |
|
|
$self->{parse_error}->(); |
9901 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
9902 |
|
|
$self->{next_input_character} = 107; |
9903 |
|
|
} |
9904 |
|
|
} else { |
9905 |
|
|
$self->{parse_error}->(); |
9906 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
9907 |
|
|
$self->{next_input_character} = 107; |
9908 |
|
|
} |
9909 |
|
|
} elsif ($self->{next_input_character} == 108) { # l |
9910 |
|
|
|
9911 |
|
|
if (@{$self->{char}}) { |
9912 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9913 |
|
|
} else { |
9914 |
|
|
$self->{set_next_input_character}->($self); |
9915 |
|
|
} |
9916 |
|
|
|
9917 |
|
|
if ($self->{next_input_character} == 65) { # A |
9918 |
|
|
|
9919 |
|
|
if (@{$self->{char}}) { |
9920 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9921 |
|
|
} else { |
9922 |
|
|
$self->{set_next_input_character}->($self); |
9923 |
|
|
} |
9924 |
|
|
|
9925 |
|
|
if ($self->{next_input_character} == 114) { # r |
9926 |
|
|
|
9927 |
|
|
if (@{$self->{char}}) { |
9928 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9929 |
|
|
} else { |
9930 |
|
|
$self->{set_next_input_character}->($self); |
9931 |
|
|
} |
9932 |
|
|
|
9933 |
|
|
if ($self->{next_input_character} == 114) { # r |
9934 |
|
|
|
9935 |
|
|
if (@{$self->{char}}) { |
9936 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9937 |
|
|
} else { |
9938 |
|
|
$self->{set_next_input_character}->($self); |
9939 |
|
|
} |
9940 |
|
|
|
9941 |
|
|
{ |
9942 |
|
|
$r = {type => 'character', data => qq<\x{21D0}>}; # lArr |
9943 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
9944 |
|
|
|
9945 |
|
|
if (@{$self->{char}}) { |
9946 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9947 |
|
|
} else { |
9948 |
|
|
$self->{set_next_input_character}->($self); |
9949 |
|
|
} |
9950 |
|
|
|
9951 |
|
|
} else { |
9952 |
|
|
$self->{parse_error}->(); |
9953 |
|
|
## reconsume |
9954 |
|
|
} |
9955 |
|
|
} |
9956 |
|
|
} else { |
9957 |
|
|
$self->{parse_error}->(); |
9958 |
|
|
unshift @{$self->{char}}, (65, 114, $self->{next_input_character}); |
9959 |
|
|
$self->{next_input_character} = 108; |
9960 |
|
|
} |
9961 |
|
|
} else { |
9962 |
|
|
$self->{parse_error}->(); |
9963 |
|
|
unshift @{$self->{char}}, (65, $self->{next_input_character}); |
9964 |
|
|
$self->{next_input_character} = 108; |
9965 |
|
|
} |
9966 |
|
|
} elsif ($self->{next_input_character} == 97) { # a |
9967 |
|
|
|
9968 |
|
|
if (@{$self->{char}}) { |
9969 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9970 |
|
|
} else { |
9971 |
|
|
$self->{set_next_input_character}->($self); |
9972 |
|
|
} |
9973 |
|
|
|
9974 |
|
|
if ($self->{next_input_character} == 109) { # m |
9975 |
|
|
|
9976 |
|
|
if (@{$self->{char}}) { |
9977 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9978 |
|
|
} else { |
9979 |
|
|
$self->{set_next_input_character}->($self); |
9980 |
|
|
} |
9981 |
|
|
|
9982 |
|
|
if ($self->{next_input_character} == 98) { # b |
9983 |
|
|
|
9984 |
|
|
if (@{$self->{char}}) { |
9985 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9986 |
|
|
} else { |
9987 |
|
|
$self->{set_next_input_character}->($self); |
9988 |
|
|
} |
9989 |
|
|
|
9990 |
|
|
if ($self->{next_input_character} == 100) { # d |
9991 |
|
|
|
9992 |
|
|
if (@{$self->{char}}) { |
9993 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
9994 |
|
|
} else { |
9995 |
|
|
$self->{set_next_input_character}->($self); |
9996 |
|
|
} |
9997 |
|
|
|
9998 |
|
|
if ($self->{next_input_character} == 97) { # a |
9999 |
|
|
|
10000 |
|
|
if (@{$self->{char}}) { |
10001 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10002 |
|
|
} else { |
10003 |
|
|
$self->{set_next_input_character}->($self); |
10004 |
|
|
} |
10005 |
|
|
|
10006 |
|
|
{ |
10007 |
|
|
$r = {type => 'character', data => qq<\x{03BB}>}; # lambda |
10008 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10009 |
|
|
|
10010 |
|
|
if (@{$self->{char}}) { |
10011 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10012 |
|
|
} else { |
10013 |
|
|
$self->{set_next_input_character}->($self); |
10014 |
|
|
} |
10015 |
|
|
|
10016 |
|
|
} else { |
10017 |
|
|
$self->{parse_error}->(); |
10018 |
|
|
## reconsume |
10019 |
|
|
} |
10020 |
|
|
} |
10021 |
|
|
} else { |
10022 |
|
|
$self->{parse_error}->(); |
10023 |
|
|
unshift @{$self->{char}}, (97, 109, 98, 100, $self->{next_input_character}); |
10024 |
|
|
$self->{next_input_character} = 108; |
10025 |
|
|
} |
10026 |
|
|
} else { |
10027 |
|
|
$self->{parse_error}->(); |
10028 |
|
|
unshift @{$self->{char}}, (97, 109, 98, $self->{next_input_character}); |
10029 |
|
|
$self->{next_input_character} = 108; |
10030 |
|
|
} |
10031 |
|
|
} else { |
10032 |
|
|
$self->{parse_error}->(); |
10033 |
|
|
unshift @{$self->{char}}, (97, 109, $self->{next_input_character}); |
10034 |
|
|
$self->{next_input_character} = 108; |
10035 |
|
|
} |
10036 |
|
|
} elsif ($self->{next_input_character} == 110) { # n |
10037 |
|
|
|
10038 |
|
|
if (@{$self->{char}}) { |
10039 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10040 |
|
|
} else { |
10041 |
|
|
$self->{set_next_input_character}->($self); |
10042 |
|
|
} |
10043 |
|
|
|
10044 |
|
|
if ($self->{next_input_character} == 103) { # g |
10045 |
|
|
|
10046 |
|
|
if (@{$self->{char}}) { |
10047 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10048 |
|
|
} else { |
10049 |
|
|
$self->{set_next_input_character}->($self); |
10050 |
|
|
} |
10051 |
|
|
|
10052 |
|
|
{ |
10053 |
|
|
$r = {type => 'character', data => qq<\x{2329}>}; # lang |
10054 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10055 |
|
|
|
10056 |
|
|
if (@{$self->{char}}) { |
10057 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10058 |
|
|
} else { |
10059 |
|
|
$self->{set_next_input_character}->($self); |
10060 |
|
|
} |
10061 |
|
|
|
10062 |
|
|
} else { |
10063 |
|
|
$self->{parse_error}->(); |
10064 |
|
|
## reconsume |
10065 |
|
|
} |
10066 |
|
|
} |
10067 |
|
|
} else { |
10068 |
|
|
$self->{parse_error}->(); |
10069 |
|
|
unshift @{$self->{char}}, (97, 110, $self->{next_input_character}); |
10070 |
|
|
$self->{next_input_character} = 108; |
10071 |
|
|
} |
10072 |
|
|
} elsif ($self->{next_input_character} == 113) { # q |
10073 |
|
|
|
10074 |
|
|
if (@{$self->{char}}) { |
10075 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10076 |
|
|
} else { |
10077 |
|
|
$self->{set_next_input_character}->($self); |
10078 |
|
|
} |
10079 |
|
|
|
10080 |
|
|
if ($self->{next_input_character} == 117) { # u |
10081 |
|
|
|
10082 |
|
|
if (@{$self->{char}}) { |
10083 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10084 |
|
|
} else { |
10085 |
|
|
$self->{set_next_input_character}->($self); |
10086 |
|
|
} |
10087 |
|
|
|
10088 |
|
|
if ($self->{next_input_character} == 111) { # o |
10089 |
|
|
|
10090 |
|
|
if (@{$self->{char}}) { |
10091 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10092 |
|
|
} else { |
10093 |
|
|
$self->{set_next_input_character}->($self); |
10094 |
|
|
} |
10095 |
|
|
|
10096 |
|
|
{ |
10097 |
|
|
$r = {type => 'character', data => qq<\x{00AB}>}; # laquo |
10098 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10099 |
|
|
|
10100 |
|
|
if (@{$self->{char}}) { |
10101 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10102 |
|
|
} else { |
10103 |
|
|
$self->{set_next_input_character}->($self); |
10104 |
|
|
} |
10105 |
|
|
|
10106 |
|
|
} else { |
10107 |
|
|
$self->{parse_error}->(); |
10108 |
|
|
## reconsume |
10109 |
|
|
} |
10110 |
|
|
} |
10111 |
|
|
} else { |
10112 |
|
|
$self->{parse_error}->(); |
10113 |
|
|
unshift @{$self->{char}}, (97, 113, 117, $self->{next_input_character}); |
10114 |
|
|
$self->{next_input_character} = 108; |
10115 |
|
|
} |
10116 |
|
|
} else { |
10117 |
|
|
$self->{parse_error}->(); |
10118 |
|
|
unshift @{$self->{char}}, (97, 113, $self->{next_input_character}); |
10119 |
|
|
$self->{next_input_character} = 108; |
10120 |
|
|
} |
10121 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
10122 |
|
|
|
10123 |
|
|
if (@{$self->{char}}) { |
10124 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10125 |
|
|
} else { |
10126 |
|
|
$self->{set_next_input_character}->($self); |
10127 |
|
|
} |
10128 |
|
|
|
10129 |
|
|
if ($self->{next_input_character} == 114) { # r |
10130 |
|
|
|
10131 |
|
|
if (@{$self->{char}}) { |
10132 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10133 |
|
|
} else { |
10134 |
|
|
$self->{set_next_input_character}->($self); |
10135 |
|
|
} |
10136 |
|
|
|
10137 |
|
|
{ |
10138 |
|
|
$r = {type => 'character', data => qq<\x{2190}>}; # larr |
10139 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10140 |
|
|
|
10141 |
|
|
if (@{$self->{char}}) { |
10142 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10143 |
|
|
} else { |
10144 |
|
|
$self->{set_next_input_character}->($self); |
10145 |
|
|
} |
10146 |
|
|
|
10147 |
|
|
} else { |
10148 |
|
|
$self->{parse_error}->(); |
10149 |
|
|
## reconsume |
10150 |
|
|
} |
10151 |
|
|
} |
10152 |
|
|
} else { |
10153 |
|
|
$self->{parse_error}->(); |
10154 |
|
|
unshift @{$self->{char}}, (97, 114, $self->{next_input_character}); |
10155 |
|
|
$self->{next_input_character} = 108; |
10156 |
|
|
} |
10157 |
|
|
} else { |
10158 |
|
|
$self->{parse_error}->(); |
10159 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
10160 |
|
|
$self->{next_input_character} = 108; |
10161 |
|
|
} |
10162 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
10163 |
|
|
|
10164 |
|
|
if (@{$self->{char}}) { |
10165 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10166 |
|
|
} else { |
10167 |
|
|
$self->{set_next_input_character}->($self); |
10168 |
|
|
} |
10169 |
|
|
|
10170 |
|
|
if ($self->{next_input_character} == 101) { # e |
10171 |
|
|
|
10172 |
|
|
if (@{$self->{char}}) { |
10173 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10174 |
|
|
} else { |
10175 |
|
|
$self->{set_next_input_character}->($self); |
10176 |
|
|
} |
10177 |
|
|
|
10178 |
|
|
if ($self->{next_input_character} == 105) { # i |
10179 |
|
|
|
10180 |
|
|
if (@{$self->{char}}) { |
10181 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10182 |
|
|
} else { |
10183 |
|
|
$self->{set_next_input_character}->($self); |
10184 |
|
|
} |
10185 |
|
|
|
10186 |
|
|
if ($self->{next_input_character} == 108) { # l |
10187 |
|
|
|
10188 |
|
|
if (@{$self->{char}}) { |
10189 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10190 |
|
|
} else { |
10191 |
|
|
$self->{set_next_input_character}->($self); |
10192 |
|
|
} |
10193 |
|
|
|
10194 |
|
|
{ |
10195 |
|
|
$r = {type => 'character', data => qq<\x{2308}>}; # lceil |
10196 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10197 |
|
|
|
10198 |
|
|
if (@{$self->{char}}) { |
10199 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10200 |
|
|
} else { |
10201 |
|
|
$self->{set_next_input_character}->($self); |
10202 |
|
|
} |
10203 |
|
|
|
10204 |
|
|
} else { |
10205 |
|
|
$self->{parse_error}->(); |
10206 |
|
|
## reconsume |
10207 |
|
|
} |
10208 |
|
|
} |
10209 |
|
|
} else { |
10210 |
|
|
$self->{parse_error}->(); |
10211 |
|
|
unshift @{$self->{char}}, (99, 101, 105, $self->{next_input_character}); |
10212 |
|
|
$self->{next_input_character} = 108; |
10213 |
|
|
} |
10214 |
|
|
} else { |
10215 |
|
|
$self->{parse_error}->(); |
10216 |
|
|
unshift @{$self->{char}}, (99, 101, $self->{next_input_character}); |
10217 |
|
|
$self->{next_input_character} = 108; |
10218 |
|
|
} |
10219 |
|
|
} else { |
10220 |
|
|
$self->{parse_error}->(); |
10221 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
10222 |
|
|
$self->{next_input_character} = 108; |
10223 |
|
|
} |
10224 |
|
|
} elsif ($self->{next_input_character} == 100) { # d |
10225 |
|
|
|
10226 |
|
|
if (@{$self->{char}}) { |
10227 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10228 |
|
|
} else { |
10229 |
|
|
$self->{set_next_input_character}->($self); |
10230 |
|
|
} |
10231 |
|
|
|
10232 |
|
|
if ($self->{next_input_character} == 113) { # q |
10233 |
|
|
|
10234 |
|
|
if (@{$self->{char}}) { |
10235 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10236 |
|
|
} else { |
10237 |
|
|
$self->{set_next_input_character}->($self); |
10238 |
|
|
} |
10239 |
|
|
|
10240 |
|
|
if ($self->{next_input_character} == 117) { # u |
10241 |
|
|
|
10242 |
|
|
if (@{$self->{char}}) { |
10243 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10244 |
|
|
} else { |
10245 |
|
|
$self->{set_next_input_character}->($self); |
10246 |
|
|
} |
10247 |
|
|
|
10248 |
|
|
if ($self->{next_input_character} == 111) { # o |
10249 |
|
|
|
10250 |
|
|
if (@{$self->{char}}) { |
10251 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10252 |
|
|
} else { |
10253 |
|
|
$self->{set_next_input_character}->($self); |
10254 |
|
|
} |
10255 |
|
|
|
10256 |
|
|
{ |
10257 |
|
|
$r = {type => 'character', data => qq<\x{201C}>}; # ldquo |
10258 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10259 |
|
|
|
10260 |
|
|
if (@{$self->{char}}) { |
10261 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10262 |
|
|
} else { |
10263 |
|
|
$self->{set_next_input_character}->($self); |
10264 |
|
|
} |
10265 |
|
|
|
10266 |
|
|
} else { |
10267 |
|
|
$self->{parse_error}->(); |
10268 |
|
|
## reconsume |
10269 |
|
|
} |
10270 |
|
|
} |
10271 |
|
|
} else { |
10272 |
|
|
$self->{parse_error}->(); |
10273 |
|
|
unshift @{$self->{char}}, (100, 113, 117, $self->{next_input_character}); |
10274 |
|
|
$self->{next_input_character} = 108; |
10275 |
|
|
} |
10276 |
|
|
} else { |
10277 |
|
|
$self->{parse_error}->(); |
10278 |
|
|
unshift @{$self->{char}}, (100, 113, $self->{next_input_character}); |
10279 |
|
|
$self->{next_input_character} = 108; |
10280 |
|
|
} |
10281 |
|
|
} else { |
10282 |
|
|
$self->{parse_error}->(); |
10283 |
|
|
unshift @{$self->{char}}, (100, $self->{next_input_character}); |
10284 |
|
|
$self->{next_input_character} = 108; |
10285 |
|
|
} |
10286 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
10287 |
|
|
|
10288 |
|
|
if (@{$self->{char}}) { |
10289 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10290 |
|
|
} else { |
10291 |
|
|
$self->{set_next_input_character}->($self); |
10292 |
|
|
} |
10293 |
|
|
|
10294 |
|
|
{ |
10295 |
|
|
$r = {type => 'character', data => qq<\x{2264}>}; # le |
10296 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10297 |
|
|
|
10298 |
|
|
if (@{$self->{char}}) { |
10299 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10300 |
|
|
} else { |
10301 |
|
|
$self->{set_next_input_character}->($self); |
10302 |
|
|
} |
10303 |
|
|
|
10304 |
|
|
} else { |
10305 |
|
|
$self->{parse_error}->(); |
10306 |
|
|
## reconsume |
10307 |
|
|
} |
10308 |
|
|
} |
10309 |
|
|
} elsif ($self->{next_input_character} == 102) { # f |
10310 |
|
|
|
10311 |
|
|
if (@{$self->{char}}) { |
10312 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10313 |
|
|
} else { |
10314 |
|
|
$self->{set_next_input_character}->($self); |
10315 |
|
|
} |
10316 |
|
|
|
10317 |
|
|
if ($self->{next_input_character} == 108) { # l |
10318 |
|
|
|
10319 |
|
|
if (@{$self->{char}}) { |
10320 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10321 |
|
|
} else { |
10322 |
|
|
$self->{set_next_input_character}->($self); |
10323 |
|
|
} |
10324 |
|
|
|
10325 |
|
|
if ($self->{next_input_character} == 111) { # o |
10326 |
|
|
|
10327 |
|
|
if (@{$self->{char}}) { |
10328 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10329 |
|
|
} else { |
10330 |
|
|
$self->{set_next_input_character}->($self); |
10331 |
|
|
} |
10332 |
|
|
|
10333 |
|
|
if ($self->{next_input_character} == 111) { # o |
10334 |
|
|
|
10335 |
|
|
if (@{$self->{char}}) { |
10336 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10337 |
|
|
} else { |
10338 |
|
|
$self->{set_next_input_character}->($self); |
10339 |
|
|
} |
10340 |
|
|
|
10341 |
|
|
if ($self->{next_input_character} == 114) { # r |
10342 |
|
|
|
10343 |
|
|
if (@{$self->{char}}) { |
10344 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10345 |
|
|
} else { |
10346 |
|
|
$self->{set_next_input_character}->($self); |
10347 |
|
|
} |
10348 |
|
|
|
10349 |
|
|
{ |
10350 |
|
|
$r = {type => 'character', data => qq<\x{230A}>}; # lfloor |
10351 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10352 |
|
|
|
10353 |
|
|
if (@{$self->{char}}) { |
10354 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10355 |
|
|
} else { |
10356 |
|
|
$self->{set_next_input_character}->($self); |
10357 |
|
|
} |
10358 |
|
|
|
10359 |
|
|
} else { |
10360 |
|
|
$self->{parse_error}->(); |
10361 |
|
|
## reconsume |
10362 |
|
|
} |
10363 |
|
|
} |
10364 |
|
|
} else { |
10365 |
|
|
$self->{parse_error}->(); |
10366 |
|
|
unshift @{$self->{char}}, (102, 108, 111, 111, $self->{next_input_character}); |
10367 |
|
|
$self->{next_input_character} = 108; |
10368 |
|
|
} |
10369 |
|
|
} else { |
10370 |
|
|
$self->{parse_error}->(); |
10371 |
|
|
unshift @{$self->{char}}, (102, 108, 111, $self->{next_input_character}); |
10372 |
|
|
$self->{next_input_character} = 108; |
10373 |
|
|
} |
10374 |
|
|
} else { |
10375 |
|
|
$self->{parse_error}->(); |
10376 |
|
|
unshift @{$self->{char}}, (102, 108, $self->{next_input_character}); |
10377 |
|
|
$self->{next_input_character} = 108; |
10378 |
|
|
} |
10379 |
|
|
} else { |
10380 |
|
|
$self->{parse_error}->(); |
10381 |
|
|
unshift @{$self->{char}}, (102, $self->{next_input_character}); |
10382 |
|
|
$self->{next_input_character} = 108; |
10383 |
|
|
} |
10384 |
|
|
} elsif ($self->{next_input_character} == 111) { # o |
10385 |
|
|
|
10386 |
|
|
if (@{$self->{char}}) { |
10387 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10388 |
|
|
} else { |
10389 |
|
|
$self->{set_next_input_character}->($self); |
10390 |
|
|
} |
10391 |
|
|
|
10392 |
|
|
if ($self->{next_input_character} == 119) { # w |
10393 |
|
|
|
10394 |
|
|
if (@{$self->{char}}) { |
10395 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10396 |
|
|
} else { |
10397 |
|
|
$self->{set_next_input_character}->($self); |
10398 |
|
|
} |
10399 |
|
|
|
10400 |
|
|
if ($self->{next_input_character} == 97) { # a |
10401 |
|
|
|
10402 |
|
|
if (@{$self->{char}}) { |
10403 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10404 |
|
|
} else { |
10405 |
|
|
$self->{set_next_input_character}->($self); |
10406 |
|
|
} |
10407 |
|
|
|
10408 |
|
|
if ($self->{next_input_character} == 115) { # s |
10409 |
|
|
|
10410 |
|
|
if (@{$self->{char}}) { |
10411 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10412 |
|
|
} else { |
10413 |
|
|
$self->{set_next_input_character}->($self); |
10414 |
|
|
} |
10415 |
|
|
|
10416 |
|
|
if ($self->{next_input_character} == 116) { # t |
10417 |
|
|
|
10418 |
|
|
if (@{$self->{char}}) { |
10419 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10420 |
|
|
} else { |
10421 |
|
|
$self->{set_next_input_character}->($self); |
10422 |
|
|
} |
10423 |
|
|
|
10424 |
|
|
{ |
10425 |
|
|
$r = {type => 'character', data => qq<\x{2217}>}; # lowast |
10426 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10427 |
|
|
|
10428 |
|
|
if (@{$self->{char}}) { |
10429 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10430 |
|
|
} else { |
10431 |
|
|
$self->{set_next_input_character}->($self); |
10432 |
|
|
} |
10433 |
|
|
|
10434 |
|
|
} else { |
10435 |
|
|
$self->{parse_error}->(); |
10436 |
|
|
## reconsume |
10437 |
|
|
} |
10438 |
|
|
} |
10439 |
|
|
} else { |
10440 |
|
|
$self->{parse_error}->(); |
10441 |
|
|
unshift @{$self->{char}}, (111, 119, 97, 115, $self->{next_input_character}); |
10442 |
|
|
$self->{next_input_character} = 108; |
10443 |
|
|
} |
10444 |
|
|
} else { |
10445 |
|
|
$self->{parse_error}->(); |
10446 |
|
|
unshift @{$self->{char}}, (111, 119, 97, $self->{next_input_character}); |
10447 |
|
|
$self->{next_input_character} = 108; |
10448 |
|
|
} |
10449 |
|
|
} else { |
10450 |
|
|
$self->{parse_error}->(); |
10451 |
|
|
unshift @{$self->{char}}, (111, 119, $self->{next_input_character}); |
10452 |
|
|
$self->{next_input_character} = 108; |
10453 |
|
|
} |
10454 |
|
|
} elsif ($self->{next_input_character} == 122) { # z |
10455 |
|
|
|
10456 |
|
|
if (@{$self->{char}}) { |
10457 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10458 |
|
|
} else { |
10459 |
|
|
$self->{set_next_input_character}->($self); |
10460 |
|
|
} |
10461 |
|
|
|
10462 |
|
|
{ |
10463 |
|
|
$r = {type => 'character', data => qq<\x{25CA}>}; # loz |
10464 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10465 |
|
|
|
10466 |
|
|
if (@{$self->{char}}) { |
10467 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10468 |
|
|
} else { |
10469 |
|
|
$self->{set_next_input_character}->($self); |
10470 |
|
|
} |
10471 |
|
|
|
10472 |
|
|
} else { |
10473 |
|
|
$self->{parse_error}->(); |
10474 |
|
|
## reconsume |
10475 |
|
|
} |
10476 |
|
|
} |
10477 |
|
|
} else { |
10478 |
|
|
$self->{parse_error}->(); |
10479 |
|
|
unshift @{$self->{char}}, (111, $self->{next_input_character}); |
10480 |
|
|
$self->{next_input_character} = 108; |
10481 |
|
|
} |
10482 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
10483 |
|
|
|
10484 |
|
|
if (@{$self->{char}}) { |
10485 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10486 |
|
|
} else { |
10487 |
|
|
$self->{set_next_input_character}->($self); |
10488 |
|
|
} |
10489 |
|
|
|
10490 |
|
|
if ($self->{next_input_character} == 109) { # m |
10491 |
|
|
|
10492 |
|
|
if (@{$self->{char}}) { |
10493 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10494 |
|
|
} else { |
10495 |
|
|
$self->{set_next_input_character}->($self); |
10496 |
|
|
} |
10497 |
|
|
|
10498 |
|
|
{ |
10499 |
|
|
$r = {type => 'character', data => qq<\x{200E}>}; # lrm |
10500 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10501 |
|
|
|
10502 |
|
|
if (@{$self->{char}}) { |
10503 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10504 |
|
|
} else { |
10505 |
|
|
$self->{set_next_input_character}->($self); |
10506 |
|
|
} |
10507 |
|
|
|
10508 |
|
|
} else { |
10509 |
|
|
$self->{parse_error}->(); |
10510 |
|
|
## reconsume |
10511 |
|
|
} |
10512 |
|
|
} |
10513 |
|
|
} else { |
10514 |
|
|
$self->{parse_error}->(); |
10515 |
|
|
unshift @{$self->{char}}, (114, $self->{next_input_character}); |
10516 |
|
|
$self->{next_input_character} = 108; |
10517 |
|
|
} |
10518 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
10519 |
|
|
|
10520 |
|
|
if (@{$self->{char}}) { |
10521 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10522 |
|
|
} else { |
10523 |
|
|
$self->{set_next_input_character}->($self); |
10524 |
|
|
} |
10525 |
|
|
|
10526 |
|
|
if ($self->{next_input_character} == 97) { # a |
10527 |
|
|
|
10528 |
|
|
if (@{$self->{char}}) { |
10529 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10530 |
|
|
} else { |
10531 |
|
|
$self->{set_next_input_character}->($self); |
10532 |
|
|
} |
10533 |
|
|
|
10534 |
|
|
if ($self->{next_input_character} == 113) { # q |
10535 |
|
|
|
10536 |
|
|
if (@{$self->{char}}) { |
10537 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10538 |
|
|
} else { |
10539 |
|
|
$self->{set_next_input_character}->($self); |
10540 |
|
|
} |
10541 |
|
|
|
10542 |
|
|
if ($self->{next_input_character} == 117) { # u |
10543 |
|
|
|
10544 |
|
|
if (@{$self->{char}}) { |
10545 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10546 |
|
|
} else { |
10547 |
|
|
$self->{set_next_input_character}->($self); |
10548 |
|
|
} |
10549 |
|
|
|
10550 |
|
|
if ($self->{next_input_character} == 111) { # o |
10551 |
|
|
|
10552 |
|
|
if (@{$self->{char}}) { |
10553 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10554 |
|
|
} else { |
10555 |
|
|
$self->{set_next_input_character}->($self); |
10556 |
|
|
} |
10557 |
|
|
|
10558 |
|
|
{ |
10559 |
|
|
$r = {type => 'character', data => qq<\x{2039}>}; # lsaquo |
10560 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10561 |
|
|
|
10562 |
|
|
if (@{$self->{char}}) { |
10563 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10564 |
|
|
} else { |
10565 |
|
|
$self->{set_next_input_character}->($self); |
10566 |
|
|
} |
10567 |
|
|
|
10568 |
|
|
} else { |
10569 |
|
|
$self->{parse_error}->(); |
10570 |
|
|
## reconsume |
10571 |
|
|
} |
10572 |
|
|
} |
10573 |
|
|
} else { |
10574 |
|
|
$self->{parse_error}->(); |
10575 |
|
|
unshift @{$self->{char}}, (115, 97, 113, 117, $self->{next_input_character}); |
10576 |
|
|
$self->{next_input_character} = 108; |
10577 |
|
|
} |
10578 |
|
|
} else { |
10579 |
|
|
$self->{parse_error}->(); |
10580 |
|
|
unshift @{$self->{char}}, (115, 97, 113, $self->{next_input_character}); |
10581 |
|
|
$self->{next_input_character} = 108; |
10582 |
|
|
} |
10583 |
|
|
} else { |
10584 |
|
|
$self->{parse_error}->(); |
10585 |
|
|
unshift @{$self->{char}}, (115, 97, $self->{next_input_character}); |
10586 |
|
|
$self->{next_input_character} = 108; |
10587 |
|
|
} |
10588 |
|
|
} elsif ($self->{next_input_character} == 113) { # q |
10589 |
|
|
|
10590 |
|
|
if (@{$self->{char}}) { |
10591 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10592 |
|
|
} else { |
10593 |
|
|
$self->{set_next_input_character}->($self); |
10594 |
|
|
} |
10595 |
|
|
|
10596 |
|
|
if ($self->{next_input_character} == 117) { # u |
10597 |
|
|
|
10598 |
|
|
if (@{$self->{char}}) { |
10599 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10600 |
|
|
} else { |
10601 |
|
|
$self->{set_next_input_character}->($self); |
10602 |
|
|
} |
10603 |
|
|
|
10604 |
|
|
if ($self->{next_input_character} == 111) { # o |
10605 |
|
|
|
10606 |
|
|
if (@{$self->{char}}) { |
10607 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10608 |
|
|
} else { |
10609 |
|
|
$self->{set_next_input_character}->($self); |
10610 |
|
|
} |
10611 |
|
|
|
10612 |
|
|
{ |
10613 |
|
|
$r = {type => 'character', data => qq<\x{2018}>}; # lsquo |
10614 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10615 |
|
|
|
10616 |
|
|
if (@{$self->{char}}) { |
10617 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10618 |
|
|
} else { |
10619 |
|
|
$self->{set_next_input_character}->($self); |
10620 |
|
|
} |
10621 |
|
|
|
10622 |
|
|
} else { |
10623 |
|
|
$self->{parse_error}->(); |
10624 |
|
|
## reconsume |
10625 |
|
|
} |
10626 |
|
|
} |
10627 |
|
|
} else { |
10628 |
|
|
$self->{parse_error}->(); |
10629 |
|
|
unshift @{$self->{char}}, (115, 113, 117, $self->{next_input_character}); |
10630 |
|
|
$self->{next_input_character} = 108; |
10631 |
|
|
} |
10632 |
|
|
} else { |
10633 |
|
|
$self->{parse_error}->(); |
10634 |
|
|
unshift @{$self->{char}}, (115, 113, $self->{next_input_character}); |
10635 |
|
|
$self->{next_input_character} = 108; |
10636 |
|
|
} |
10637 |
|
|
} else { |
10638 |
|
|
$self->{parse_error}->(); |
10639 |
|
|
unshift @{$self->{char}}, (115, $self->{next_input_character}); |
10640 |
|
|
$self->{next_input_character} = 108; |
10641 |
|
|
} |
10642 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
10643 |
|
|
|
10644 |
|
|
if (@{$self->{char}}) { |
10645 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10646 |
|
|
} else { |
10647 |
|
|
$self->{set_next_input_character}->($self); |
10648 |
|
|
} |
10649 |
|
|
|
10650 |
|
|
{ |
10651 |
|
|
$r = {type => 'character', data => qq<\x{003C}>}; # lt |
10652 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10653 |
|
|
|
10654 |
|
|
if (@{$self->{char}}) { |
10655 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10656 |
|
|
} else { |
10657 |
|
|
$self->{set_next_input_character}->($self); |
10658 |
|
|
} |
10659 |
|
|
|
10660 |
|
|
} else { |
10661 |
|
|
$self->{parse_error}->(); |
10662 |
|
|
## reconsume |
10663 |
|
|
} |
10664 |
|
|
} |
10665 |
|
|
} else { |
10666 |
|
|
$self->{parse_error}->(); |
10667 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
10668 |
|
|
$self->{next_input_character} = 108; |
10669 |
|
|
} |
10670 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
10671 |
|
|
|
10672 |
|
|
if (@{$self->{char}}) { |
10673 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10674 |
|
|
} else { |
10675 |
|
|
$self->{set_next_input_character}->($self); |
10676 |
|
|
} |
10677 |
|
|
|
10678 |
|
|
if ($self->{next_input_character} == 97) { # a |
10679 |
|
|
|
10680 |
|
|
if (@{$self->{char}}) { |
10681 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10682 |
|
|
} else { |
10683 |
|
|
$self->{set_next_input_character}->($self); |
10684 |
|
|
} |
10685 |
|
|
|
10686 |
|
|
if ($self->{next_input_character} == 99) { # c |
10687 |
|
|
|
10688 |
|
|
if (@{$self->{char}}) { |
10689 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10690 |
|
|
} else { |
10691 |
|
|
$self->{set_next_input_character}->($self); |
10692 |
|
|
} |
10693 |
|
|
|
10694 |
|
|
if ($self->{next_input_character} == 114) { # r |
10695 |
|
|
|
10696 |
|
|
if (@{$self->{char}}) { |
10697 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10698 |
|
|
} else { |
10699 |
|
|
$self->{set_next_input_character}->($self); |
10700 |
|
|
} |
10701 |
|
|
|
10702 |
|
|
{ |
10703 |
|
|
$r = {type => 'character', data => qq<\x{00AF}>}; # macr |
10704 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10705 |
|
|
|
10706 |
|
|
if (@{$self->{char}}) { |
10707 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10708 |
|
|
} else { |
10709 |
|
|
$self->{set_next_input_character}->($self); |
10710 |
|
|
} |
10711 |
|
|
|
10712 |
|
|
} else { |
10713 |
|
|
$self->{parse_error}->(); |
10714 |
|
|
## reconsume |
10715 |
|
|
} |
10716 |
|
|
} |
10717 |
|
|
} else { |
10718 |
|
|
$self->{parse_error}->(); |
10719 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
10720 |
|
|
$self->{next_input_character} = 109; |
10721 |
|
|
} |
10722 |
|
|
} else { |
10723 |
|
|
$self->{parse_error}->(); |
10724 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
10725 |
|
|
$self->{next_input_character} = 109; |
10726 |
|
|
} |
10727 |
|
|
} elsif ($self->{next_input_character} == 100) { # d |
10728 |
|
|
|
10729 |
|
|
if (@{$self->{char}}) { |
10730 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10731 |
|
|
} else { |
10732 |
|
|
$self->{set_next_input_character}->($self); |
10733 |
|
|
} |
10734 |
|
|
|
10735 |
|
|
if ($self->{next_input_character} == 97) { # a |
10736 |
|
|
|
10737 |
|
|
if (@{$self->{char}}) { |
10738 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10739 |
|
|
} else { |
10740 |
|
|
$self->{set_next_input_character}->($self); |
10741 |
|
|
} |
10742 |
|
|
|
10743 |
|
|
if ($self->{next_input_character} == 115) { # s |
10744 |
|
|
|
10745 |
|
|
if (@{$self->{char}}) { |
10746 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10747 |
|
|
} else { |
10748 |
|
|
$self->{set_next_input_character}->($self); |
10749 |
|
|
} |
10750 |
|
|
|
10751 |
|
|
if ($self->{next_input_character} == 104) { # h |
10752 |
|
|
|
10753 |
|
|
if (@{$self->{char}}) { |
10754 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10755 |
|
|
} else { |
10756 |
|
|
$self->{set_next_input_character}->($self); |
10757 |
|
|
} |
10758 |
|
|
|
10759 |
|
|
{ |
10760 |
|
|
$r = {type => 'character', data => qq<\x{2014}>}; # mdash |
10761 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10762 |
|
|
|
10763 |
|
|
if (@{$self->{char}}) { |
10764 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10765 |
|
|
} else { |
10766 |
|
|
$self->{set_next_input_character}->($self); |
10767 |
|
|
} |
10768 |
|
|
|
10769 |
|
|
} else { |
10770 |
|
|
$self->{parse_error}->(); |
10771 |
|
|
## reconsume |
10772 |
|
|
} |
10773 |
|
|
} |
10774 |
|
|
} else { |
10775 |
|
|
$self->{parse_error}->(); |
10776 |
|
|
unshift @{$self->{char}}, (100, 97, 115, $self->{next_input_character}); |
10777 |
|
|
$self->{next_input_character} = 109; |
10778 |
|
|
} |
10779 |
|
|
} else { |
10780 |
|
|
$self->{parse_error}->(); |
10781 |
|
|
unshift @{$self->{char}}, (100, 97, $self->{next_input_character}); |
10782 |
|
|
$self->{next_input_character} = 109; |
10783 |
|
|
} |
10784 |
|
|
} else { |
10785 |
|
|
$self->{parse_error}->(); |
10786 |
|
|
unshift @{$self->{char}}, (100, $self->{next_input_character}); |
10787 |
|
|
$self->{next_input_character} = 109; |
10788 |
|
|
} |
10789 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
10790 |
|
|
|
10791 |
|
|
if (@{$self->{char}}) { |
10792 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10793 |
|
|
} else { |
10794 |
|
|
$self->{set_next_input_character}->($self); |
10795 |
|
|
} |
10796 |
|
|
|
10797 |
|
|
if ($self->{next_input_character} == 99) { # c |
10798 |
|
|
|
10799 |
|
|
if (@{$self->{char}}) { |
10800 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10801 |
|
|
} else { |
10802 |
|
|
$self->{set_next_input_character}->($self); |
10803 |
|
|
} |
10804 |
|
|
|
10805 |
|
|
if ($self->{next_input_character} == 114) { # r |
10806 |
|
|
|
10807 |
|
|
if (@{$self->{char}}) { |
10808 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10809 |
|
|
} else { |
10810 |
|
|
$self->{set_next_input_character}->($self); |
10811 |
|
|
} |
10812 |
|
|
|
10813 |
|
|
if ($self->{next_input_character} == 111) { # o |
10814 |
|
|
|
10815 |
|
|
if (@{$self->{char}}) { |
10816 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10817 |
|
|
} else { |
10818 |
|
|
$self->{set_next_input_character}->($self); |
10819 |
|
|
} |
10820 |
|
|
|
10821 |
|
|
{ |
10822 |
|
|
$r = {type => 'character', data => qq<\x{00B5}>}; # micro |
10823 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10824 |
|
|
|
10825 |
|
|
if (@{$self->{char}}) { |
10826 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10827 |
|
|
} else { |
10828 |
|
|
$self->{set_next_input_character}->($self); |
10829 |
|
|
} |
10830 |
|
|
|
10831 |
|
|
} else { |
10832 |
|
|
$self->{parse_error}->(); |
10833 |
|
|
## reconsume |
10834 |
|
|
} |
10835 |
|
|
} |
10836 |
|
|
} else { |
10837 |
|
|
$self->{parse_error}->(); |
10838 |
|
|
unshift @{$self->{char}}, (105, 99, 114, $self->{next_input_character}); |
10839 |
|
|
$self->{next_input_character} = 109; |
10840 |
|
|
} |
10841 |
|
|
} else { |
10842 |
|
|
$self->{parse_error}->(); |
10843 |
|
|
unshift @{$self->{char}}, (105, 99, $self->{next_input_character}); |
10844 |
|
|
$self->{next_input_character} = 109; |
10845 |
|
|
} |
10846 |
|
|
} elsif ($self->{next_input_character} == 100) { # d |
10847 |
|
|
|
10848 |
|
|
if (@{$self->{char}}) { |
10849 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10850 |
|
|
} else { |
10851 |
|
|
$self->{set_next_input_character}->($self); |
10852 |
|
|
} |
10853 |
|
|
|
10854 |
|
|
if ($self->{next_input_character} == 100) { # d |
10855 |
|
|
|
10856 |
|
|
if (@{$self->{char}}) { |
10857 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10858 |
|
|
} else { |
10859 |
|
|
$self->{set_next_input_character}->($self); |
10860 |
|
|
} |
10861 |
|
|
|
10862 |
|
|
if ($self->{next_input_character} == 111) { # o |
10863 |
|
|
|
10864 |
|
|
if (@{$self->{char}}) { |
10865 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10866 |
|
|
} else { |
10867 |
|
|
$self->{set_next_input_character}->($self); |
10868 |
|
|
} |
10869 |
|
|
|
10870 |
|
|
if ($self->{next_input_character} == 116) { # t |
10871 |
|
|
|
10872 |
|
|
if (@{$self->{char}}) { |
10873 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10874 |
|
|
} else { |
10875 |
|
|
$self->{set_next_input_character}->($self); |
10876 |
|
|
} |
10877 |
|
|
|
10878 |
|
|
{ |
10879 |
|
|
$r = {type => 'character', data => qq<\x{00B7}>}; # middot |
10880 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10881 |
|
|
|
10882 |
|
|
if (@{$self->{char}}) { |
10883 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10884 |
|
|
} else { |
10885 |
|
|
$self->{set_next_input_character}->($self); |
10886 |
|
|
} |
10887 |
|
|
|
10888 |
|
|
} else { |
10889 |
|
|
$self->{parse_error}->(); |
10890 |
|
|
## reconsume |
10891 |
|
|
} |
10892 |
|
|
} |
10893 |
|
|
} else { |
10894 |
|
|
$self->{parse_error}->(); |
10895 |
|
|
unshift @{$self->{char}}, (105, 100, 100, 111, $self->{next_input_character}); |
10896 |
|
|
$self->{next_input_character} = 109; |
10897 |
|
|
} |
10898 |
|
|
} else { |
10899 |
|
|
$self->{parse_error}->(); |
10900 |
|
|
unshift @{$self->{char}}, (105, 100, 100, $self->{next_input_character}); |
10901 |
|
|
$self->{next_input_character} = 109; |
10902 |
|
|
} |
10903 |
|
|
} else { |
10904 |
|
|
$self->{parse_error}->(); |
10905 |
|
|
unshift @{$self->{char}}, (105, 100, $self->{next_input_character}); |
10906 |
|
|
$self->{next_input_character} = 109; |
10907 |
|
|
} |
10908 |
|
|
} elsif ($self->{next_input_character} == 110) { # n |
10909 |
|
|
|
10910 |
|
|
if (@{$self->{char}}) { |
10911 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10912 |
|
|
} else { |
10913 |
|
|
$self->{set_next_input_character}->($self); |
10914 |
|
|
} |
10915 |
|
|
|
10916 |
|
|
if ($self->{next_input_character} == 117) { # u |
10917 |
|
|
|
10918 |
|
|
if (@{$self->{char}}) { |
10919 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10920 |
|
|
} else { |
10921 |
|
|
$self->{set_next_input_character}->($self); |
10922 |
|
|
} |
10923 |
|
|
|
10924 |
|
|
if ($self->{next_input_character} == 115) { # s |
10925 |
|
|
|
10926 |
|
|
if (@{$self->{char}}) { |
10927 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10928 |
|
|
} else { |
10929 |
|
|
$self->{set_next_input_character}->($self); |
10930 |
|
|
} |
10931 |
|
|
|
10932 |
|
|
{ |
10933 |
|
|
$r = {type => 'character', data => qq<\x{2212}>}; # minus |
10934 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10935 |
|
|
|
10936 |
|
|
if (@{$self->{char}}) { |
10937 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10938 |
|
|
} else { |
10939 |
|
|
$self->{set_next_input_character}->($self); |
10940 |
|
|
} |
10941 |
|
|
|
10942 |
|
|
} else { |
10943 |
|
|
$self->{parse_error}->(); |
10944 |
|
|
## reconsume |
10945 |
|
|
} |
10946 |
|
|
} |
10947 |
|
|
} else { |
10948 |
|
|
$self->{parse_error}->(); |
10949 |
|
|
unshift @{$self->{char}}, (105, 110, 117, $self->{next_input_character}); |
10950 |
|
|
$self->{next_input_character} = 109; |
10951 |
|
|
} |
10952 |
|
|
} else { |
10953 |
|
|
$self->{parse_error}->(); |
10954 |
|
|
unshift @{$self->{char}}, (105, 110, $self->{next_input_character}); |
10955 |
|
|
$self->{next_input_character} = 109; |
10956 |
|
|
} |
10957 |
|
|
} else { |
10958 |
|
|
$self->{parse_error}->(); |
10959 |
|
|
unshift @{$self->{char}}, (105, $self->{next_input_character}); |
10960 |
|
|
$self->{next_input_character} = 109; |
10961 |
|
|
} |
10962 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
10963 |
|
|
|
10964 |
|
|
if (@{$self->{char}}) { |
10965 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10966 |
|
|
} else { |
10967 |
|
|
$self->{set_next_input_character}->($self); |
10968 |
|
|
} |
10969 |
|
|
|
10970 |
|
|
{ |
10971 |
|
|
$r = {type => 'character', data => qq<\x{03BC}>}; # mu |
10972 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
10973 |
|
|
|
10974 |
|
|
if (@{$self->{char}}) { |
10975 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10976 |
|
|
} else { |
10977 |
|
|
$self->{set_next_input_character}->($self); |
10978 |
|
|
} |
10979 |
|
|
|
10980 |
|
|
} else { |
10981 |
|
|
$self->{parse_error}->(); |
10982 |
|
|
## reconsume |
10983 |
|
|
} |
10984 |
|
|
} |
10985 |
|
|
} else { |
10986 |
|
|
$self->{parse_error}->(); |
10987 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
10988 |
|
|
$self->{next_input_character} = 109; |
10989 |
|
|
} |
10990 |
|
|
} elsif ($self->{next_input_character} == 110) { # n |
10991 |
|
|
|
10992 |
|
|
if (@{$self->{char}}) { |
10993 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
10994 |
|
|
} else { |
10995 |
|
|
$self->{set_next_input_character}->($self); |
10996 |
|
|
} |
10997 |
|
|
|
10998 |
|
|
if ($self->{next_input_character} == 97) { # a |
10999 |
|
|
|
11000 |
|
|
if (@{$self->{char}}) { |
11001 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11002 |
|
|
} else { |
11003 |
|
|
$self->{set_next_input_character}->($self); |
11004 |
|
|
} |
11005 |
|
|
|
11006 |
|
|
if ($self->{next_input_character} == 98) { # b |
11007 |
|
|
|
11008 |
|
|
if (@{$self->{char}}) { |
11009 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11010 |
|
|
} else { |
11011 |
|
|
$self->{set_next_input_character}->($self); |
11012 |
|
|
} |
11013 |
|
|
|
11014 |
|
|
if ($self->{next_input_character} == 108) { # l |
11015 |
|
|
|
11016 |
|
|
if (@{$self->{char}}) { |
11017 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11018 |
|
|
} else { |
11019 |
|
|
$self->{set_next_input_character}->($self); |
11020 |
|
|
} |
11021 |
|
|
|
11022 |
|
|
if ($self->{next_input_character} == 97) { # a |
11023 |
|
|
|
11024 |
|
|
if (@{$self->{char}}) { |
11025 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11026 |
|
|
} else { |
11027 |
|
|
$self->{set_next_input_character}->($self); |
11028 |
|
|
} |
11029 |
|
|
|
11030 |
|
|
{ |
11031 |
|
|
$r = {type => 'character', data => qq<\x{2207}>}; # nabla |
11032 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11033 |
|
|
|
11034 |
|
|
if (@{$self->{char}}) { |
11035 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11036 |
|
|
} else { |
11037 |
|
|
$self->{set_next_input_character}->($self); |
11038 |
|
|
} |
11039 |
|
|
|
11040 |
|
|
} else { |
11041 |
|
|
$self->{parse_error}->(); |
11042 |
|
|
## reconsume |
11043 |
|
|
} |
11044 |
|
|
} |
11045 |
|
|
} else { |
11046 |
|
|
$self->{parse_error}->(); |
11047 |
|
|
unshift @{$self->{char}}, (97, 98, 108, $self->{next_input_character}); |
11048 |
|
|
$self->{next_input_character} = 110; |
11049 |
|
|
} |
11050 |
|
|
} else { |
11051 |
|
|
$self->{parse_error}->(); |
11052 |
|
|
unshift @{$self->{char}}, (97, 98, $self->{next_input_character}); |
11053 |
|
|
$self->{next_input_character} = 110; |
11054 |
|
|
} |
11055 |
|
|
} else { |
11056 |
|
|
$self->{parse_error}->(); |
11057 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
11058 |
|
|
$self->{next_input_character} = 110; |
11059 |
|
|
} |
11060 |
|
|
} elsif ($self->{next_input_character} == 98) { # b |
11061 |
|
|
|
11062 |
|
|
if (@{$self->{char}}) { |
11063 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11064 |
|
|
} else { |
11065 |
|
|
$self->{set_next_input_character}->($self); |
11066 |
|
|
} |
11067 |
|
|
|
11068 |
|
|
if ($self->{next_input_character} == 115) { # s |
11069 |
|
|
|
11070 |
|
|
if (@{$self->{char}}) { |
11071 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11072 |
|
|
} else { |
11073 |
|
|
$self->{set_next_input_character}->($self); |
11074 |
|
|
} |
11075 |
|
|
|
11076 |
|
|
if ($self->{next_input_character} == 112) { # p |
11077 |
|
|
|
11078 |
|
|
if (@{$self->{char}}) { |
11079 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11080 |
|
|
} else { |
11081 |
|
|
$self->{set_next_input_character}->($self); |
11082 |
|
|
} |
11083 |
|
|
|
11084 |
|
|
{ |
11085 |
|
|
$r = {type => 'character', data => qq<\x{00A0}>}; # nbsp |
11086 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11087 |
|
|
|
11088 |
|
|
if (@{$self->{char}}) { |
11089 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11090 |
|
|
} else { |
11091 |
|
|
$self->{set_next_input_character}->($self); |
11092 |
|
|
} |
11093 |
|
|
|
11094 |
|
|
} else { |
11095 |
|
|
$self->{parse_error}->(); |
11096 |
|
|
## reconsume |
11097 |
|
|
} |
11098 |
|
|
} |
11099 |
|
|
} else { |
11100 |
|
|
$self->{parse_error}->(); |
11101 |
|
|
unshift @{$self->{char}}, (98, 115, $self->{next_input_character}); |
11102 |
|
|
$self->{next_input_character} = 110; |
11103 |
|
|
} |
11104 |
|
|
} else { |
11105 |
|
|
$self->{parse_error}->(); |
11106 |
|
|
unshift @{$self->{char}}, (98, $self->{next_input_character}); |
11107 |
|
|
$self->{next_input_character} = 110; |
11108 |
|
|
} |
11109 |
|
|
} elsif ($self->{next_input_character} == 100) { # d |
11110 |
|
|
|
11111 |
|
|
if (@{$self->{char}}) { |
11112 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11113 |
|
|
} else { |
11114 |
|
|
$self->{set_next_input_character}->($self); |
11115 |
|
|
} |
11116 |
|
|
|
11117 |
|
|
if ($self->{next_input_character} == 97) { # a |
11118 |
|
|
|
11119 |
|
|
if (@{$self->{char}}) { |
11120 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11121 |
|
|
} else { |
11122 |
|
|
$self->{set_next_input_character}->($self); |
11123 |
|
|
} |
11124 |
|
|
|
11125 |
|
|
if ($self->{next_input_character} == 115) { # s |
11126 |
|
|
|
11127 |
|
|
if (@{$self->{char}}) { |
11128 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11129 |
|
|
} else { |
11130 |
|
|
$self->{set_next_input_character}->($self); |
11131 |
|
|
} |
11132 |
|
|
|
11133 |
|
|
if ($self->{next_input_character} == 104) { # h |
11134 |
|
|
|
11135 |
|
|
if (@{$self->{char}}) { |
11136 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11137 |
|
|
} else { |
11138 |
|
|
$self->{set_next_input_character}->($self); |
11139 |
|
|
} |
11140 |
|
|
|
11141 |
|
|
{ |
11142 |
|
|
$r = {type => 'character', data => qq<\x{2013}>}; # ndash |
11143 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11144 |
|
|
|
11145 |
|
|
if (@{$self->{char}}) { |
11146 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11147 |
|
|
} else { |
11148 |
|
|
$self->{set_next_input_character}->($self); |
11149 |
|
|
} |
11150 |
|
|
|
11151 |
|
|
} else { |
11152 |
|
|
$self->{parse_error}->(); |
11153 |
|
|
## reconsume |
11154 |
|
|
} |
11155 |
|
|
} |
11156 |
|
|
} else { |
11157 |
|
|
$self->{parse_error}->(); |
11158 |
|
|
unshift @{$self->{char}}, (100, 97, 115, $self->{next_input_character}); |
11159 |
|
|
$self->{next_input_character} = 110; |
11160 |
|
|
} |
11161 |
|
|
} else { |
11162 |
|
|
$self->{parse_error}->(); |
11163 |
|
|
unshift @{$self->{char}}, (100, 97, $self->{next_input_character}); |
11164 |
|
|
$self->{next_input_character} = 110; |
11165 |
|
|
} |
11166 |
|
|
} else { |
11167 |
|
|
$self->{parse_error}->(); |
11168 |
|
|
unshift @{$self->{char}}, (100, $self->{next_input_character}); |
11169 |
|
|
$self->{next_input_character} = 110; |
11170 |
|
|
} |
11171 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
11172 |
|
|
|
11173 |
|
|
if (@{$self->{char}}) { |
11174 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11175 |
|
|
} else { |
11176 |
|
|
$self->{set_next_input_character}->($self); |
11177 |
|
|
} |
11178 |
|
|
|
11179 |
|
|
{ |
11180 |
|
|
$r = {type => 'character', data => qq<\x{2260}>}; # ne |
11181 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11182 |
|
|
|
11183 |
|
|
if (@{$self->{char}}) { |
11184 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11185 |
|
|
} else { |
11186 |
|
|
$self->{set_next_input_character}->($self); |
11187 |
|
|
} |
11188 |
|
|
|
11189 |
|
|
} else { |
11190 |
|
|
$self->{parse_error}->(); |
11191 |
|
|
## reconsume |
11192 |
|
|
} |
11193 |
|
|
} |
11194 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
11195 |
|
|
|
11196 |
|
|
if (@{$self->{char}}) { |
11197 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11198 |
|
|
} else { |
11199 |
|
|
$self->{set_next_input_character}->($self); |
11200 |
|
|
} |
11201 |
|
|
|
11202 |
|
|
{ |
11203 |
|
|
$r = {type => 'character', data => qq<\x{220B}>}; # ni |
11204 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11205 |
|
|
|
11206 |
|
|
if (@{$self->{char}}) { |
11207 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11208 |
|
|
} else { |
11209 |
|
|
$self->{set_next_input_character}->($self); |
11210 |
|
|
} |
11211 |
|
|
|
11212 |
|
|
} else { |
11213 |
|
|
$self->{parse_error}->(); |
11214 |
|
|
## reconsume |
11215 |
|
|
} |
11216 |
|
|
} |
11217 |
|
|
} elsif ($self->{next_input_character} == 111) { # o |
11218 |
|
|
|
11219 |
|
|
if (@{$self->{char}}) { |
11220 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11221 |
|
|
} else { |
11222 |
|
|
$self->{set_next_input_character}->($self); |
11223 |
|
|
} |
11224 |
|
|
|
11225 |
|
|
if ($self->{next_input_character} == 116) { # t |
11226 |
|
|
|
11227 |
|
|
if (@{$self->{char}}) { |
11228 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11229 |
|
|
} else { |
11230 |
|
|
$self->{set_next_input_character}->($self); |
11231 |
|
|
} |
11232 |
|
|
|
11233 |
|
|
if ($self->{next_input_character} == 105) { # i |
11234 |
|
|
|
11235 |
|
|
if (@{$self->{char}}) { |
11236 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11237 |
|
|
} else { |
11238 |
|
|
$self->{set_next_input_character}->($self); |
11239 |
|
|
} |
11240 |
|
|
|
11241 |
|
|
if ($self->{next_input_character} == 110) { # n |
11242 |
|
|
|
11243 |
|
|
if (@{$self->{char}}) { |
11244 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11245 |
|
|
} else { |
11246 |
|
|
$self->{set_next_input_character}->($self); |
11247 |
|
|
} |
11248 |
|
|
|
11249 |
|
|
{ |
11250 |
|
|
$r = {type => 'character', data => qq<\x{2209}>}; # notin |
11251 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11252 |
|
|
|
11253 |
|
|
if (@{$self->{char}}) { |
11254 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11255 |
|
|
} else { |
11256 |
|
|
$self->{set_next_input_character}->($self); |
11257 |
|
|
} |
11258 |
|
|
|
11259 |
|
|
} else { |
11260 |
|
|
$self->{parse_error}->(); |
11261 |
|
|
## reconsume |
11262 |
|
|
} |
11263 |
|
|
} |
11264 |
|
|
} else { |
11265 |
|
|
$self->{parse_error}->(); |
11266 |
|
|
unshift @{$self->{char}}, (111, 116, 105, $self->{next_input_character}); |
11267 |
|
|
$self->{next_input_character} = 110; |
11268 |
|
|
} |
11269 |
|
|
} else { |
11270 |
|
|
$r = {type => 'character', data => qq<\x{00AC}>}; # not |
11271 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11272 |
|
|
|
11273 |
|
|
if (@{$self->{char}}) { |
11274 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11275 |
|
|
} else { |
11276 |
|
|
$self->{set_next_input_character}->($self); |
11277 |
|
|
} |
11278 |
|
|
|
11279 |
|
|
} else { |
11280 |
|
|
$self->{parse_error}->(); |
11281 |
|
|
## reconsume |
11282 |
|
|
} |
11283 |
|
|
} |
11284 |
|
|
} else { |
11285 |
|
|
$self->{parse_error}->(); |
11286 |
|
|
unshift @{$self->{char}}, (111, $self->{next_input_character}); |
11287 |
|
|
$self->{next_input_character} = 110; |
11288 |
|
|
} |
11289 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
11290 |
|
|
|
11291 |
|
|
if (@{$self->{char}}) { |
11292 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11293 |
|
|
} else { |
11294 |
|
|
$self->{set_next_input_character}->($self); |
11295 |
|
|
} |
11296 |
|
|
|
11297 |
|
|
if ($self->{next_input_character} == 117) { # u |
11298 |
|
|
|
11299 |
|
|
if (@{$self->{char}}) { |
11300 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11301 |
|
|
} else { |
11302 |
|
|
$self->{set_next_input_character}->($self); |
11303 |
|
|
} |
11304 |
|
|
|
11305 |
|
|
if ($self->{next_input_character} == 98) { # b |
11306 |
|
|
|
11307 |
|
|
if (@{$self->{char}}) { |
11308 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11309 |
|
|
} else { |
11310 |
|
|
$self->{set_next_input_character}->($self); |
11311 |
|
|
} |
11312 |
|
|
|
11313 |
|
|
{ |
11314 |
|
|
$r = {type => 'character', data => qq<\x{2284}>}; # nsub |
11315 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11316 |
|
|
|
11317 |
|
|
if (@{$self->{char}}) { |
11318 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11319 |
|
|
} else { |
11320 |
|
|
$self->{set_next_input_character}->($self); |
11321 |
|
|
} |
11322 |
|
|
|
11323 |
|
|
} else { |
11324 |
|
|
$self->{parse_error}->(); |
11325 |
|
|
## reconsume |
11326 |
|
|
} |
11327 |
|
|
} |
11328 |
|
|
} else { |
11329 |
|
|
$self->{parse_error}->(); |
11330 |
|
|
unshift @{$self->{char}}, (115, 117, $self->{next_input_character}); |
11331 |
|
|
$self->{next_input_character} = 110; |
11332 |
|
|
} |
11333 |
|
|
} else { |
11334 |
|
|
$self->{parse_error}->(); |
11335 |
|
|
unshift @{$self->{char}}, (115, $self->{next_input_character}); |
11336 |
|
|
$self->{next_input_character} = 110; |
11337 |
|
|
} |
11338 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
11339 |
|
|
|
11340 |
|
|
if (@{$self->{char}}) { |
11341 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11342 |
|
|
} else { |
11343 |
|
|
$self->{set_next_input_character}->($self); |
11344 |
|
|
} |
11345 |
|
|
|
11346 |
|
|
if ($self->{next_input_character} == 105) { # i |
11347 |
|
|
|
11348 |
|
|
if (@{$self->{char}}) { |
11349 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11350 |
|
|
} else { |
11351 |
|
|
$self->{set_next_input_character}->($self); |
11352 |
|
|
} |
11353 |
|
|
|
11354 |
|
|
if ($self->{next_input_character} == 108) { # l |
11355 |
|
|
|
11356 |
|
|
if (@{$self->{char}}) { |
11357 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11358 |
|
|
} else { |
11359 |
|
|
$self->{set_next_input_character}->($self); |
11360 |
|
|
} |
11361 |
|
|
|
11362 |
|
|
if ($self->{next_input_character} == 100) { # d |
11363 |
|
|
|
11364 |
|
|
if (@{$self->{char}}) { |
11365 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11366 |
|
|
} else { |
11367 |
|
|
$self->{set_next_input_character}->($self); |
11368 |
|
|
} |
11369 |
|
|
|
11370 |
|
|
if ($self->{next_input_character} == 101) { # e |
11371 |
|
|
|
11372 |
|
|
if (@{$self->{char}}) { |
11373 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11374 |
|
|
} else { |
11375 |
|
|
$self->{set_next_input_character}->($self); |
11376 |
|
|
} |
11377 |
|
|
|
11378 |
|
|
{ |
11379 |
|
|
$r = {type => 'character', data => qq<\x{00F1}>}; # ntilde |
11380 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11381 |
|
|
|
11382 |
|
|
if (@{$self->{char}}) { |
11383 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11384 |
|
|
} else { |
11385 |
|
|
$self->{set_next_input_character}->($self); |
11386 |
|
|
} |
11387 |
|
|
|
11388 |
|
|
} else { |
11389 |
|
|
$self->{parse_error}->(); |
11390 |
|
|
## reconsume |
11391 |
|
|
} |
11392 |
|
|
} |
11393 |
|
|
} else { |
11394 |
|
|
$self->{parse_error}->(); |
11395 |
|
|
unshift @{$self->{char}}, (116, 105, 108, 100, $self->{next_input_character}); |
11396 |
|
|
$self->{next_input_character} = 110; |
11397 |
|
|
} |
11398 |
|
|
} else { |
11399 |
|
|
$self->{parse_error}->(); |
11400 |
|
|
unshift @{$self->{char}}, (116, 105, 108, $self->{next_input_character}); |
11401 |
|
|
$self->{next_input_character} = 110; |
11402 |
|
|
} |
11403 |
|
|
} else { |
11404 |
|
|
$self->{parse_error}->(); |
11405 |
|
|
unshift @{$self->{char}}, (116, 105, $self->{next_input_character}); |
11406 |
|
|
$self->{next_input_character} = 110; |
11407 |
|
|
} |
11408 |
|
|
} else { |
11409 |
|
|
$self->{parse_error}->(); |
11410 |
|
|
unshift @{$self->{char}}, (116, $self->{next_input_character}); |
11411 |
|
|
$self->{next_input_character} = 110; |
11412 |
|
|
} |
11413 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
11414 |
|
|
|
11415 |
|
|
if (@{$self->{char}}) { |
11416 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11417 |
|
|
} else { |
11418 |
|
|
$self->{set_next_input_character}->($self); |
11419 |
|
|
} |
11420 |
|
|
|
11421 |
|
|
{ |
11422 |
|
|
$r = {type => 'character', data => qq<\x{03BD}>}; # nu |
11423 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11424 |
|
|
|
11425 |
|
|
if (@{$self->{char}}) { |
11426 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11427 |
|
|
} else { |
11428 |
|
|
$self->{set_next_input_character}->($self); |
11429 |
|
|
} |
11430 |
|
|
|
11431 |
|
|
} else { |
11432 |
|
|
$self->{parse_error}->(); |
11433 |
|
|
## reconsume |
11434 |
|
|
} |
11435 |
|
|
} |
11436 |
|
|
} else { |
11437 |
|
|
$self->{parse_error}->(); |
11438 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
11439 |
|
|
$self->{next_input_character} = 110; |
11440 |
|
|
} |
11441 |
|
|
} elsif ($self->{next_input_character} == 111) { # o |
11442 |
|
|
|
11443 |
|
|
if (@{$self->{char}}) { |
11444 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11445 |
|
|
} else { |
11446 |
|
|
$self->{set_next_input_character}->($self); |
11447 |
|
|
} |
11448 |
|
|
|
11449 |
|
|
if ($self->{next_input_character} == 97) { # a |
11450 |
|
|
|
11451 |
|
|
if (@{$self->{char}}) { |
11452 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11453 |
|
|
} else { |
11454 |
|
|
$self->{set_next_input_character}->($self); |
11455 |
|
|
} |
11456 |
|
|
|
11457 |
|
|
if ($self->{next_input_character} == 99) { # c |
11458 |
|
|
|
11459 |
|
|
if (@{$self->{char}}) { |
11460 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11461 |
|
|
} else { |
11462 |
|
|
$self->{set_next_input_character}->($self); |
11463 |
|
|
} |
11464 |
|
|
|
11465 |
|
|
if ($self->{next_input_character} == 117) { # u |
11466 |
|
|
|
11467 |
|
|
if (@{$self->{char}}) { |
11468 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11469 |
|
|
} else { |
11470 |
|
|
$self->{set_next_input_character}->($self); |
11471 |
|
|
} |
11472 |
|
|
|
11473 |
|
|
if ($self->{next_input_character} == 116) { # t |
11474 |
|
|
|
11475 |
|
|
if (@{$self->{char}}) { |
11476 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11477 |
|
|
} else { |
11478 |
|
|
$self->{set_next_input_character}->($self); |
11479 |
|
|
} |
11480 |
|
|
|
11481 |
|
|
if ($self->{next_input_character} == 101) { # e |
11482 |
|
|
|
11483 |
|
|
if (@{$self->{char}}) { |
11484 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11485 |
|
|
} else { |
11486 |
|
|
$self->{set_next_input_character}->($self); |
11487 |
|
|
} |
11488 |
|
|
|
11489 |
|
|
{ |
11490 |
|
|
$r = {type => 'character', data => qq<\x{00F3}>}; # oacute |
11491 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11492 |
|
|
|
11493 |
|
|
if (@{$self->{char}}) { |
11494 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11495 |
|
|
} else { |
11496 |
|
|
$self->{set_next_input_character}->($self); |
11497 |
|
|
} |
11498 |
|
|
|
11499 |
|
|
} else { |
11500 |
|
|
$self->{parse_error}->(); |
11501 |
|
|
## reconsume |
11502 |
|
|
} |
11503 |
|
|
} |
11504 |
|
|
} else { |
11505 |
|
|
$self->{parse_error}->(); |
11506 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
11507 |
|
|
$self->{next_input_character} = 111; |
11508 |
|
|
} |
11509 |
|
|
} else { |
11510 |
|
|
$self->{parse_error}->(); |
11511 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
11512 |
|
|
$self->{next_input_character} = 111; |
11513 |
|
|
} |
11514 |
|
|
} else { |
11515 |
|
|
$self->{parse_error}->(); |
11516 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
11517 |
|
|
$self->{next_input_character} = 111; |
11518 |
|
|
} |
11519 |
|
|
} else { |
11520 |
|
|
$self->{parse_error}->(); |
11521 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
11522 |
|
|
$self->{next_input_character} = 111; |
11523 |
|
|
} |
11524 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
11525 |
|
|
|
11526 |
|
|
if (@{$self->{char}}) { |
11527 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11528 |
|
|
} else { |
11529 |
|
|
$self->{set_next_input_character}->($self); |
11530 |
|
|
} |
11531 |
|
|
|
11532 |
|
|
if ($self->{next_input_character} == 105) { # i |
11533 |
|
|
|
11534 |
|
|
if (@{$self->{char}}) { |
11535 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11536 |
|
|
} else { |
11537 |
|
|
$self->{set_next_input_character}->($self); |
11538 |
|
|
} |
11539 |
|
|
|
11540 |
|
|
if ($self->{next_input_character} == 114) { # r |
11541 |
|
|
|
11542 |
|
|
if (@{$self->{char}}) { |
11543 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11544 |
|
|
} else { |
11545 |
|
|
$self->{set_next_input_character}->($self); |
11546 |
|
|
} |
11547 |
|
|
|
11548 |
|
|
if ($self->{next_input_character} == 99) { # c |
11549 |
|
|
|
11550 |
|
|
if (@{$self->{char}}) { |
11551 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11552 |
|
|
} else { |
11553 |
|
|
$self->{set_next_input_character}->($self); |
11554 |
|
|
} |
11555 |
|
|
|
11556 |
|
|
{ |
11557 |
|
|
$r = {type => 'character', data => qq<\x{00F4}>}; # ocirc |
11558 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11559 |
|
|
|
11560 |
|
|
if (@{$self->{char}}) { |
11561 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11562 |
|
|
} else { |
11563 |
|
|
$self->{set_next_input_character}->($self); |
11564 |
|
|
} |
11565 |
|
|
|
11566 |
|
|
} else { |
11567 |
|
|
$self->{parse_error}->(); |
11568 |
|
|
## reconsume |
11569 |
|
|
} |
11570 |
|
|
} |
11571 |
|
|
} else { |
11572 |
|
|
$self->{parse_error}->(); |
11573 |
|
|
unshift @{$self->{char}}, (99, 105, 114, $self->{next_input_character}); |
11574 |
|
|
$self->{next_input_character} = 111; |
11575 |
|
|
} |
11576 |
|
|
} else { |
11577 |
|
|
$self->{parse_error}->(); |
11578 |
|
|
unshift @{$self->{char}}, (99, 105, $self->{next_input_character}); |
11579 |
|
|
$self->{next_input_character} = 111; |
11580 |
|
|
} |
11581 |
|
|
} else { |
11582 |
|
|
$self->{parse_error}->(); |
11583 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
11584 |
|
|
$self->{next_input_character} = 111; |
11585 |
|
|
} |
11586 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
11587 |
|
|
|
11588 |
|
|
if (@{$self->{char}}) { |
11589 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11590 |
|
|
} else { |
11591 |
|
|
$self->{set_next_input_character}->($self); |
11592 |
|
|
} |
11593 |
|
|
|
11594 |
|
|
if ($self->{next_input_character} == 108) { # l |
11595 |
|
|
|
11596 |
|
|
if (@{$self->{char}}) { |
11597 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11598 |
|
|
} else { |
11599 |
|
|
$self->{set_next_input_character}->($self); |
11600 |
|
|
} |
11601 |
|
|
|
11602 |
|
|
if ($self->{next_input_character} == 105) { # i |
11603 |
|
|
|
11604 |
|
|
if (@{$self->{char}}) { |
11605 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11606 |
|
|
} else { |
11607 |
|
|
$self->{set_next_input_character}->($self); |
11608 |
|
|
} |
11609 |
|
|
|
11610 |
|
|
if ($self->{next_input_character} == 103) { # g |
11611 |
|
|
|
11612 |
|
|
if (@{$self->{char}}) { |
11613 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11614 |
|
|
} else { |
11615 |
|
|
$self->{set_next_input_character}->($self); |
11616 |
|
|
} |
11617 |
|
|
|
11618 |
|
|
{ |
11619 |
|
|
$r = {type => 'character', data => qq<\x{0153}>}; # oelig |
11620 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11621 |
|
|
|
11622 |
|
|
if (@{$self->{char}}) { |
11623 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11624 |
|
|
} else { |
11625 |
|
|
$self->{set_next_input_character}->($self); |
11626 |
|
|
} |
11627 |
|
|
|
11628 |
|
|
} else { |
11629 |
|
|
$self->{parse_error}->(); |
11630 |
|
|
## reconsume |
11631 |
|
|
} |
11632 |
|
|
} |
11633 |
|
|
} else { |
11634 |
|
|
$self->{parse_error}->(); |
11635 |
|
|
unshift @{$self->{char}}, (101, 108, 105, $self->{next_input_character}); |
11636 |
|
|
$self->{next_input_character} = 111; |
11637 |
|
|
} |
11638 |
|
|
} else { |
11639 |
|
|
$self->{parse_error}->(); |
11640 |
|
|
unshift @{$self->{char}}, (101, 108, $self->{next_input_character}); |
11641 |
|
|
$self->{next_input_character} = 111; |
11642 |
|
|
} |
11643 |
|
|
} else { |
11644 |
|
|
$self->{parse_error}->(); |
11645 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
11646 |
|
|
$self->{next_input_character} = 111; |
11647 |
|
|
} |
11648 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
11649 |
|
|
|
11650 |
|
|
if (@{$self->{char}}) { |
11651 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11652 |
|
|
} else { |
11653 |
|
|
$self->{set_next_input_character}->($self); |
11654 |
|
|
} |
11655 |
|
|
|
11656 |
|
|
if ($self->{next_input_character} == 114) { # r |
11657 |
|
|
|
11658 |
|
|
if (@{$self->{char}}) { |
11659 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11660 |
|
|
} else { |
11661 |
|
|
$self->{set_next_input_character}->($self); |
11662 |
|
|
} |
11663 |
|
|
|
11664 |
|
|
if ($self->{next_input_character} == 97) { # a |
11665 |
|
|
|
11666 |
|
|
if (@{$self->{char}}) { |
11667 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11668 |
|
|
} else { |
11669 |
|
|
$self->{set_next_input_character}->($self); |
11670 |
|
|
} |
11671 |
|
|
|
11672 |
|
|
if ($self->{next_input_character} == 118) { # v |
11673 |
|
|
|
11674 |
|
|
if (@{$self->{char}}) { |
11675 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11676 |
|
|
} else { |
11677 |
|
|
$self->{set_next_input_character}->($self); |
11678 |
|
|
} |
11679 |
|
|
|
11680 |
|
|
if ($self->{next_input_character} == 101) { # e |
11681 |
|
|
|
11682 |
|
|
if (@{$self->{char}}) { |
11683 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11684 |
|
|
} else { |
11685 |
|
|
$self->{set_next_input_character}->($self); |
11686 |
|
|
} |
11687 |
|
|
|
11688 |
|
|
{ |
11689 |
|
|
$r = {type => 'character', data => qq<\x{00F2}>}; # ograve |
11690 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11691 |
|
|
|
11692 |
|
|
if (@{$self->{char}}) { |
11693 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11694 |
|
|
} else { |
11695 |
|
|
$self->{set_next_input_character}->($self); |
11696 |
|
|
} |
11697 |
|
|
|
11698 |
|
|
} else { |
11699 |
|
|
$self->{parse_error}->(); |
11700 |
|
|
## reconsume |
11701 |
|
|
} |
11702 |
|
|
} |
11703 |
|
|
} else { |
11704 |
|
|
$self->{parse_error}->(); |
11705 |
|
|
unshift @{$self->{char}}, (103, 114, 97, 118, $self->{next_input_character}); |
11706 |
|
|
$self->{next_input_character} = 111; |
11707 |
|
|
} |
11708 |
|
|
} else { |
11709 |
|
|
$self->{parse_error}->(); |
11710 |
|
|
unshift @{$self->{char}}, (103, 114, 97, $self->{next_input_character}); |
11711 |
|
|
$self->{next_input_character} = 111; |
11712 |
|
|
} |
11713 |
|
|
} else { |
11714 |
|
|
$self->{parse_error}->(); |
11715 |
|
|
unshift @{$self->{char}}, (103, 114, $self->{next_input_character}); |
11716 |
|
|
$self->{next_input_character} = 111; |
11717 |
|
|
} |
11718 |
|
|
} else { |
11719 |
|
|
$self->{parse_error}->(); |
11720 |
|
|
unshift @{$self->{char}}, (103, $self->{next_input_character}); |
11721 |
|
|
$self->{next_input_character} = 111; |
11722 |
|
|
} |
11723 |
|
|
} elsif ($self->{next_input_character} == 108) { # l |
11724 |
|
|
|
11725 |
|
|
if (@{$self->{char}}) { |
11726 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11727 |
|
|
} else { |
11728 |
|
|
$self->{set_next_input_character}->($self); |
11729 |
|
|
} |
11730 |
|
|
|
11731 |
|
|
if ($self->{next_input_character} == 105) { # i |
11732 |
|
|
|
11733 |
|
|
if (@{$self->{char}}) { |
11734 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11735 |
|
|
} else { |
11736 |
|
|
$self->{set_next_input_character}->($self); |
11737 |
|
|
} |
11738 |
|
|
|
11739 |
|
|
if ($self->{next_input_character} == 110) { # n |
11740 |
|
|
|
11741 |
|
|
if (@{$self->{char}}) { |
11742 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11743 |
|
|
} else { |
11744 |
|
|
$self->{set_next_input_character}->($self); |
11745 |
|
|
} |
11746 |
|
|
|
11747 |
|
|
if ($self->{next_input_character} == 101) { # e |
11748 |
|
|
|
11749 |
|
|
if (@{$self->{char}}) { |
11750 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11751 |
|
|
} else { |
11752 |
|
|
$self->{set_next_input_character}->($self); |
11753 |
|
|
} |
11754 |
|
|
|
11755 |
|
|
{ |
11756 |
|
|
$r = {type => 'character', data => qq<\x{203E}>}; # oline |
11757 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11758 |
|
|
|
11759 |
|
|
if (@{$self->{char}}) { |
11760 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11761 |
|
|
} else { |
11762 |
|
|
$self->{set_next_input_character}->($self); |
11763 |
|
|
} |
11764 |
|
|
|
11765 |
|
|
} else { |
11766 |
|
|
$self->{parse_error}->(); |
11767 |
|
|
## reconsume |
11768 |
|
|
} |
11769 |
|
|
} |
11770 |
|
|
} else { |
11771 |
|
|
$self->{parse_error}->(); |
11772 |
|
|
unshift @{$self->{char}}, (108, 105, 110, $self->{next_input_character}); |
11773 |
|
|
$self->{next_input_character} = 111; |
11774 |
|
|
} |
11775 |
|
|
} else { |
11776 |
|
|
$self->{parse_error}->(); |
11777 |
|
|
unshift @{$self->{char}}, (108, 105, $self->{next_input_character}); |
11778 |
|
|
$self->{next_input_character} = 111; |
11779 |
|
|
} |
11780 |
|
|
} else { |
11781 |
|
|
$self->{parse_error}->(); |
11782 |
|
|
unshift @{$self->{char}}, (108, $self->{next_input_character}); |
11783 |
|
|
$self->{next_input_character} = 111; |
11784 |
|
|
} |
11785 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
11786 |
|
|
|
11787 |
|
|
if (@{$self->{char}}) { |
11788 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11789 |
|
|
} else { |
11790 |
|
|
$self->{set_next_input_character}->($self); |
11791 |
|
|
} |
11792 |
|
|
|
11793 |
|
|
if ($self->{next_input_character} == 101) { # e |
11794 |
|
|
|
11795 |
|
|
if (@{$self->{char}}) { |
11796 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11797 |
|
|
} else { |
11798 |
|
|
$self->{set_next_input_character}->($self); |
11799 |
|
|
} |
11800 |
|
|
|
11801 |
|
|
if ($self->{next_input_character} == 103) { # g |
11802 |
|
|
|
11803 |
|
|
if (@{$self->{char}}) { |
11804 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11805 |
|
|
} else { |
11806 |
|
|
$self->{set_next_input_character}->($self); |
11807 |
|
|
} |
11808 |
|
|
|
11809 |
|
|
if ($self->{next_input_character} == 97) { # a |
11810 |
|
|
|
11811 |
|
|
if (@{$self->{char}}) { |
11812 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11813 |
|
|
} else { |
11814 |
|
|
$self->{set_next_input_character}->($self); |
11815 |
|
|
} |
11816 |
|
|
|
11817 |
|
|
{ |
11818 |
|
|
$r = {type => 'character', data => qq<\x{03C9}>}; # omega |
11819 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11820 |
|
|
|
11821 |
|
|
if (@{$self->{char}}) { |
11822 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11823 |
|
|
} else { |
11824 |
|
|
$self->{set_next_input_character}->($self); |
11825 |
|
|
} |
11826 |
|
|
|
11827 |
|
|
} else { |
11828 |
|
|
$self->{parse_error}->(); |
11829 |
|
|
## reconsume |
11830 |
|
|
} |
11831 |
|
|
} |
11832 |
|
|
} else { |
11833 |
|
|
$self->{parse_error}->(); |
11834 |
|
|
unshift @{$self->{char}}, (109, 101, 103, $self->{next_input_character}); |
11835 |
|
|
$self->{next_input_character} = 111; |
11836 |
|
|
} |
11837 |
|
|
} else { |
11838 |
|
|
$self->{parse_error}->(); |
11839 |
|
|
unshift @{$self->{char}}, (109, 101, $self->{next_input_character}); |
11840 |
|
|
$self->{next_input_character} = 111; |
11841 |
|
|
} |
11842 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
11843 |
|
|
|
11844 |
|
|
if (@{$self->{char}}) { |
11845 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11846 |
|
|
} else { |
11847 |
|
|
$self->{set_next_input_character}->($self); |
11848 |
|
|
} |
11849 |
|
|
|
11850 |
|
|
if ($self->{next_input_character} == 99) { # c |
11851 |
|
|
|
11852 |
|
|
if (@{$self->{char}}) { |
11853 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11854 |
|
|
} else { |
11855 |
|
|
$self->{set_next_input_character}->($self); |
11856 |
|
|
} |
11857 |
|
|
|
11858 |
|
|
if ($self->{next_input_character} == 114) { # r |
11859 |
|
|
|
11860 |
|
|
if (@{$self->{char}}) { |
11861 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11862 |
|
|
} else { |
11863 |
|
|
$self->{set_next_input_character}->($self); |
11864 |
|
|
} |
11865 |
|
|
|
11866 |
|
|
if ($self->{next_input_character} == 111) { # o |
11867 |
|
|
|
11868 |
|
|
if (@{$self->{char}}) { |
11869 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11870 |
|
|
} else { |
11871 |
|
|
$self->{set_next_input_character}->($self); |
11872 |
|
|
} |
11873 |
|
|
|
11874 |
|
|
if ($self->{next_input_character} == 110) { # n |
11875 |
|
|
|
11876 |
|
|
if (@{$self->{char}}) { |
11877 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11878 |
|
|
} else { |
11879 |
|
|
$self->{set_next_input_character}->($self); |
11880 |
|
|
} |
11881 |
|
|
|
11882 |
|
|
{ |
11883 |
|
|
$r = {type => 'character', data => qq<\x{03BF}>}; # omicron |
11884 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11885 |
|
|
|
11886 |
|
|
if (@{$self->{char}}) { |
11887 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11888 |
|
|
} else { |
11889 |
|
|
$self->{set_next_input_character}->($self); |
11890 |
|
|
} |
11891 |
|
|
|
11892 |
|
|
} else { |
11893 |
|
|
$self->{parse_error}->(); |
11894 |
|
|
## reconsume |
11895 |
|
|
} |
11896 |
|
|
} |
11897 |
|
|
} else { |
11898 |
|
|
$self->{parse_error}->(); |
11899 |
|
|
unshift @{$self->{char}}, (109, 105, 99, 114, 111, $self->{next_input_character}); |
11900 |
|
|
$self->{next_input_character} = 111; |
11901 |
|
|
} |
11902 |
|
|
} else { |
11903 |
|
|
$self->{parse_error}->(); |
11904 |
|
|
unshift @{$self->{char}}, (109, 105, 99, 114, $self->{next_input_character}); |
11905 |
|
|
$self->{next_input_character} = 111; |
11906 |
|
|
} |
11907 |
|
|
} else { |
11908 |
|
|
$self->{parse_error}->(); |
11909 |
|
|
unshift @{$self->{char}}, (109, 105, 99, $self->{next_input_character}); |
11910 |
|
|
$self->{next_input_character} = 111; |
11911 |
|
|
} |
11912 |
|
|
} else { |
11913 |
|
|
$self->{parse_error}->(); |
11914 |
|
|
unshift @{$self->{char}}, (109, 105, $self->{next_input_character}); |
11915 |
|
|
$self->{next_input_character} = 111; |
11916 |
|
|
} |
11917 |
|
|
} else { |
11918 |
|
|
$self->{parse_error}->(); |
11919 |
|
|
unshift @{$self->{char}}, (109, $self->{next_input_character}); |
11920 |
|
|
$self->{next_input_character} = 111; |
11921 |
|
|
} |
11922 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
11923 |
|
|
|
11924 |
|
|
if (@{$self->{char}}) { |
11925 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11926 |
|
|
} else { |
11927 |
|
|
$self->{set_next_input_character}->($self); |
11928 |
|
|
} |
11929 |
|
|
|
11930 |
|
|
if ($self->{next_input_character} == 108) { # l |
11931 |
|
|
|
11932 |
|
|
if (@{$self->{char}}) { |
11933 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11934 |
|
|
} else { |
11935 |
|
|
$self->{set_next_input_character}->($self); |
11936 |
|
|
} |
11937 |
|
|
|
11938 |
|
|
if ($self->{next_input_character} == 117) { # u |
11939 |
|
|
|
11940 |
|
|
if (@{$self->{char}}) { |
11941 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11942 |
|
|
} else { |
11943 |
|
|
$self->{set_next_input_character}->($self); |
11944 |
|
|
} |
11945 |
|
|
|
11946 |
|
|
if ($self->{next_input_character} == 115) { # s |
11947 |
|
|
|
11948 |
|
|
if (@{$self->{char}}) { |
11949 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11950 |
|
|
} else { |
11951 |
|
|
$self->{set_next_input_character}->($self); |
11952 |
|
|
} |
11953 |
|
|
|
11954 |
|
|
{ |
11955 |
|
|
$r = {type => 'character', data => qq<\x{2295}>}; # oplus |
11956 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
11957 |
|
|
|
11958 |
|
|
if (@{$self->{char}}) { |
11959 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11960 |
|
|
} else { |
11961 |
|
|
$self->{set_next_input_character}->($self); |
11962 |
|
|
} |
11963 |
|
|
|
11964 |
|
|
} else { |
11965 |
|
|
$self->{parse_error}->(); |
11966 |
|
|
## reconsume |
11967 |
|
|
} |
11968 |
|
|
} |
11969 |
|
|
} else { |
11970 |
|
|
$self->{parse_error}->(); |
11971 |
|
|
unshift @{$self->{char}}, (112, 108, 117, $self->{next_input_character}); |
11972 |
|
|
$self->{next_input_character} = 111; |
11973 |
|
|
} |
11974 |
|
|
} else { |
11975 |
|
|
$self->{parse_error}->(); |
11976 |
|
|
unshift @{$self->{char}}, (112, 108, $self->{next_input_character}); |
11977 |
|
|
$self->{next_input_character} = 111; |
11978 |
|
|
} |
11979 |
|
|
} else { |
11980 |
|
|
$self->{parse_error}->(); |
11981 |
|
|
unshift @{$self->{char}}, (112, $self->{next_input_character}); |
11982 |
|
|
$self->{next_input_character} = 111; |
11983 |
|
|
} |
11984 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
11985 |
|
|
|
11986 |
|
|
if (@{$self->{char}}) { |
11987 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11988 |
|
|
} else { |
11989 |
|
|
$self->{set_next_input_character}->($self); |
11990 |
|
|
} |
11991 |
|
|
|
11992 |
|
|
if ($self->{next_input_character} == 100) { # d |
11993 |
|
|
|
11994 |
|
|
if (@{$self->{char}}) { |
11995 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
11996 |
|
|
} else { |
11997 |
|
|
$self->{set_next_input_character}->($self); |
11998 |
|
|
} |
11999 |
|
|
|
12000 |
|
|
if ($self->{next_input_character} == 102) { # f |
12001 |
|
|
|
12002 |
|
|
if (@{$self->{char}}) { |
12003 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12004 |
|
|
} else { |
12005 |
|
|
$self->{set_next_input_character}->($self); |
12006 |
|
|
} |
12007 |
|
|
|
12008 |
|
|
{ |
12009 |
|
|
$r = {type => 'character', data => qq<\x{00AA}>}; # ordf |
12010 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12011 |
|
|
|
12012 |
|
|
if (@{$self->{char}}) { |
12013 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12014 |
|
|
} else { |
12015 |
|
|
$self->{set_next_input_character}->($self); |
12016 |
|
|
} |
12017 |
|
|
|
12018 |
|
|
} else { |
12019 |
|
|
$self->{parse_error}->(); |
12020 |
|
|
## reconsume |
12021 |
|
|
} |
12022 |
|
|
} |
12023 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
12024 |
|
|
|
12025 |
|
|
if (@{$self->{char}}) { |
12026 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12027 |
|
|
} else { |
12028 |
|
|
$self->{set_next_input_character}->($self); |
12029 |
|
|
} |
12030 |
|
|
|
12031 |
|
|
{ |
12032 |
|
|
$r = {type => 'character', data => qq<\x{00BA}>}; # ordm |
12033 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12034 |
|
|
|
12035 |
|
|
if (@{$self->{char}}) { |
12036 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12037 |
|
|
} else { |
12038 |
|
|
$self->{set_next_input_character}->($self); |
12039 |
|
|
} |
12040 |
|
|
|
12041 |
|
|
} else { |
12042 |
|
|
$self->{parse_error}->(); |
12043 |
|
|
## reconsume |
12044 |
|
|
} |
12045 |
|
|
} |
12046 |
|
|
} else { |
12047 |
|
|
$self->{parse_error}->(); |
12048 |
|
|
unshift @{$self->{char}}, (114, 100, $self->{next_input_character}); |
12049 |
|
|
$self->{next_input_character} = 111; |
12050 |
|
|
} |
12051 |
|
|
} else { |
12052 |
|
|
$r = {type => 'character', data => qq<\x{2228}>}; # or |
12053 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12054 |
|
|
|
12055 |
|
|
if (@{$self->{char}}) { |
12056 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12057 |
|
|
} else { |
12058 |
|
|
$self->{set_next_input_character}->($self); |
12059 |
|
|
} |
12060 |
|
|
|
12061 |
|
|
} else { |
12062 |
|
|
$self->{parse_error}->(); |
12063 |
|
|
## reconsume |
12064 |
|
|
} |
12065 |
|
|
} |
12066 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
12067 |
|
|
|
12068 |
|
|
if (@{$self->{char}}) { |
12069 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12070 |
|
|
} else { |
12071 |
|
|
$self->{set_next_input_character}->($self); |
12072 |
|
|
} |
12073 |
|
|
|
12074 |
|
|
if ($self->{next_input_character} == 108) { # l |
12075 |
|
|
|
12076 |
|
|
if (@{$self->{char}}) { |
12077 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12078 |
|
|
} else { |
12079 |
|
|
$self->{set_next_input_character}->($self); |
12080 |
|
|
} |
12081 |
|
|
|
12082 |
|
|
if ($self->{next_input_character} == 97) { # a |
12083 |
|
|
|
12084 |
|
|
if (@{$self->{char}}) { |
12085 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12086 |
|
|
} else { |
12087 |
|
|
$self->{set_next_input_character}->($self); |
12088 |
|
|
} |
12089 |
|
|
|
12090 |
|
|
if ($self->{next_input_character} == 115) { # s |
12091 |
|
|
|
12092 |
|
|
if (@{$self->{char}}) { |
12093 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12094 |
|
|
} else { |
12095 |
|
|
$self->{set_next_input_character}->($self); |
12096 |
|
|
} |
12097 |
|
|
|
12098 |
|
|
if ($self->{next_input_character} == 104) { # h |
12099 |
|
|
|
12100 |
|
|
if (@{$self->{char}}) { |
12101 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12102 |
|
|
} else { |
12103 |
|
|
$self->{set_next_input_character}->($self); |
12104 |
|
|
} |
12105 |
|
|
|
12106 |
|
|
{ |
12107 |
|
|
$r = {type => 'character', data => qq<\x{00F8}>}; # oslash |
12108 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12109 |
|
|
|
12110 |
|
|
if (@{$self->{char}}) { |
12111 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12112 |
|
|
} else { |
12113 |
|
|
$self->{set_next_input_character}->($self); |
12114 |
|
|
} |
12115 |
|
|
|
12116 |
|
|
} else { |
12117 |
|
|
$self->{parse_error}->(); |
12118 |
|
|
## reconsume |
12119 |
|
|
} |
12120 |
|
|
} |
12121 |
|
|
} else { |
12122 |
|
|
$self->{parse_error}->(); |
12123 |
|
|
unshift @{$self->{char}}, (115, 108, 97, 115, $self->{next_input_character}); |
12124 |
|
|
$self->{next_input_character} = 111; |
12125 |
|
|
} |
12126 |
|
|
} else { |
12127 |
|
|
$self->{parse_error}->(); |
12128 |
|
|
unshift @{$self->{char}}, (115, 108, 97, $self->{next_input_character}); |
12129 |
|
|
$self->{next_input_character} = 111; |
12130 |
|
|
} |
12131 |
|
|
} else { |
12132 |
|
|
$self->{parse_error}->(); |
12133 |
|
|
unshift @{$self->{char}}, (115, 108, $self->{next_input_character}); |
12134 |
|
|
$self->{next_input_character} = 111; |
12135 |
|
|
} |
12136 |
|
|
} else { |
12137 |
|
|
$self->{parse_error}->(); |
12138 |
|
|
unshift @{$self->{char}}, (115, $self->{next_input_character}); |
12139 |
|
|
$self->{next_input_character} = 111; |
12140 |
|
|
} |
12141 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
12142 |
|
|
|
12143 |
|
|
if (@{$self->{char}}) { |
12144 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12145 |
|
|
} else { |
12146 |
|
|
$self->{set_next_input_character}->($self); |
12147 |
|
|
} |
12148 |
|
|
|
12149 |
|
|
if ($self->{next_input_character} == 105) { # i |
12150 |
|
|
|
12151 |
|
|
if (@{$self->{char}}) { |
12152 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12153 |
|
|
} else { |
12154 |
|
|
$self->{set_next_input_character}->($self); |
12155 |
|
|
} |
12156 |
|
|
|
12157 |
|
|
if ($self->{next_input_character} == 108) { # l |
12158 |
|
|
|
12159 |
|
|
if (@{$self->{char}}) { |
12160 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12161 |
|
|
} else { |
12162 |
|
|
$self->{set_next_input_character}->($self); |
12163 |
|
|
} |
12164 |
|
|
|
12165 |
|
|
if ($self->{next_input_character} == 100) { # d |
12166 |
|
|
|
12167 |
|
|
if (@{$self->{char}}) { |
12168 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12169 |
|
|
} else { |
12170 |
|
|
$self->{set_next_input_character}->($self); |
12171 |
|
|
} |
12172 |
|
|
|
12173 |
|
|
if ($self->{next_input_character} == 101) { # e |
12174 |
|
|
|
12175 |
|
|
if (@{$self->{char}}) { |
12176 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12177 |
|
|
} else { |
12178 |
|
|
$self->{set_next_input_character}->($self); |
12179 |
|
|
} |
12180 |
|
|
|
12181 |
|
|
{ |
12182 |
|
|
$r = {type => 'character', data => qq<\x{00F5}>}; # otilde |
12183 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12184 |
|
|
|
12185 |
|
|
if (@{$self->{char}}) { |
12186 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12187 |
|
|
} else { |
12188 |
|
|
$self->{set_next_input_character}->($self); |
12189 |
|
|
} |
12190 |
|
|
|
12191 |
|
|
} else { |
12192 |
|
|
$self->{parse_error}->(); |
12193 |
|
|
## reconsume |
12194 |
|
|
} |
12195 |
|
|
} |
12196 |
|
|
} else { |
12197 |
|
|
$self->{parse_error}->(); |
12198 |
|
|
unshift @{$self->{char}}, (116, 105, 108, 100, $self->{next_input_character}); |
12199 |
|
|
$self->{next_input_character} = 111; |
12200 |
|
|
} |
12201 |
|
|
} else { |
12202 |
|
|
$self->{parse_error}->(); |
12203 |
|
|
unshift @{$self->{char}}, (116, 105, 108, $self->{next_input_character}); |
12204 |
|
|
$self->{next_input_character} = 111; |
12205 |
|
|
} |
12206 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
12207 |
|
|
|
12208 |
|
|
if (@{$self->{char}}) { |
12209 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12210 |
|
|
} else { |
12211 |
|
|
$self->{set_next_input_character}->($self); |
12212 |
|
|
} |
12213 |
|
|
|
12214 |
|
|
if ($self->{next_input_character} == 101) { # e |
12215 |
|
|
|
12216 |
|
|
if (@{$self->{char}}) { |
12217 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12218 |
|
|
} else { |
12219 |
|
|
$self->{set_next_input_character}->($self); |
12220 |
|
|
} |
12221 |
|
|
|
12222 |
|
|
if ($self->{next_input_character} == 115) { # s |
12223 |
|
|
|
12224 |
|
|
if (@{$self->{char}}) { |
12225 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12226 |
|
|
} else { |
12227 |
|
|
$self->{set_next_input_character}->($self); |
12228 |
|
|
} |
12229 |
|
|
|
12230 |
|
|
{ |
12231 |
|
|
$r = {type => 'character', data => qq<\x{2297}>}; # otimes |
12232 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12233 |
|
|
|
12234 |
|
|
if (@{$self->{char}}) { |
12235 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12236 |
|
|
} else { |
12237 |
|
|
$self->{set_next_input_character}->($self); |
12238 |
|
|
} |
12239 |
|
|
|
12240 |
|
|
} else { |
12241 |
|
|
$self->{parse_error}->(); |
12242 |
|
|
## reconsume |
12243 |
|
|
} |
12244 |
|
|
} |
12245 |
|
|
} else { |
12246 |
|
|
$self->{parse_error}->(); |
12247 |
|
|
unshift @{$self->{char}}, (116, 105, 109, 101, $self->{next_input_character}); |
12248 |
|
|
$self->{next_input_character} = 111; |
12249 |
|
|
} |
12250 |
|
|
} else { |
12251 |
|
|
$self->{parse_error}->(); |
12252 |
|
|
unshift @{$self->{char}}, (116, 105, 109, $self->{next_input_character}); |
12253 |
|
|
$self->{next_input_character} = 111; |
12254 |
|
|
} |
12255 |
|
|
} else { |
12256 |
|
|
$self->{parse_error}->(); |
12257 |
|
|
unshift @{$self->{char}}, (116, 105, $self->{next_input_character}); |
12258 |
|
|
$self->{next_input_character} = 111; |
12259 |
|
|
} |
12260 |
|
|
} else { |
12261 |
|
|
$self->{parse_error}->(); |
12262 |
|
|
unshift @{$self->{char}}, (116, $self->{next_input_character}); |
12263 |
|
|
$self->{next_input_character} = 111; |
12264 |
|
|
} |
12265 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
12266 |
|
|
|
12267 |
|
|
if (@{$self->{char}}) { |
12268 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12269 |
|
|
} else { |
12270 |
|
|
$self->{set_next_input_character}->($self); |
12271 |
|
|
} |
12272 |
|
|
|
12273 |
|
|
if ($self->{next_input_character} == 109) { # m |
12274 |
|
|
|
12275 |
|
|
if (@{$self->{char}}) { |
12276 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12277 |
|
|
} else { |
12278 |
|
|
$self->{set_next_input_character}->($self); |
12279 |
|
|
} |
12280 |
|
|
|
12281 |
|
|
if ($self->{next_input_character} == 108) { # l |
12282 |
|
|
|
12283 |
|
|
if (@{$self->{char}}) { |
12284 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12285 |
|
|
} else { |
12286 |
|
|
$self->{set_next_input_character}->($self); |
12287 |
|
|
} |
12288 |
|
|
|
12289 |
|
|
{ |
12290 |
|
|
$r = {type => 'character', data => qq<\x{00F6}>}; # ouml |
12291 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12292 |
|
|
|
12293 |
|
|
if (@{$self->{char}}) { |
12294 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12295 |
|
|
} else { |
12296 |
|
|
$self->{set_next_input_character}->($self); |
12297 |
|
|
} |
12298 |
|
|
|
12299 |
|
|
} else { |
12300 |
|
|
$self->{parse_error}->(); |
12301 |
|
|
## reconsume |
12302 |
|
|
} |
12303 |
|
|
} |
12304 |
|
|
} else { |
12305 |
|
|
$self->{parse_error}->(); |
12306 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
12307 |
|
|
$self->{next_input_character} = 111; |
12308 |
|
|
} |
12309 |
|
|
} else { |
12310 |
|
|
$self->{parse_error}->(); |
12311 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
12312 |
|
|
$self->{next_input_character} = 111; |
12313 |
|
|
} |
12314 |
|
|
} else { |
12315 |
|
|
$self->{parse_error}->(); |
12316 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
12317 |
|
|
$self->{next_input_character} = 111; |
12318 |
|
|
} |
12319 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
12320 |
|
|
|
12321 |
|
|
if (@{$self->{char}}) { |
12322 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12323 |
|
|
} else { |
12324 |
|
|
$self->{set_next_input_character}->($self); |
12325 |
|
|
} |
12326 |
|
|
|
12327 |
|
|
if ($self->{next_input_character} == 97) { # a |
12328 |
|
|
|
12329 |
|
|
if (@{$self->{char}}) { |
12330 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12331 |
|
|
} else { |
12332 |
|
|
$self->{set_next_input_character}->($self); |
12333 |
|
|
} |
12334 |
|
|
|
12335 |
|
|
if ($self->{next_input_character} == 114) { # r |
12336 |
|
|
|
12337 |
|
|
if (@{$self->{char}}) { |
12338 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12339 |
|
|
} else { |
12340 |
|
|
$self->{set_next_input_character}->($self); |
12341 |
|
|
} |
12342 |
|
|
|
12343 |
|
|
if ($self->{next_input_character} == 97) { # a |
12344 |
|
|
|
12345 |
|
|
if (@{$self->{char}}) { |
12346 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12347 |
|
|
} else { |
12348 |
|
|
$self->{set_next_input_character}->($self); |
12349 |
|
|
} |
12350 |
|
|
|
12351 |
|
|
{ |
12352 |
|
|
$r = {type => 'character', data => qq<\x{00B6}>}; # para |
12353 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12354 |
|
|
|
12355 |
|
|
if (@{$self->{char}}) { |
12356 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12357 |
|
|
} else { |
12358 |
|
|
$self->{set_next_input_character}->($self); |
12359 |
|
|
} |
12360 |
|
|
|
12361 |
|
|
} else { |
12362 |
|
|
$self->{parse_error}->(); |
12363 |
|
|
## reconsume |
12364 |
|
|
} |
12365 |
|
|
} |
12366 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
12367 |
|
|
|
12368 |
|
|
if (@{$self->{char}}) { |
12369 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12370 |
|
|
} else { |
12371 |
|
|
$self->{set_next_input_character}->($self); |
12372 |
|
|
} |
12373 |
|
|
|
12374 |
|
|
{ |
12375 |
|
|
$r = {type => 'character', data => qq<\x{2202}>}; # part |
12376 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12377 |
|
|
|
12378 |
|
|
if (@{$self->{char}}) { |
12379 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12380 |
|
|
} else { |
12381 |
|
|
$self->{set_next_input_character}->($self); |
12382 |
|
|
} |
12383 |
|
|
|
12384 |
|
|
} else { |
12385 |
|
|
$self->{parse_error}->(); |
12386 |
|
|
## reconsume |
12387 |
|
|
} |
12388 |
|
|
} |
12389 |
|
|
} else { |
12390 |
|
|
$self->{parse_error}->(); |
12391 |
|
|
unshift @{$self->{char}}, (97, 114, $self->{next_input_character}); |
12392 |
|
|
$self->{next_input_character} = 112; |
12393 |
|
|
} |
12394 |
|
|
} else { |
12395 |
|
|
$self->{parse_error}->(); |
12396 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
12397 |
|
|
$self->{next_input_character} = 112; |
12398 |
|
|
} |
12399 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
12400 |
|
|
|
12401 |
|
|
if (@{$self->{char}}) { |
12402 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12403 |
|
|
} else { |
12404 |
|
|
$self->{set_next_input_character}->($self); |
12405 |
|
|
} |
12406 |
|
|
|
12407 |
|
|
if ($self->{next_input_character} == 114) { # r |
12408 |
|
|
|
12409 |
|
|
if (@{$self->{char}}) { |
12410 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12411 |
|
|
} else { |
12412 |
|
|
$self->{set_next_input_character}->($self); |
12413 |
|
|
} |
12414 |
|
|
|
12415 |
|
|
if ($self->{next_input_character} == 109) { # m |
12416 |
|
|
|
12417 |
|
|
if (@{$self->{char}}) { |
12418 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12419 |
|
|
} else { |
12420 |
|
|
$self->{set_next_input_character}->($self); |
12421 |
|
|
} |
12422 |
|
|
|
12423 |
|
|
if ($self->{next_input_character} == 105) { # i |
12424 |
|
|
|
12425 |
|
|
if (@{$self->{char}}) { |
12426 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12427 |
|
|
} else { |
12428 |
|
|
$self->{set_next_input_character}->($self); |
12429 |
|
|
} |
12430 |
|
|
|
12431 |
|
|
if ($self->{next_input_character} == 108) { # l |
12432 |
|
|
|
12433 |
|
|
if (@{$self->{char}}) { |
12434 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12435 |
|
|
} else { |
12436 |
|
|
$self->{set_next_input_character}->($self); |
12437 |
|
|
} |
12438 |
|
|
|
12439 |
|
|
{ |
12440 |
|
|
$r = {type => 'character', data => qq<\x{2030}>}; # permil |
12441 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12442 |
|
|
|
12443 |
|
|
if (@{$self->{char}}) { |
12444 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12445 |
|
|
} else { |
12446 |
|
|
$self->{set_next_input_character}->($self); |
12447 |
|
|
} |
12448 |
|
|
|
12449 |
|
|
} else { |
12450 |
|
|
$self->{parse_error}->(); |
12451 |
|
|
## reconsume |
12452 |
|
|
} |
12453 |
|
|
} |
12454 |
|
|
} else { |
12455 |
|
|
$self->{parse_error}->(); |
12456 |
|
|
unshift @{$self->{char}}, (101, 114, 109, 105, $self->{next_input_character}); |
12457 |
|
|
$self->{next_input_character} = 112; |
12458 |
|
|
} |
12459 |
|
|
} else { |
12460 |
|
|
$self->{parse_error}->(); |
12461 |
|
|
unshift @{$self->{char}}, (101, 114, 109, $self->{next_input_character}); |
12462 |
|
|
$self->{next_input_character} = 112; |
12463 |
|
|
} |
12464 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
12465 |
|
|
|
12466 |
|
|
if (@{$self->{char}}) { |
12467 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12468 |
|
|
} else { |
12469 |
|
|
$self->{set_next_input_character}->($self); |
12470 |
|
|
} |
12471 |
|
|
|
12472 |
|
|
{ |
12473 |
|
|
$r = {type => 'character', data => qq<\x{22A5}>}; # perp |
12474 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12475 |
|
|
|
12476 |
|
|
if (@{$self->{char}}) { |
12477 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12478 |
|
|
} else { |
12479 |
|
|
$self->{set_next_input_character}->($self); |
12480 |
|
|
} |
12481 |
|
|
|
12482 |
|
|
} else { |
12483 |
|
|
$self->{parse_error}->(); |
12484 |
|
|
## reconsume |
12485 |
|
|
} |
12486 |
|
|
} |
12487 |
|
|
} else { |
12488 |
|
|
$self->{parse_error}->(); |
12489 |
|
|
unshift @{$self->{char}}, (101, 114, $self->{next_input_character}); |
12490 |
|
|
$self->{next_input_character} = 112; |
12491 |
|
|
} |
12492 |
|
|
} else { |
12493 |
|
|
$self->{parse_error}->(); |
12494 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
12495 |
|
|
$self->{next_input_character} = 112; |
12496 |
|
|
} |
12497 |
|
|
} elsif ($self->{next_input_character} == 104) { # h |
12498 |
|
|
|
12499 |
|
|
if (@{$self->{char}}) { |
12500 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12501 |
|
|
} else { |
12502 |
|
|
$self->{set_next_input_character}->($self); |
12503 |
|
|
} |
12504 |
|
|
|
12505 |
|
|
if ($self->{next_input_character} == 105) { # i |
12506 |
|
|
|
12507 |
|
|
if (@{$self->{char}}) { |
12508 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12509 |
|
|
} else { |
12510 |
|
|
$self->{set_next_input_character}->($self); |
12511 |
|
|
} |
12512 |
|
|
|
12513 |
|
|
{ |
12514 |
|
|
$r = {type => 'character', data => qq<\x{03C6}>}; # phi |
12515 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12516 |
|
|
|
12517 |
|
|
if (@{$self->{char}}) { |
12518 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12519 |
|
|
} else { |
12520 |
|
|
$self->{set_next_input_character}->($self); |
12521 |
|
|
} |
12522 |
|
|
|
12523 |
|
|
} else { |
12524 |
|
|
$self->{parse_error}->(); |
12525 |
|
|
## reconsume |
12526 |
|
|
} |
12527 |
|
|
} |
12528 |
|
|
} else { |
12529 |
|
|
$self->{parse_error}->(); |
12530 |
|
|
unshift @{$self->{char}}, (104, $self->{next_input_character}); |
12531 |
|
|
$self->{next_input_character} = 112; |
12532 |
|
|
} |
12533 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
12534 |
|
|
|
12535 |
|
|
if (@{$self->{char}}) { |
12536 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12537 |
|
|
} else { |
12538 |
|
|
$self->{set_next_input_character}->($self); |
12539 |
|
|
} |
12540 |
|
|
|
12541 |
|
|
if ($self->{next_input_character} == 118) { # v |
12542 |
|
|
|
12543 |
|
|
if (@{$self->{char}}) { |
12544 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12545 |
|
|
} else { |
12546 |
|
|
$self->{set_next_input_character}->($self); |
12547 |
|
|
} |
12548 |
|
|
|
12549 |
|
|
{ |
12550 |
|
|
$r = {type => 'character', data => qq<\x{03D6}>}; # piv |
12551 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12552 |
|
|
|
12553 |
|
|
if (@{$self->{char}}) { |
12554 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12555 |
|
|
} else { |
12556 |
|
|
$self->{set_next_input_character}->($self); |
12557 |
|
|
} |
12558 |
|
|
|
12559 |
|
|
} else { |
12560 |
|
|
$self->{parse_error}->(); |
12561 |
|
|
## reconsume |
12562 |
|
|
} |
12563 |
|
|
} |
12564 |
|
|
} else { |
12565 |
|
|
$r = {type => 'character', data => qq<\x{03C0}>}; # pi |
12566 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12567 |
|
|
|
12568 |
|
|
if (@{$self->{char}}) { |
12569 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12570 |
|
|
} else { |
12571 |
|
|
$self->{set_next_input_character}->($self); |
12572 |
|
|
} |
12573 |
|
|
|
12574 |
|
|
} else { |
12575 |
|
|
$self->{parse_error}->(); |
12576 |
|
|
## reconsume |
12577 |
|
|
} |
12578 |
|
|
} |
12579 |
|
|
} elsif ($self->{next_input_character} == 108) { # l |
12580 |
|
|
|
12581 |
|
|
if (@{$self->{char}}) { |
12582 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12583 |
|
|
} else { |
12584 |
|
|
$self->{set_next_input_character}->($self); |
12585 |
|
|
} |
12586 |
|
|
|
12587 |
|
|
if ($self->{next_input_character} == 117) { # u |
12588 |
|
|
|
12589 |
|
|
if (@{$self->{char}}) { |
12590 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12591 |
|
|
} else { |
12592 |
|
|
$self->{set_next_input_character}->($self); |
12593 |
|
|
} |
12594 |
|
|
|
12595 |
|
|
if ($self->{next_input_character} == 115) { # s |
12596 |
|
|
|
12597 |
|
|
if (@{$self->{char}}) { |
12598 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12599 |
|
|
} else { |
12600 |
|
|
$self->{set_next_input_character}->($self); |
12601 |
|
|
} |
12602 |
|
|
|
12603 |
|
|
if ($self->{next_input_character} == 109) { # m |
12604 |
|
|
|
12605 |
|
|
if (@{$self->{char}}) { |
12606 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12607 |
|
|
} else { |
12608 |
|
|
$self->{set_next_input_character}->($self); |
12609 |
|
|
} |
12610 |
|
|
|
12611 |
|
|
if ($self->{next_input_character} == 110) { # n |
12612 |
|
|
|
12613 |
|
|
if (@{$self->{char}}) { |
12614 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12615 |
|
|
} else { |
12616 |
|
|
$self->{set_next_input_character}->($self); |
12617 |
|
|
} |
12618 |
|
|
|
12619 |
|
|
{ |
12620 |
|
|
$r = {type => 'character', data => qq<\x{00B1}>}; # plusmn |
12621 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12622 |
|
|
|
12623 |
|
|
if (@{$self->{char}}) { |
12624 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12625 |
|
|
} else { |
12626 |
|
|
$self->{set_next_input_character}->($self); |
12627 |
|
|
} |
12628 |
|
|
|
12629 |
|
|
} else { |
12630 |
|
|
$self->{parse_error}->(); |
12631 |
|
|
## reconsume |
12632 |
|
|
} |
12633 |
|
|
} |
12634 |
|
|
} else { |
12635 |
|
|
$self->{parse_error}->(); |
12636 |
|
|
unshift @{$self->{char}}, (108, 117, 115, 109, $self->{next_input_character}); |
12637 |
|
|
$self->{next_input_character} = 112; |
12638 |
|
|
} |
12639 |
|
|
} else { |
12640 |
|
|
$self->{parse_error}->(); |
12641 |
|
|
unshift @{$self->{char}}, (108, 117, 115, $self->{next_input_character}); |
12642 |
|
|
$self->{next_input_character} = 112; |
12643 |
|
|
} |
12644 |
|
|
} else { |
12645 |
|
|
$self->{parse_error}->(); |
12646 |
|
|
unshift @{$self->{char}}, (108, 117, $self->{next_input_character}); |
12647 |
|
|
$self->{next_input_character} = 112; |
12648 |
|
|
} |
12649 |
|
|
} else { |
12650 |
|
|
$self->{parse_error}->(); |
12651 |
|
|
unshift @{$self->{char}}, (108, $self->{next_input_character}); |
12652 |
|
|
$self->{next_input_character} = 112; |
12653 |
|
|
} |
12654 |
|
|
} elsif ($self->{next_input_character} == 111) { # o |
12655 |
|
|
|
12656 |
|
|
if (@{$self->{char}}) { |
12657 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12658 |
|
|
} else { |
12659 |
|
|
$self->{set_next_input_character}->($self); |
12660 |
|
|
} |
12661 |
|
|
|
12662 |
|
|
if ($self->{next_input_character} == 117) { # u |
12663 |
|
|
|
12664 |
|
|
if (@{$self->{char}}) { |
12665 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12666 |
|
|
} else { |
12667 |
|
|
$self->{set_next_input_character}->($self); |
12668 |
|
|
} |
12669 |
|
|
|
12670 |
|
|
if ($self->{next_input_character} == 110) { # n |
12671 |
|
|
|
12672 |
|
|
if (@{$self->{char}}) { |
12673 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12674 |
|
|
} else { |
12675 |
|
|
$self->{set_next_input_character}->($self); |
12676 |
|
|
} |
12677 |
|
|
|
12678 |
|
|
if ($self->{next_input_character} == 100) { # d |
12679 |
|
|
|
12680 |
|
|
if (@{$self->{char}}) { |
12681 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12682 |
|
|
} else { |
12683 |
|
|
$self->{set_next_input_character}->($self); |
12684 |
|
|
} |
12685 |
|
|
|
12686 |
|
|
{ |
12687 |
|
|
$r = {type => 'character', data => qq<\x{00A3}>}; # pound |
12688 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12689 |
|
|
|
12690 |
|
|
if (@{$self->{char}}) { |
12691 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12692 |
|
|
} else { |
12693 |
|
|
$self->{set_next_input_character}->($self); |
12694 |
|
|
} |
12695 |
|
|
|
12696 |
|
|
} else { |
12697 |
|
|
$self->{parse_error}->(); |
12698 |
|
|
## reconsume |
12699 |
|
|
} |
12700 |
|
|
} |
12701 |
|
|
} else { |
12702 |
|
|
$self->{parse_error}->(); |
12703 |
|
|
unshift @{$self->{char}}, (111, 117, 110, $self->{next_input_character}); |
12704 |
|
|
$self->{next_input_character} = 112; |
12705 |
|
|
} |
12706 |
|
|
} else { |
12707 |
|
|
$self->{parse_error}->(); |
12708 |
|
|
unshift @{$self->{char}}, (111, 117, $self->{next_input_character}); |
12709 |
|
|
$self->{next_input_character} = 112; |
12710 |
|
|
} |
12711 |
|
|
} else { |
12712 |
|
|
$self->{parse_error}->(); |
12713 |
|
|
unshift @{$self->{char}}, (111, $self->{next_input_character}); |
12714 |
|
|
$self->{next_input_character} = 112; |
12715 |
|
|
} |
12716 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
12717 |
|
|
|
12718 |
|
|
if (@{$self->{char}}) { |
12719 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12720 |
|
|
} else { |
12721 |
|
|
$self->{set_next_input_character}->($self); |
12722 |
|
|
} |
12723 |
|
|
|
12724 |
|
|
if ($self->{next_input_character} == 105) { # i |
12725 |
|
|
|
12726 |
|
|
if (@{$self->{char}}) { |
12727 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12728 |
|
|
} else { |
12729 |
|
|
$self->{set_next_input_character}->($self); |
12730 |
|
|
} |
12731 |
|
|
|
12732 |
|
|
if ($self->{next_input_character} == 109) { # m |
12733 |
|
|
|
12734 |
|
|
if (@{$self->{char}}) { |
12735 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12736 |
|
|
} else { |
12737 |
|
|
$self->{set_next_input_character}->($self); |
12738 |
|
|
} |
12739 |
|
|
|
12740 |
|
|
if ($self->{next_input_character} == 101) { # e |
12741 |
|
|
|
12742 |
|
|
if (@{$self->{char}}) { |
12743 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12744 |
|
|
} else { |
12745 |
|
|
$self->{set_next_input_character}->($self); |
12746 |
|
|
} |
12747 |
|
|
|
12748 |
|
|
{ |
12749 |
|
|
$r = {type => 'character', data => qq<\x{2032}>}; # prime |
12750 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12751 |
|
|
|
12752 |
|
|
if (@{$self->{char}}) { |
12753 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12754 |
|
|
} else { |
12755 |
|
|
$self->{set_next_input_character}->($self); |
12756 |
|
|
} |
12757 |
|
|
|
12758 |
|
|
} else { |
12759 |
|
|
$self->{parse_error}->(); |
12760 |
|
|
## reconsume |
12761 |
|
|
} |
12762 |
|
|
} |
12763 |
|
|
} else { |
12764 |
|
|
$self->{parse_error}->(); |
12765 |
|
|
unshift @{$self->{char}}, (114, 105, 109, $self->{next_input_character}); |
12766 |
|
|
$self->{next_input_character} = 112; |
12767 |
|
|
} |
12768 |
|
|
} else { |
12769 |
|
|
$self->{parse_error}->(); |
12770 |
|
|
unshift @{$self->{char}}, (114, 105, $self->{next_input_character}); |
12771 |
|
|
$self->{next_input_character} = 112; |
12772 |
|
|
} |
12773 |
|
|
} elsif ($self->{next_input_character} == 111) { # o |
12774 |
|
|
|
12775 |
|
|
if (@{$self->{char}}) { |
12776 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12777 |
|
|
} else { |
12778 |
|
|
$self->{set_next_input_character}->($self); |
12779 |
|
|
} |
12780 |
|
|
|
12781 |
|
|
if ($self->{next_input_character} == 100) { # d |
12782 |
|
|
|
12783 |
|
|
if (@{$self->{char}}) { |
12784 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12785 |
|
|
} else { |
12786 |
|
|
$self->{set_next_input_character}->($self); |
12787 |
|
|
} |
12788 |
|
|
|
12789 |
|
|
{ |
12790 |
|
|
$r = {type => 'character', data => qq<\x{220F}>}; # prod |
12791 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12792 |
|
|
|
12793 |
|
|
if (@{$self->{char}}) { |
12794 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12795 |
|
|
} else { |
12796 |
|
|
$self->{set_next_input_character}->($self); |
12797 |
|
|
} |
12798 |
|
|
|
12799 |
|
|
} else { |
12800 |
|
|
$self->{parse_error}->(); |
12801 |
|
|
## reconsume |
12802 |
|
|
} |
12803 |
|
|
} |
12804 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
12805 |
|
|
|
12806 |
|
|
if (@{$self->{char}}) { |
12807 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12808 |
|
|
} else { |
12809 |
|
|
$self->{set_next_input_character}->($self); |
12810 |
|
|
} |
12811 |
|
|
|
12812 |
|
|
{ |
12813 |
|
|
$r = {type => 'character', data => qq<\x{221D}>}; # prop |
12814 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12815 |
|
|
|
12816 |
|
|
if (@{$self->{char}}) { |
12817 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12818 |
|
|
} else { |
12819 |
|
|
$self->{set_next_input_character}->($self); |
12820 |
|
|
} |
12821 |
|
|
|
12822 |
|
|
} else { |
12823 |
|
|
$self->{parse_error}->(); |
12824 |
|
|
## reconsume |
12825 |
|
|
} |
12826 |
|
|
} |
12827 |
|
|
} else { |
12828 |
|
|
$self->{parse_error}->(); |
12829 |
|
|
unshift @{$self->{char}}, (114, 111, $self->{next_input_character}); |
12830 |
|
|
$self->{next_input_character} = 112; |
12831 |
|
|
} |
12832 |
|
|
} else { |
12833 |
|
|
$self->{parse_error}->(); |
12834 |
|
|
unshift @{$self->{char}}, (114, $self->{next_input_character}); |
12835 |
|
|
$self->{next_input_character} = 112; |
12836 |
|
|
} |
12837 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
12838 |
|
|
|
12839 |
|
|
if (@{$self->{char}}) { |
12840 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12841 |
|
|
} else { |
12842 |
|
|
$self->{set_next_input_character}->($self); |
12843 |
|
|
} |
12844 |
|
|
|
12845 |
|
|
if ($self->{next_input_character} == 105) { # i |
12846 |
|
|
|
12847 |
|
|
if (@{$self->{char}}) { |
12848 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12849 |
|
|
} else { |
12850 |
|
|
$self->{set_next_input_character}->($self); |
12851 |
|
|
} |
12852 |
|
|
|
12853 |
|
|
{ |
12854 |
|
|
$r = {type => 'character', data => qq<\x{03C8}>}; # psi |
12855 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12856 |
|
|
|
12857 |
|
|
if (@{$self->{char}}) { |
12858 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12859 |
|
|
} else { |
12860 |
|
|
$self->{set_next_input_character}->($self); |
12861 |
|
|
} |
12862 |
|
|
|
12863 |
|
|
} else { |
12864 |
|
|
$self->{parse_error}->(); |
12865 |
|
|
## reconsume |
12866 |
|
|
} |
12867 |
|
|
} |
12868 |
|
|
} else { |
12869 |
|
|
$self->{parse_error}->(); |
12870 |
|
|
unshift @{$self->{char}}, (115, $self->{next_input_character}); |
12871 |
|
|
$self->{next_input_character} = 112; |
12872 |
|
|
} |
12873 |
|
|
} else { |
12874 |
|
|
$self->{parse_error}->(); |
12875 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
12876 |
|
|
$self->{next_input_character} = 112; |
12877 |
|
|
} |
12878 |
|
|
} elsif ($self->{next_input_character} == 113) { # q |
12879 |
|
|
|
12880 |
|
|
if (@{$self->{char}}) { |
12881 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12882 |
|
|
} else { |
12883 |
|
|
$self->{set_next_input_character}->($self); |
12884 |
|
|
} |
12885 |
|
|
|
12886 |
|
|
if ($self->{next_input_character} == 117) { # u |
12887 |
|
|
|
12888 |
|
|
if (@{$self->{char}}) { |
12889 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12890 |
|
|
} else { |
12891 |
|
|
$self->{set_next_input_character}->($self); |
12892 |
|
|
} |
12893 |
|
|
|
12894 |
|
|
if ($self->{next_input_character} == 111) { # o |
12895 |
|
|
|
12896 |
|
|
if (@{$self->{char}}) { |
12897 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12898 |
|
|
} else { |
12899 |
|
|
$self->{set_next_input_character}->($self); |
12900 |
|
|
} |
12901 |
|
|
|
12902 |
|
|
if ($self->{next_input_character} == 116) { # t |
12903 |
|
|
|
12904 |
|
|
if (@{$self->{char}}) { |
12905 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12906 |
|
|
} else { |
12907 |
|
|
$self->{set_next_input_character}->($self); |
12908 |
|
|
} |
12909 |
|
|
|
12910 |
|
|
{ |
12911 |
|
|
$r = {type => 'character', data => qq<\x{0022}>}; # quot |
12912 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12913 |
|
|
|
12914 |
|
|
if (@{$self->{char}}) { |
12915 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12916 |
|
|
} else { |
12917 |
|
|
$self->{set_next_input_character}->($self); |
12918 |
|
|
} |
12919 |
|
|
|
12920 |
|
|
} else { |
12921 |
|
|
$self->{parse_error}->(); |
12922 |
|
|
## reconsume |
12923 |
|
|
} |
12924 |
|
|
} |
12925 |
|
|
} else { |
12926 |
|
|
$self->{parse_error}->(); |
12927 |
|
|
unshift @{$self->{char}}, (117, 111, $self->{next_input_character}); |
12928 |
|
|
$self->{next_input_character} = 113; |
12929 |
|
|
} |
12930 |
|
|
} else { |
12931 |
|
|
$self->{parse_error}->(); |
12932 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
12933 |
|
|
$self->{next_input_character} = 113; |
12934 |
|
|
} |
12935 |
|
|
} else { |
12936 |
|
|
$self->{parse_error}->(); |
12937 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
12938 |
|
|
$self->{next_input_character} = 113; |
12939 |
|
|
} |
12940 |
|
|
} elsif ($self->{next_input_character} == 81) { # Q |
12941 |
|
|
|
12942 |
|
|
if (@{$self->{char}}) { |
12943 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12944 |
|
|
} else { |
12945 |
|
|
$self->{set_next_input_character}->($self); |
12946 |
|
|
} |
12947 |
|
|
|
12948 |
|
|
if ($self->{next_input_character} == 85) { # U |
12949 |
|
|
|
12950 |
|
|
if (@{$self->{char}}) { |
12951 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12952 |
|
|
} else { |
12953 |
|
|
$self->{set_next_input_character}->($self); |
12954 |
|
|
} |
12955 |
|
|
|
12956 |
|
|
if ($self->{next_input_character} == 79) { # O |
12957 |
|
|
|
12958 |
|
|
if (@{$self->{char}}) { |
12959 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12960 |
|
|
} else { |
12961 |
|
|
$self->{set_next_input_character}->($self); |
12962 |
|
|
} |
12963 |
|
|
|
12964 |
|
|
if ($self->{next_input_character} == 84) { # T |
12965 |
|
|
|
12966 |
|
|
if (@{$self->{char}}) { |
12967 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12968 |
|
|
} else { |
12969 |
|
|
$self->{set_next_input_character}->($self); |
12970 |
|
|
} |
12971 |
|
|
|
12972 |
|
|
{ |
12973 |
|
|
$r = {type => 'character', data => qq<\x{0022}>}; # QUOT |
12974 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
12975 |
|
|
|
12976 |
|
|
if (@{$self->{char}}) { |
12977 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
12978 |
|
|
} else { |
12979 |
|
|
$self->{set_next_input_character}->($self); |
12980 |
|
|
} |
12981 |
|
|
|
12982 |
|
|
} else { |
12983 |
|
|
$self->{parse_error}->(); |
12984 |
|
|
## reconsume |
12985 |
|
|
} |
12986 |
|
|
} |
12987 |
|
|
} else { |
12988 |
|
|
$self->{parse_error}->(); |
12989 |
|
|
unshift @{$self->{char}}, (85, 79, $self->{next_input_character}); |
12990 |
|
|
$self->{next_input_character} = 81; |
12991 |
|
|
} |
12992 |
|
|
} else { |
12993 |
|
|
$self->{parse_error}->(); |
12994 |
|
|
unshift @{$self->{char}}, (85, $self->{next_input_character}); |
12995 |
|
|
$self->{next_input_character} = 81; |
12996 |
|
|
} |
12997 |
|
|
} else { |
12998 |
|
|
$self->{parse_error}->(); |
12999 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
13000 |
|
|
$self->{next_input_character} = 81; |
13001 |
|
|
} |
13002 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
13003 |
|
|
|
13004 |
|
|
if (@{$self->{char}}) { |
13005 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13006 |
|
|
} else { |
13007 |
|
|
$self->{set_next_input_character}->($self); |
13008 |
|
|
} |
13009 |
|
|
|
13010 |
|
|
if ($self->{next_input_character} == 65) { # A |
13011 |
|
|
|
13012 |
|
|
if (@{$self->{char}}) { |
13013 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13014 |
|
|
} else { |
13015 |
|
|
$self->{set_next_input_character}->($self); |
13016 |
|
|
} |
13017 |
|
|
|
13018 |
|
|
if ($self->{next_input_character} == 114) { # r |
13019 |
|
|
|
13020 |
|
|
if (@{$self->{char}}) { |
13021 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13022 |
|
|
} else { |
13023 |
|
|
$self->{set_next_input_character}->($self); |
13024 |
|
|
} |
13025 |
|
|
|
13026 |
|
|
if ($self->{next_input_character} == 114) { # r |
13027 |
|
|
|
13028 |
|
|
if (@{$self->{char}}) { |
13029 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13030 |
|
|
} else { |
13031 |
|
|
$self->{set_next_input_character}->($self); |
13032 |
|
|
} |
13033 |
|
|
|
13034 |
|
|
{ |
13035 |
|
|
$r = {type => 'character', data => qq<\x{21D2}>}; # rArr |
13036 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13037 |
|
|
|
13038 |
|
|
if (@{$self->{char}}) { |
13039 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13040 |
|
|
} else { |
13041 |
|
|
$self->{set_next_input_character}->($self); |
13042 |
|
|
} |
13043 |
|
|
|
13044 |
|
|
} else { |
13045 |
|
|
$self->{parse_error}->(); |
13046 |
|
|
## reconsume |
13047 |
|
|
} |
13048 |
|
|
} |
13049 |
|
|
} else { |
13050 |
|
|
$self->{parse_error}->(); |
13051 |
|
|
unshift @{$self->{char}}, (65, 114, $self->{next_input_character}); |
13052 |
|
|
$self->{next_input_character} = 114; |
13053 |
|
|
} |
13054 |
|
|
} else { |
13055 |
|
|
$self->{parse_error}->(); |
13056 |
|
|
unshift @{$self->{char}}, (65, $self->{next_input_character}); |
13057 |
|
|
$self->{next_input_character} = 114; |
13058 |
|
|
} |
13059 |
|
|
} elsif ($self->{next_input_character} == 97) { # a |
13060 |
|
|
|
13061 |
|
|
if (@{$self->{char}}) { |
13062 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13063 |
|
|
} else { |
13064 |
|
|
$self->{set_next_input_character}->($self); |
13065 |
|
|
} |
13066 |
|
|
|
13067 |
|
|
if ($self->{next_input_character} == 100) { # d |
13068 |
|
|
|
13069 |
|
|
if (@{$self->{char}}) { |
13070 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13071 |
|
|
} else { |
13072 |
|
|
$self->{set_next_input_character}->($self); |
13073 |
|
|
} |
13074 |
|
|
|
13075 |
|
|
if ($self->{next_input_character} == 105) { # i |
13076 |
|
|
|
13077 |
|
|
if (@{$self->{char}}) { |
13078 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13079 |
|
|
} else { |
13080 |
|
|
$self->{set_next_input_character}->($self); |
13081 |
|
|
} |
13082 |
|
|
|
13083 |
|
|
if ($self->{next_input_character} == 99) { # c |
13084 |
|
|
|
13085 |
|
|
if (@{$self->{char}}) { |
13086 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13087 |
|
|
} else { |
13088 |
|
|
$self->{set_next_input_character}->($self); |
13089 |
|
|
} |
13090 |
|
|
|
13091 |
|
|
{ |
13092 |
|
|
$r = {type => 'character', data => qq<\x{221A}>}; # radic |
13093 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13094 |
|
|
|
13095 |
|
|
if (@{$self->{char}}) { |
13096 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13097 |
|
|
} else { |
13098 |
|
|
$self->{set_next_input_character}->($self); |
13099 |
|
|
} |
13100 |
|
|
|
13101 |
|
|
} else { |
13102 |
|
|
$self->{parse_error}->(); |
13103 |
|
|
## reconsume |
13104 |
|
|
} |
13105 |
|
|
} |
13106 |
|
|
} else { |
13107 |
|
|
$self->{parse_error}->(); |
13108 |
|
|
unshift @{$self->{char}}, (97, 100, 105, $self->{next_input_character}); |
13109 |
|
|
$self->{next_input_character} = 114; |
13110 |
|
|
} |
13111 |
|
|
} else { |
13112 |
|
|
$self->{parse_error}->(); |
13113 |
|
|
unshift @{$self->{char}}, (97, 100, $self->{next_input_character}); |
13114 |
|
|
$self->{next_input_character} = 114; |
13115 |
|
|
} |
13116 |
|
|
} elsif ($self->{next_input_character} == 110) { # n |
13117 |
|
|
|
13118 |
|
|
if (@{$self->{char}}) { |
13119 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13120 |
|
|
} else { |
13121 |
|
|
$self->{set_next_input_character}->($self); |
13122 |
|
|
} |
13123 |
|
|
|
13124 |
|
|
if ($self->{next_input_character} == 103) { # g |
13125 |
|
|
|
13126 |
|
|
if (@{$self->{char}}) { |
13127 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13128 |
|
|
} else { |
13129 |
|
|
$self->{set_next_input_character}->($self); |
13130 |
|
|
} |
13131 |
|
|
|
13132 |
|
|
{ |
13133 |
|
|
$r = {type => 'character', data => qq<\x{232A}>}; # rang |
13134 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13135 |
|
|
|
13136 |
|
|
if (@{$self->{char}}) { |
13137 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13138 |
|
|
} else { |
13139 |
|
|
$self->{set_next_input_character}->($self); |
13140 |
|
|
} |
13141 |
|
|
|
13142 |
|
|
} else { |
13143 |
|
|
$self->{parse_error}->(); |
13144 |
|
|
## reconsume |
13145 |
|
|
} |
13146 |
|
|
} |
13147 |
|
|
} else { |
13148 |
|
|
$self->{parse_error}->(); |
13149 |
|
|
unshift @{$self->{char}}, (97, 110, $self->{next_input_character}); |
13150 |
|
|
$self->{next_input_character} = 114; |
13151 |
|
|
} |
13152 |
|
|
} elsif ($self->{next_input_character} == 113) { # q |
13153 |
|
|
|
13154 |
|
|
if (@{$self->{char}}) { |
13155 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13156 |
|
|
} else { |
13157 |
|
|
$self->{set_next_input_character}->($self); |
13158 |
|
|
} |
13159 |
|
|
|
13160 |
|
|
if ($self->{next_input_character} == 117) { # u |
13161 |
|
|
|
13162 |
|
|
if (@{$self->{char}}) { |
13163 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13164 |
|
|
} else { |
13165 |
|
|
$self->{set_next_input_character}->($self); |
13166 |
|
|
} |
13167 |
|
|
|
13168 |
|
|
if ($self->{next_input_character} == 111) { # o |
13169 |
|
|
|
13170 |
|
|
if (@{$self->{char}}) { |
13171 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13172 |
|
|
} else { |
13173 |
|
|
$self->{set_next_input_character}->($self); |
13174 |
|
|
} |
13175 |
|
|
|
13176 |
|
|
{ |
13177 |
|
|
$r = {type => 'character', data => qq<\x{00BB}>}; # raquo |
13178 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13179 |
|
|
|
13180 |
|
|
if (@{$self->{char}}) { |
13181 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13182 |
|
|
} else { |
13183 |
|
|
$self->{set_next_input_character}->($self); |
13184 |
|
|
} |
13185 |
|
|
|
13186 |
|
|
} else { |
13187 |
|
|
$self->{parse_error}->(); |
13188 |
|
|
## reconsume |
13189 |
|
|
} |
13190 |
|
|
} |
13191 |
|
|
} else { |
13192 |
|
|
$self->{parse_error}->(); |
13193 |
|
|
unshift @{$self->{char}}, (97, 113, 117, $self->{next_input_character}); |
13194 |
|
|
$self->{next_input_character} = 114; |
13195 |
|
|
} |
13196 |
|
|
} else { |
13197 |
|
|
$self->{parse_error}->(); |
13198 |
|
|
unshift @{$self->{char}}, (97, 113, $self->{next_input_character}); |
13199 |
|
|
$self->{next_input_character} = 114; |
13200 |
|
|
} |
13201 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
13202 |
|
|
|
13203 |
|
|
if (@{$self->{char}}) { |
13204 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13205 |
|
|
} else { |
13206 |
|
|
$self->{set_next_input_character}->($self); |
13207 |
|
|
} |
13208 |
|
|
|
13209 |
|
|
if ($self->{next_input_character} == 114) { # r |
13210 |
|
|
|
13211 |
|
|
if (@{$self->{char}}) { |
13212 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13213 |
|
|
} else { |
13214 |
|
|
$self->{set_next_input_character}->($self); |
13215 |
|
|
} |
13216 |
|
|
|
13217 |
|
|
{ |
13218 |
|
|
$r = {type => 'character', data => qq<\x{2192}>}; # rarr |
13219 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13220 |
|
|
|
13221 |
|
|
if (@{$self->{char}}) { |
13222 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13223 |
|
|
} else { |
13224 |
|
|
$self->{set_next_input_character}->($self); |
13225 |
|
|
} |
13226 |
|
|
|
13227 |
|
|
} else { |
13228 |
|
|
$self->{parse_error}->(); |
13229 |
|
|
## reconsume |
13230 |
|
|
} |
13231 |
|
|
} |
13232 |
|
|
} else { |
13233 |
|
|
$self->{parse_error}->(); |
13234 |
|
|
unshift @{$self->{char}}, (97, 114, $self->{next_input_character}); |
13235 |
|
|
$self->{next_input_character} = 114; |
13236 |
|
|
} |
13237 |
|
|
} else { |
13238 |
|
|
$self->{parse_error}->(); |
13239 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
13240 |
|
|
$self->{next_input_character} = 114; |
13241 |
|
|
} |
13242 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
13243 |
|
|
|
13244 |
|
|
if (@{$self->{char}}) { |
13245 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13246 |
|
|
} else { |
13247 |
|
|
$self->{set_next_input_character}->($self); |
13248 |
|
|
} |
13249 |
|
|
|
13250 |
|
|
if ($self->{next_input_character} == 101) { # e |
13251 |
|
|
|
13252 |
|
|
if (@{$self->{char}}) { |
13253 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13254 |
|
|
} else { |
13255 |
|
|
$self->{set_next_input_character}->($self); |
13256 |
|
|
} |
13257 |
|
|
|
13258 |
|
|
if ($self->{next_input_character} == 105) { # i |
13259 |
|
|
|
13260 |
|
|
if (@{$self->{char}}) { |
13261 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13262 |
|
|
} else { |
13263 |
|
|
$self->{set_next_input_character}->($self); |
13264 |
|
|
} |
13265 |
|
|
|
13266 |
|
|
if ($self->{next_input_character} == 108) { # l |
13267 |
|
|
|
13268 |
|
|
if (@{$self->{char}}) { |
13269 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13270 |
|
|
} else { |
13271 |
|
|
$self->{set_next_input_character}->($self); |
13272 |
|
|
} |
13273 |
|
|
|
13274 |
|
|
{ |
13275 |
|
|
$r = {type => 'character', data => qq<\x{2309}>}; # rceil |
13276 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13277 |
|
|
|
13278 |
|
|
if (@{$self->{char}}) { |
13279 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13280 |
|
|
} else { |
13281 |
|
|
$self->{set_next_input_character}->($self); |
13282 |
|
|
} |
13283 |
|
|
|
13284 |
|
|
} else { |
13285 |
|
|
$self->{parse_error}->(); |
13286 |
|
|
## reconsume |
13287 |
|
|
} |
13288 |
|
|
} |
13289 |
|
|
} else { |
13290 |
|
|
$self->{parse_error}->(); |
13291 |
|
|
unshift @{$self->{char}}, (99, 101, 105, $self->{next_input_character}); |
13292 |
|
|
$self->{next_input_character} = 114; |
13293 |
|
|
} |
13294 |
|
|
} else { |
13295 |
|
|
$self->{parse_error}->(); |
13296 |
|
|
unshift @{$self->{char}}, (99, 101, $self->{next_input_character}); |
13297 |
|
|
$self->{next_input_character} = 114; |
13298 |
|
|
} |
13299 |
|
|
} else { |
13300 |
|
|
$self->{parse_error}->(); |
13301 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
13302 |
|
|
$self->{next_input_character} = 114; |
13303 |
|
|
} |
13304 |
|
|
} elsif ($self->{next_input_character} == 100) { # d |
13305 |
|
|
|
13306 |
|
|
if (@{$self->{char}}) { |
13307 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13308 |
|
|
} else { |
13309 |
|
|
$self->{set_next_input_character}->($self); |
13310 |
|
|
} |
13311 |
|
|
|
13312 |
|
|
if ($self->{next_input_character} == 113) { # q |
13313 |
|
|
|
13314 |
|
|
if (@{$self->{char}}) { |
13315 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13316 |
|
|
} else { |
13317 |
|
|
$self->{set_next_input_character}->($self); |
13318 |
|
|
} |
13319 |
|
|
|
13320 |
|
|
if ($self->{next_input_character} == 117) { # u |
13321 |
|
|
|
13322 |
|
|
if (@{$self->{char}}) { |
13323 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13324 |
|
|
} else { |
13325 |
|
|
$self->{set_next_input_character}->($self); |
13326 |
|
|
} |
13327 |
|
|
|
13328 |
|
|
if ($self->{next_input_character} == 111) { # o |
13329 |
|
|
|
13330 |
|
|
if (@{$self->{char}}) { |
13331 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13332 |
|
|
} else { |
13333 |
|
|
$self->{set_next_input_character}->($self); |
13334 |
|
|
} |
13335 |
|
|
|
13336 |
|
|
{ |
13337 |
|
|
$r = {type => 'character', data => qq<\x{201D}>}; # rdquo |
13338 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13339 |
|
|
|
13340 |
|
|
if (@{$self->{char}}) { |
13341 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13342 |
|
|
} else { |
13343 |
|
|
$self->{set_next_input_character}->($self); |
13344 |
|
|
} |
13345 |
|
|
|
13346 |
|
|
} else { |
13347 |
|
|
$self->{parse_error}->(); |
13348 |
|
|
## reconsume |
13349 |
|
|
} |
13350 |
|
|
} |
13351 |
|
|
} else { |
13352 |
|
|
$self->{parse_error}->(); |
13353 |
|
|
unshift @{$self->{char}}, (100, 113, 117, $self->{next_input_character}); |
13354 |
|
|
$self->{next_input_character} = 114; |
13355 |
|
|
} |
13356 |
|
|
} else { |
13357 |
|
|
$self->{parse_error}->(); |
13358 |
|
|
unshift @{$self->{char}}, (100, 113, $self->{next_input_character}); |
13359 |
|
|
$self->{next_input_character} = 114; |
13360 |
|
|
} |
13361 |
|
|
} else { |
13362 |
|
|
$self->{parse_error}->(); |
13363 |
|
|
unshift @{$self->{char}}, (100, $self->{next_input_character}); |
13364 |
|
|
$self->{next_input_character} = 114; |
13365 |
|
|
} |
13366 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
13367 |
|
|
|
13368 |
|
|
if (@{$self->{char}}) { |
13369 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13370 |
|
|
} else { |
13371 |
|
|
$self->{set_next_input_character}->($self); |
13372 |
|
|
} |
13373 |
|
|
|
13374 |
|
|
if ($self->{next_input_character} == 97) { # a |
13375 |
|
|
|
13376 |
|
|
if (@{$self->{char}}) { |
13377 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13378 |
|
|
} else { |
13379 |
|
|
$self->{set_next_input_character}->($self); |
13380 |
|
|
} |
13381 |
|
|
|
13382 |
|
|
if ($self->{next_input_character} == 108) { # l |
13383 |
|
|
|
13384 |
|
|
if (@{$self->{char}}) { |
13385 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13386 |
|
|
} else { |
13387 |
|
|
$self->{set_next_input_character}->($self); |
13388 |
|
|
} |
13389 |
|
|
|
13390 |
|
|
{ |
13391 |
|
|
$r = {type => 'character', data => qq<\x{211C}>}; # real |
13392 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13393 |
|
|
|
13394 |
|
|
if (@{$self->{char}}) { |
13395 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13396 |
|
|
} else { |
13397 |
|
|
$self->{set_next_input_character}->($self); |
13398 |
|
|
} |
13399 |
|
|
|
13400 |
|
|
} else { |
13401 |
|
|
$self->{parse_error}->(); |
13402 |
|
|
## reconsume |
13403 |
|
|
} |
13404 |
|
|
} |
13405 |
|
|
} else { |
13406 |
|
|
$self->{parse_error}->(); |
13407 |
|
|
unshift @{$self->{char}}, (101, 97, $self->{next_input_character}); |
13408 |
|
|
$self->{next_input_character} = 114; |
13409 |
|
|
} |
13410 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
13411 |
|
|
|
13412 |
|
|
if (@{$self->{char}}) { |
13413 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13414 |
|
|
} else { |
13415 |
|
|
$self->{set_next_input_character}->($self); |
13416 |
|
|
} |
13417 |
|
|
|
13418 |
|
|
{ |
13419 |
|
|
$r = {type => 'character', data => qq<\x{00AE}>}; # reg |
13420 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13421 |
|
|
|
13422 |
|
|
if (@{$self->{char}}) { |
13423 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13424 |
|
|
} else { |
13425 |
|
|
$self->{set_next_input_character}->($self); |
13426 |
|
|
} |
13427 |
|
|
|
13428 |
|
|
} else { |
13429 |
|
|
$self->{parse_error}->(); |
13430 |
|
|
## reconsume |
13431 |
|
|
} |
13432 |
|
|
} |
13433 |
|
|
} else { |
13434 |
|
|
$self->{parse_error}->(); |
13435 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
13436 |
|
|
$self->{next_input_character} = 114; |
13437 |
|
|
} |
13438 |
|
|
} elsif ($self->{next_input_character} == 102) { # f |
13439 |
|
|
|
13440 |
|
|
if (@{$self->{char}}) { |
13441 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13442 |
|
|
} else { |
13443 |
|
|
$self->{set_next_input_character}->($self); |
13444 |
|
|
} |
13445 |
|
|
|
13446 |
|
|
if ($self->{next_input_character} == 108) { # l |
13447 |
|
|
|
13448 |
|
|
if (@{$self->{char}}) { |
13449 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13450 |
|
|
} else { |
13451 |
|
|
$self->{set_next_input_character}->($self); |
13452 |
|
|
} |
13453 |
|
|
|
13454 |
|
|
if ($self->{next_input_character} == 111) { # o |
13455 |
|
|
|
13456 |
|
|
if (@{$self->{char}}) { |
13457 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13458 |
|
|
} else { |
13459 |
|
|
$self->{set_next_input_character}->($self); |
13460 |
|
|
} |
13461 |
|
|
|
13462 |
|
|
if ($self->{next_input_character} == 111) { # o |
13463 |
|
|
|
13464 |
|
|
if (@{$self->{char}}) { |
13465 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13466 |
|
|
} else { |
13467 |
|
|
$self->{set_next_input_character}->($self); |
13468 |
|
|
} |
13469 |
|
|
|
13470 |
|
|
if ($self->{next_input_character} == 114) { # r |
13471 |
|
|
|
13472 |
|
|
if (@{$self->{char}}) { |
13473 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13474 |
|
|
} else { |
13475 |
|
|
$self->{set_next_input_character}->($self); |
13476 |
|
|
} |
13477 |
|
|
|
13478 |
|
|
{ |
13479 |
|
|
$r = {type => 'character', data => qq<\x{230B}>}; # rfloor |
13480 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13481 |
|
|
|
13482 |
|
|
if (@{$self->{char}}) { |
13483 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13484 |
|
|
} else { |
13485 |
|
|
$self->{set_next_input_character}->($self); |
13486 |
|
|
} |
13487 |
|
|
|
13488 |
|
|
} else { |
13489 |
|
|
$self->{parse_error}->(); |
13490 |
|
|
## reconsume |
13491 |
|
|
} |
13492 |
|
|
} |
13493 |
|
|
} else { |
13494 |
|
|
$self->{parse_error}->(); |
13495 |
|
|
unshift @{$self->{char}}, (102, 108, 111, 111, $self->{next_input_character}); |
13496 |
|
|
$self->{next_input_character} = 114; |
13497 |
|
|
} |
13498 |
|
|
} else { |
13499 |
|
|
$self->{parse_error}->(); |
13500 |
|
|
unshift @{$self->{char}}, (102, 108, 111, $self->{next_input_character}); |
13501 |
|
|
$self->{next_input_character} = 114; |
13502 |
|
|
} |
13503 |
|
|
} else { |
13504 |
|
|
$self->{parse_error}->(); |
13505 |
|
|
unshift @{$self->{char}}, (102, 108, $self->{next_input_character}); |
13506 |
|
|
$self->{next_input_character} = 114; |
13507 |
|
|
} |
13508 |
|
|
} else { |
13509 |
|
|
$self->{parse_error}->(); |
13510 |
|
|
unshift @{$self->{char}}, (102, $self->{next_input_character}); |
13511 |
|
|
$self->{next_input_character} = 114; |
13512 |
|
|
} |
13513 |
|
|
} elsif ($self->{next_input_character} == 104) { # h |
13514 |
|
|
|
13515 |
|
|
if (@{$self->{char}}) { |
13516 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13517 |
|
|
} else { |
13518 |
|
|
$self->{set_next_input_character}->($self); |
13519 |
|
|
} |
13520 |
|
|
|
13521 |
|
|
if ($self->{next_input_character} == 111) { # o |
13522 |
|
|
|
13523 |
|
|
if (@{$self->{char}}) { |
13524 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13525 |
|
|
} else { |
13526 |
|
|
$self->{set_next_input_character}->($self); |
13527 |
|
|
} |
13528 |
|
|
|
13529 |
|
|
{ |
13530 |
|
|
$r = {type => 'character', data => qq<\x{03C1}>}; # rho |
13531 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13532 |
|
|
|
13533 |
|
|
if (@{$self->{char}}) { |
13534 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13535 |
|
|
} else { |
13536 |
|
|
$self->{set_next_input_character}->($self); |
13537 |
|
|
} |
13538 |
|
|
|
13539 |
|
|
} else { |
13540 |
|
|
$self->{parse_error}->(); |
13541 |
|
|
## reconsume |
13542 |
|
|
} |
13543 |
|
|
} |
13544 |
|
|
} else { |
13545 |
|
|
$self->{parse_error}->(); |
13546 |
|
|
unshift @{$self->{char}}, (104, $self->{next_input_character}); |
13547 |
|
|
$self->{next_input_character} = 114; |
13548 |
|
|
} |
13549 |
|
|
} elsif ($self->{next_input_character} == 108) { # l |
13550 |
|
|
|
13551 |
|
|
if (@{$self->{char}}) { |
13552 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13553 |
|
|
} else { |
13554 |
|
|
$self->{set_next_input_character}->($self); |
13555 |
|
|
} |
13556 |
|
|
|
13557 |
|
|
if ($self->{next_input_character} == 109) { # m |
13558 |
|
|
|
13559 |
|
|
if (@{$self->{char}}) { |
13560 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13561 |
|
|
} else { |
13562 |
|
|
$self->{set_next_input_character}->($self); |
13563 |
|
|
} |
13564 |
|
|
|
13565 |
|
|
{ |
13566 |
|
|
$r = {type => 'character', data => qq<\x{200F}>}; # rlm |
13567 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13568 |
|
|
|
13569 |
|
|
if (@{$self->{char}}) { |
13570 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13571 |
|
|
} else { |
13572 |
|
|
$self->{set_next_input_character}->($self); |
13573 |
|
|
} |
13574 |
|
|
|
13575 |
|
|
} else { |
13576 |
|
|
$self->{parse_error}->(); |
13577 |
|
|
## reconsume |
13578 |
|
|
} |
13579 |
|
|
} |
13580 |
|
|
} else { |
13581 |
|
|
$self->{parse_error}->(); |
13582 |
|
|
unshift @{$self->{char}}, (108, $self->{next_input_character}); |
13583 |
|
|
$self->{next_input_character} = 114; |
13584 |
|
|
} |
13585 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
13586 |
|
|
|
13587 |
|
|
if (@{$self->{char}}) { |
13588 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13589 |
|
|
} else { |
13590 |
|
|
$self->{set_next_input_character}->($self); |
13591 |
|
|
} |
13592 |
|
|
|
13593 |
|
|
if ($self->{next_input_character} == 97) { # a |
13594 |
|
|
|
13595 |
|
|
if (@{$self->{char}}) { |
13596 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13597 |
|
|
} else { |
13598 |
|
|
$self->{set_next_input_character}->($self); |
13599 |
|
|
} |
13600 |
|
|
|
13601 |
|
|
if ($self->{next_input_character} == 113) { # q |
13602 |
|
|
|
13603 |
|
|
if (@{$self->{char}}) { |
13604 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13605 |
|
|
} else { |
13606 |
|
|
$self->{set_next_input_character}->($self); |
13607 |
|
|
} |
13608 |
|
|
|
13609 |
|
|
if ($self->{next_input_character} == 117) { # u |
13610 |
|
|
|
13611 |
|
|
if (@{$self->{char}}) { |
13612 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13613 |
|
|
} else { |
13614 |
|
|
$self->{set_next_input_character}->($self); |
13615 |
|
|
} |
13616 |
|
|
|
13617 |
|
|
if ($self->{next_input_character} == 111) { # o |
13618 |
|
|
|
13619 |
|
|
if (@{$self->{char}}) { |
13620 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13621 |
|
|
} else { |
13622 |
|
|
$self->{set_next_input_character}->($self); |
13623 |
|
|
} |
13624 |
|
|
|
13625 |
|
|
{ |
13626 |
|
|
$r = {type => 'character', data => qq<\x{203A}>}; # rsaquo |
13627 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13628 |
|
|
|
13629 |
|
|
if (@{$self->{char}}) { |
13630 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13631 |
|
|
} else { |
13632 |
|
|
$self->{set_next_input_character}->($self); |
13633 |
|
|
} |
13634 |
|
|
|
13635 |
|
|
} else { |
13636 |
|
|
$self->{parse_error}->(); |
13637 |
|
|
## reconsume |
13638 |
|
|
} |
13639 |
|
|
} |
13640 |
|
|
} else { |
13641 |
|
|
$self->{parse_error}->(); |
13642 |
|
|
unshift @{$self->{char}}, (115, 97, 113, 117, $self->{next_input_character}); |
13643 |
|
|
$self->{next_input_character} = 114; |
13644 |
|
|
} |
13645 |
|
|
} else { |
13646 |
|
|
$self->{parse_error}->(); |
13647 |
|
|
unshift @{$self->{char}}, (115, 97, 113, $self->{next_input_character}); |
13648 |
|
|
$self->{next_input_character} = 114; |
13649 |
|
|
} |
13650 |
|
|
} else { |
13651 |
|
|
$self->{parse_error}->(); |
13652 |
|
|
unshift @{$self->{char}}, (115, 97, $self->{next_input_character}); |
13653 |
|
|
$self->{next_input_character} = 114; |
13654 |
|
|
} |
13655 |
|
|
} elsif ($self->{next_input_character} == 113) { # q |
13656 |
|
|
|
13657 |
|
|
if (@{$self->{char}}) { |
13658 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13659 |
|
|
} else { |
13660 |
|
|
$self->{set_next_input_character}->($self); |
13661 |
|
|
} |
13662 |
|
|
|
13663 |
|
|
if ($self->{next_input_character} == 117) { # u |
13664 |
|
|
|
13665 |
|
|
if (@{$self->{char}}) { |
13666 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13667 |
|
|
} else { |
13668 |
|
|
$self->{set_next_input_character}->($self); |
13669 |
|
|
} |
13670 |
|
|
|
13671 |
|
|
if ($self->{next_input_character} == 111) { # o |
13672 |
|
|
|
13673 |
|
|
if (@{$self->{char}}) { |
13674 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13675 |
|
|
} else { |
13676 |
|
|
$self->{set_next_input_character}->($self); |
13677 |
|
|
} |
13678 |
|
|
|
13679 |
|
|
{ |
13680 |
|
|
$r = {type => 'character', data => qq<\x{2019}>}; # rsquo |
13681 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13682 |
|
|
|
13683 |
|
|
if (@{$self->{char}}) { |
13684 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13685 |
|
|
} else { |
13686 |
|
|
$self->{set_next_input_character}->($self); |
13687 |
|
|
} |
13688 |
|
|
|
13689 |
|
|
} else { |
13690 |
|
|
$self->{parse_error}->(); |
13691 |
|
|
## reconsume |
13692 |
|
|
} |
13693 |
|
|
} |
13694 |
|
|
} else { |
13695 |
|
|
$self->{parse_error}->(); |
13696 |
|
|
unshift @{$self->{char}}, (115, 113, 117, $self->{next_input_character}); |
13697 |
|
|
$self->{next_input_character} = 114; |
13698 |
|
|
} |
13699 |
|
|
} else { |
13700 |
|
|
$self->{parse_error}->(); |
13701 |
|
|
unshift @{$self->{char}}, (115, 113, $self->{next_input_character}); |
13702 |
|
|
$self->{next_input_character} = 114; |
13703 |
|
|
} |
13704 |
|
|
} else { |
13705 |
|
|
$self->{parse_error}->(); |
13706 |
|
|
unshift @{$self->{char}}, (115, $self->{next_input_character}); |
13707 |
|
|
$self->{next_input_character} = 114; |
13708 |
|
|
} |
13709 |
|
|
} else { |
13710 |
|
|
$self->{parse_error}->(); |
13711 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
13712 |
|
|
$self->{next_input_character} = 114; |
13713 |
|
|
} |
13714 |
|
|
} elsif ($self->{next_input_character} == 115) { # s |
13715 |
|
|
|
13716 |
|
|
if (@{$self->{char}}) { |
13717 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13718 |
|
|
} else { |
13719 |
|
|
$self->{set_next_input_character}->($self); |
13720 |
|
|
} |
13721 |
|
|
|
13722 |
|
|
if ($self->{next_input_character} == 98) { # b |
13723 |
|
|
|
13724 |
|
|
if (@{$self->{char}}) { |
13725 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13726 |
|
|
} else { |
13727 |
|
|
$self->{set_next_input_character}->($self); |
13728 |
|
|
} |
13729 |
|
|
|
13730 |
|
|
if ($self->{next_input_character} == 113) { # q |
13731 |
|
|
|
13732 |
|
|
if (@{$self->{char}}) { |
13733 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13734 |
|
|
} else { |
13735 |
|
|
$self->{set_next_input_character}->($self); |
13736 |
|
|
} |
13737 |
|
|
|
13738 |
|
|
if ($self->{next_input_character} == 117) { # u |
13739 |
|
|
|
13740 |
|
|
if (@{$self->{char}}) { |
13741 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13742 |
|
|
} else { |
13743 |
|
|
$self->{set_next_input_character}->($self); |
13744 |
|
|
} |
13745 |
|
|
|
13746 |
|
|
if ($self->{next_input_character} == 111) { # o |
13747 |
|
|
|
13748 |
|
|
if (@{$self->{char}}) { |
13749 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13750 |
|
|
} else { |
13751 |
|
|
$self->{set_next_input_character}->($self); |
13752 |
|
|
} |
13753 |
|
|
|
13754 |
|
|
{ |
13755 |
|
|
$r = {type => 'character', data => qq<\x{201A}>}; # sbquo |
13756 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13757 |
|
|
|
13758 |
|
|
if (@{$self->{char}}) { |
13759 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13760 |
|
|
} else { |
13761 |
|
|
$self->{set_next_input_character}->($self); |
13762 |
|
|
} |
13763 |
|
|
|
13764 |
|
|
} else { |
13765 |
|
|
$self->{parse_error}->(); |
13766 |
|
|
## reconsume |
13767 |
|
|
} |
13768 |
|
|
} |
13769 |
|
|
} else { |
13770 |
|
|
$self->{parse_error}->(); |
13771 |
|
|
unshift @{$self->{char}}, (98, 113, 117, $self->{next_input_character}); |
13772 |
|
|
$self->{next_input_character} = 115; |
13773 |
|
|
} |
13774 |
|
|
} else { |
13775 |
|
|
$self->{parse_error}->(); |
13776 |
|
|
unshift @{$self->{char}}, (98, 113, $self->{next_input_character}); |
13777 |
|
|
$self->{next_input_character} = 115; |
13778 |
|
|
} |
13779 |
|
|
} else { |
13780 |
|
|
$self->{parse_error}->(); |
13781 |
|
|
unshift @{$self->{char}}, (98, $self->{next_input_character}); |
13782 |
|
|
$self->{next_input_character} = 115; |
13783 |
|
|
} |
13784 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
13785 |
|
|
|
13786 |
|
|
if (@{$self->{char}}) { |
13787 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13788 |
|
|
} else { |
13789 |
|
|
$self->{set_next_input_character}->($self); |
13790 |
|
|
} |
13791 |
|
|
|
13792 |
|
|
if ($self->{next_input_character} == 97) { # a |
13793 |
|
|
|
13794 |
|
|
if (@{$self->{char}}) { |
13795 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13796 |
|
|
} else { |
13797 |
|
|
$self->{set_next_input_character}->($self); |
13798 |
|
|
} |
13799 |
|
|
|
13800 |
|
|
if ($self->{next_input_character} == 114) { # r |
13801 |
|
|
|
13802 |
|
|
if (@{$self->{char}}) { |
13803 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13804 |
|
|
} else { |
13805 |
|
|
$self->{set_next_input_character}->($self); |
13806 |
|
|
} |
13807 |
|
|
|
13808 |
|
|
if ($self->{next_input_character} == 111) { # o |
13809 |
|
|
|
13810 |
|
|
if (@{$self->{char}}) { |
13811 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13812 |
|
|
} else { |
13813 |
|
|
$self->{set_next_input_character}->($self); |
13814 |
|
|
} |
13815 |
|
|
|
13816 |
|
|
if ($self->{next_input_character} == 110) { # n |
13817 |
|
|
|
13818 |
|
|
if (@{$self->{char}}) { |
13819 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13820 |
|
|
} else { |
13821 |
|
|
$self->{set_next_input_character}->($self); |
13822 |
|
|
} |
13823 |
|
|
|
13824 |
|
|
{ |
13825 |
|
|
$r = {type => 'character', data => qq<\x{0161}>}; # scaron |
13826 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13827 |
|
|
|
13828 |
|
|
if (@{$self->{char}}) { |
13829 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13830 |
|
|
} else { |
13831 |
|
|
$self->{set_next_input_character}->($self); |
13832 |
|
|
} |
13833 |
|
|
|
13834 |
|
|
} else { |
13835 |
|
|
$self->{parse_error}->(); |
13836 |
|
|
## reconsume |
13837 |
|
|
} |
13838 |
|
|
} |
13839 |
|
|
} else { |
13840 |
|
|
$self->{parse_error}->(); |
13841 |
|
|
unshift @{$self->{char}}, (99, 97, 114, 111, $self->{next_input_character}); |
13842 |
|
|
$self->{next_input_character} = 115; |
13843 |
|
|
} |
13844 |
|
|
} else { |
13845 |
|
|
$self->{parse_error}->(); |
13846 |
|
|
unshift @{$self->{char}}, (99, 97, 114, $self->{next_input_character}); |
13847 |
|
|
$self->{next_input_character} = 115; |
13848 |
|
|
} |
13849 |
|
|
} else { |
13850 |
|
|
$self->{parse_error}->(); |
13851 |
|
|
unshift @{$self->{char}}, (99, 97, $self->{next_input_character}); |
13852 |
|
|
$self->{next_input_character} = 115; |
13853 |
|
|
} |
13854 |
|
|
} else { |
13855 |
|
|
$self->{parse_error}->(); |
13856 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
13857 |
|
|
$self->{next_input_character} = 115; |
13858 |
|
|
} |
13859 |
|
|
} elsif ($self->{next_input_character} == 100) { # d |
13860 |
|
|
|
13861 |
|
|
if (@{$self->{char}}) { |
13862 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13863 |
|
|
} else { |
13864 |
|
|
$self->{set_next_input_character}->($self); |
13865 |
|
|
} |
13866 |
|
|
|
13867 |
|
|
if ($self->{next_input_character} == 111) { # o |
13868 |
|
|
|
13869 |
|
|
if (@{$self->{char}}) { |
13870 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13871 |
|
|
} else { |
13872 |
|
|
$self->{set_next_input_character}->($self); |
13873 |
|
|
} |
13874 |
|
|
|
13875 |
|
|
if ($self->{next_input_character} == 116) { # t |
13876 |
|
|
|
13877 |
|
|
if (@{$self->{char}}) { |
13878 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13879 |
|
|
} else { |
13880 |
|
|
$self->{set_next_input_character}->($self); |
13881 |
|
|
} |
13882 |
|
|
|
13883 |
|
|
{ |
13884 |
|
|
$r = {type => 'character', data => qq<\x{22C5}>}; # sdot |
13885 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13886 |
|
|
|
13887 |
|
|
if (@{$self->{char}}) { |
13888 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13889 |
|
|
} else { |
13890 |
|
|
$self->{set_next_input_character}->($self); |
13891 |
|
|
} |
13892 |
|
|
|
13893 |
|
|
} else { |
13894 |
|
|
$self->{parse_error}->(); |
13895 |
|
|
## reconsume |
13896 |
|
|
} |
13897 |
|
|
} |
13898 |
|
|
} else { |
13899 |
|
|
$self->{parse_error}->(); |
13900 |
|
|
unshift @{$self->{char}}, (100, 111, $self->{next_input_character}); |
13901 |
|
|
$self->{next_input_character} = 115; |
13902 |
|
|
} |
13903 |
|
|
} else { |
13904 |
|
|
$self->{parse_error}->(); |
13905 |
|
|
unshift @{$self->{char}}, (100, $self->{next_input_character}); |
13906 |
|
|
$self->{next_input_character} = 115; |
13907 |
|
|
} |
13908 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
13909 |
|
|
|
13910 |
|
|
if (@{$self->{char}}) { |
13911 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13912 |
|
|
} else { |
13913 |
|
|
$self->{set_next_input_character}->($self); |
13914 |
|
|
} |
13915 |
|
|
|
13916 |
|
|
if ($self->{next_input_character} == 99) { # c |
13917 |
|
|
|
13918 |
|
|
if (@{$self->{char}}) { |
13919 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13920 |
|
|
} else { |
13921 |
|
|
$self->{set_next_input_character}->($self); |
13922 |
|
|
} |
13923 |
|
|
|
13924 |
|
|
if ($self->{next_input_character} == 116) { # t |
13925 |
|
|
|
13926 |
|
|
if (@{$self->{char}}) { |
13927 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13928 |
|
|
} else { |
13929 |
|
|
$self->{set_next_input_character}->($self); |
13930 |
|
|
} |
13931 |
|
|
|
13932 |
|
|
{ |
13933 |
|
|
$r = {type => 'character', data => qq<\x{00A7}>}; # sect |
13934 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13935 |
|
|
|
13936 |
|
|
if (@{$self->{char}}) { |
13937 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13938 |
|
|
} else { |
13939 |
|
|
$self->{set_next_input_character}->($self); |
13940 |
|
|
} |
13941 |
|
|
|
13942 |
|
|
} else { |
13943 |
|
|
$self->{parse_error}->(); |
13944 |
|
|
## reconsume |
13945 |
|
|
} |
13946 |
|
|
} |
13947 |
|
|
} else { |
13948 |
|
|
$self->{parse_error}->(); |
13949 |
|
|
unshift @{$self->{char}}, (101, 99, $self->{next_input_character}); |
13950 |
|
|
$self->{next_input_character} = 115; |
13951 |
|
|
} |
13952 |
|
|
} else { |
13953 |
|
|
$self->{parse_error}->(); |
13954 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
13955 |
|
|
$self->{next_input_character} = 115; |
13956 |
|
|
} |
13957 |
|
|
} elsif ($self->{next_input_character} == 104) { # h |
13958 |
|
|
|
13959 |
|
|
if (@{$self->{char}}) { |
13960 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13961 |
|
|
} else { |
13962 |
|
|
$self->{set_next_input_character}->($self); |
13963 |
|
|
} |
13964 |
|
|
|
13965 |
|
|
if ($self->{next_input_character} == 121) { # y |
13966 |
|
|
|
13967 |
|
|
if (@{$self->{char}}) { |
13968 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13969 |
|
|
} else { |
13970 |
|
|
$self->{set_next_input_character}->($self); |
13971 |
|
|
} |
13972 |
|
|
|
13973 |
|
|
{ |
13974 |
|
|
$r = {type => 'character', data => qq<\x{00AD}>}; # shy |
13975 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
13976 |
|
|
|
13977 |
|
|
if (@{$self->{char}}) { |
13978 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13979 |
|
|
} else { |
13980 |
|
|
$self->{set_next_input_character}->($self); |
13981 |
|
|
} |
13982 |
|
|
|
13983 |
|
|
} else { |
13984 |
|
|
$self->{parse_error}->(); |
13985 |
|
|
## reconsume |
13986 |
|
|
} |
13987 |
|
|
} |
13988 |
|
|
} else { |
13989 |
|
|
$self->{parse_error}->(); |
13990 |
|
|
unshift @{$self->{char}}, (104, $self->{next_input_character}); |
13991 |
|
|
$self->{next_input_character} = 115; |
13992 |
|
|
} |
13993 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
13994 |
|
|
|
13995 |
|
|
if (@{$self->{char}}) { |
13996 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
13997 |
|
|
} else { |
13998 |
|
|
$self->{set_next_input_character}->($self); |
13999 |
|
|
} |
14000 |
|
|
|
14001 |
|
|
if ($self->{next_input_character} == 103) { # g |
14002 |
|
|
|
14003 |
|
|
if (@{$self->{char}}) { |
14004 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14005 |
|
|
} else { |
14006 |
|
|
$self->{set_next_input_character}->($self); |
14007 |
|
|
} |
14008 |
|
|
|
14009 |
|
|
if ($self->{next_input_character} == 109) { # m |
14010 |
|
|
|
14011 |
|
|
if (@{$self->{char}}) { |
14012 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14013 |
|
|
} else { |
14014 |
|
|
$self->{set_next_input_character}->($self); |
14015 |
|
|
} |
14016 |
|
|
|
14017 |
|
|
if ($self->{next_input_character} == 97) { # a |
14018 |
|
|
|
14019 |
|
|
if (@{$self->{char}}) { |
14020 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14021 |
|
|
} else { |
14022 |
|
|
$self->{set_next_input_character}->($self); |
14023 |
|
|
} |
14024 |
|
|
|
14025 |
|
|
if ($self->{next_input_character} == 102) { # f |
14026 |
|
|
|
14027 |
|
|
if (@{$self->{char}}) { |
14028 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14029 |
|
|
} else { |
14030 |
|
|
$self->{set_next_input_character}->($self); |
14031 |
|
|
} |
14032 |
|
|
|
14033 |
|
|
{ |
14034 |
|
|
$r = {type => 'character', data => qq<\x{03C2}>}; # sigmaf |
14035 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14036 |
|
|
|
14037 |
|
|
if (@{$self->{char}}) { |
14038 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14039 |
|
|
} else { |
14040 |
|
|
$self->{set_next_input_character}->($self); |
14041 |
|
|
} |
14042 |
|
|
|
14043 |
|
|
} else { |
14044 |
|
|
$self->{parse_error}->(); |
14045 |
|
|
## reconsume |
14046 |
|
|
} |
14047 |
|
|
} |
14048 |
|
|
} else { |
14049 |
|
|
$r = {type => 'character', data => qq<\x{03C3}>}; # sigma |
14050 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14051 |
|
|
|
14052 |
|
|
if (@{$self->{char}}) { |
14053 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14054 |
|
|
} else { |
14055 |
|
|
$self->{set_next_input_character}->($self); |
14056 |
|
|
} |
14057 |
|
|
|
14058 |
|
|
} else { |
14059 |
|
|
$self->{parse_error}->(); |
14060 |
|
|
## reconsume |
14061 |
|
|
} |
14062 |
|
|
} |
14063 |
|
|
} else { |
14064 |
|
|
$self->{parse_error}->(); |
14065 |
|
|
unshift @{$self->{char}}, (105, 103, 109, $self->{next_input_character}); |
14066 |
|
|
$self->{next_input_character} = 115; |
14067 |
|
|
} |
14068 |
|
|
} else { |
14069 |
|
|
$self->{parse_error}->(); |
14070 |
|
|
unshift @{$self->{char}}, (105, 103, $self->{next_input_character}); |
14071 |
|
|
$self->{next_input_character} = 115; |
14072 |
|
|
} |
14073 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
14074 |
|
|
|
14075 |
|
|
if (@{$self->{char}}) { |
14076 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14077 |
|
|
} else { |
14078 |
|
|
$self->{set_next_input_character}->($self); |
14079 |
|
|
} |
14080 |
|
|
|
14081 |
|
|
{ |
14082 |
|
|
$r = {type => 'character', data => qq<\x{223C}>}; # sim |
14083 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14084 |
|
|
|
14085 |
|
|
if (@{$self->{char}}) { |
14086 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14087 |
|
|
} else { |
14088 |
|
|
$self->{set_next_input_character}->($self); |
14089 |
|
|
} |
14090 |
|
|
|
14091 |
|
|
} else { |
14092 |
|
|
$self->{parse_error}->(); |
14093 |
|
|
## reconsume |
14094 |
|
|
} |
14095 |
|
|
} |
14096 |
|
|
} else { |
14097 |
|
|
$self->{parse_error}->(); |
14098 |
|
|
unshift @{$self->{char}}, (105, $self->{next_input_character}); |
14099 |
|
|
$self->{next_input_character} = 115; |
14100 |
|
|
} |
14101 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
14102 |
|
|
|
14103 |
|
|
if (@{$self->{char}}) { |
14104 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14105 |
|
|
} else { |
14106 |
|
|
$self->{set_next_input_character}->($self); |
14107 |
|
|
} |
14108 |
|
|
|
14109 |
|
|
if ($self->{next_input_character} == 97) { # a |
14110 |
|
|
|
14111 |
|
|
if (@{$self->{char}}) { |
14112 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14113 |
|
|
} else { |
14114 |
|
|
$self->{set_next_input_character}->($self); |
14115 |
|
|
} |
14116 |
|
|
|
14117 |
|
|
if ($self->{next_input_character} == 100) { # d |
14118 |
|
|
|
14119 |
|
|
if (@{$self->{char}}) { |
14120 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14121 |
|
|
} else { |
14122 |
|
|
$self->{set_next_input_character}->($self); |
14123 |
|
|
} |
14124 |
|
|
|
14125 |
|
|
if ($self->{next_input_character} == 101) { # e |
14126 |
|
|
|
14127 |
|
|
if (@{$self->{char}}) { |
14128 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14129 |
|
|
} else { |
14130 |
|
|
$self->{set_next_input_character}->($self); |
14131 |
|
|
} |
14132 |
|
|
|
14133 |
|
|
if ($self->{next_input_character} == 115) { # s |
14134 |
|
|
|
14135 |
|
|
if (@{$self->{char}}) { |
14136 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14137 |
|
|
} else { |
14138 |
|
|
$self->{set_next_input_character}->($self); |
14139 |
|
|
} |
14140 |
|
|
|
14141 |
|
|
{ |
14142 |
|
|
$r = {type => 'character', data => qq<\x{2660}>}; # spades |
14143 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14144 |
|
|
|
14145 |
|
|
if (@{$self->{char}}) { |
14146 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14147 |
|
|
} else { |
14148 |
|
|
$self->{set_next_input_character}->($self); |
14149 |
|
|
} |
14150 |
|
|
|
14151 |
|
|
} else { |
14152 |
|
|
$self->{parse_error}->(); |
14153 |
|
|
## reconsume |
14154 |
|
|
} |
14155 |
|
|
} |
14156 |
|
|
} else { |
14157 |
|
|
$self->{parse_error}->(); |
14158 |
|
|
unshift @{$self->{char}}, (112, 97, 100, 101, $self->{next_input_character}); |
14159 |
|
|
$self->{next_input_character} = 115; |
14160 |
|
|
} |
14161 |
|
|
} else { |
14162 |
|
|
$self->{parse_error}->(); |
14163 |
|
|
unshift @{$self->{char}}, (112, 97, 100, $self->{next_input_character}); |
14164 |
|
|
$self->{next_input_character} = 115; |
14165 |
|
|
} |
14166 |
|
|
} else { |
14167 |
|
|
$self->{parse_error}->(); |
14168 |
|
|
unshift @{$self->{char}}, (112, 97, $self->{next_input_character}); |
14169 |
|
|
$self->{next_input_character} = 115; |
14170 |
|
|
} |
14171 |
|
|
} else { |
14172 |
|
|
$self->{parse_error}->(); |
14173 |
|
|
unshift @{$self->{char}}, (112, $self->{next_input_character}); |
14174 |
|
|
$self->{next_input_character} = 115; |
14175 |
|
|
} |
14176 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
14177 |
|
|
|
14178 |
|
|
if (@{$self->{char}}) { |
14179 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14180 |
|
|
} else { |
14181 |
|
|
$self->{set_next_input_character}->($self); |
14182 |
|
|
} |
14183 |
|
|
|
14184 |
|
|
if ($self->{next_input_character} == 98) { # b |
14185 |
|
|
|
14186 |
|
|
if (@{$self->{char}}) { |
14187 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14188 |
|
|
} else { |
14189 |
|
|
$self->{set_next_input_character}->($self); |
14190 |
|
|
} |
14191 |
|
|
|
14192 |
|
|
if ($self->{next_input_character} == 101) { # e |
14193 |
|
|
|
14194 |
|
|
if (@{$self->{char}}) { |
14195 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14196 |
|
|
} else { |
14197 |
|
|
$self->{set_next_input_character}->($self); |
14198 |
|
|
} |
14199 |
|
|
|
14200 |
|
|
{ |
14201 |
|
|
$r = {type => 'character', data => qq<\x{2286}>}; # sube |
14202 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14203 |
|
|
|
14204 |
|
|
if (@{$self->{char}}) { |
14205 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14206 |
|
|
} else { |
14207 |
|
|
$self->{set_next_input_character}->($self); |
14208 |
|
|
} |
14209 |
|
|
|
14210 |
|
|
} else { |
14211 |
|
|
$self->{parse_error}->(); |
14212 |
|
|
## reconsume |
14213 |
|
|
} |
14214 |
|
|
} |
14215 |
|
|
} else { |
14216 |
|
|
$r = {type => 'character', data => qq<\x{2282}>}; # sub |
14217 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14218 |
|
|
|
14219 |
|
|
if (@{$self->{char}}) { |
14220 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14221 |
|
|
} else { |
14222 |
|
|
$self->{set_next_input_character}->($self); |
14223 |
|
|
} |
14224 |
|
|
|
14225 |
|
|
} else { |
14226 |
|
|
$self->{parse_error}->(); |
14227 |
|
|
## reconsume |
14228 |
|
|
} |
14229 |
|
|
} |
14230 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
14231 |
|
|
|
14232 |
|
|
if (@{$self->{char}}) { |
14233 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14234 |
|
|
} else { |
14235 |
|
|
$self->{set_next_input_character}->($self); |
14236 |
|
|
} |
14237 |
|
|
|
14238 |
|
|
{ |
14239 |
|
|
$r = {type => 'character', data => qq<\x{2211}>}; # sum |
14240 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14241 |
|
|
|
14242 |
|
|
if (@{$self->{char}}) { |
14243 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14244 |
|
|
} else { |
14245 |
|
|
$self->{set_next_input_character}->($self); |
14246 |
|
|
} |
14247 |
|
|
|
14248 |
|
|
} else { |
14249 |
|
|
$self->{parse_error}->(); |
14250 |
|
|
## reconsume |
14251 |
|
|
} |
14252 |
|
|
} |
14253 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
14254 |
|
|
|
14255 |
|
|
if (@{$self->{char}}) { |
14256 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14257 |
|
|
} else { |
14258 |
|
|
$self->{set_next_input_character}->($self); |
14259 |
|
|
} |
14260 |
|
|
|
14261 |
|
|
if ($self->{next_input_character} == 49) { # 1 |
14262 |
|
|
|
14263 |
|
|
if (@{$self->{char}}) { |
14264 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14265 |
|
|
} else { |
14266 |
|
|
$self->{set_next_input_character}->($self); |
14267 |
|
|
} |
14268 |
|
|
|
14269 |
|
|
{ |
14270 |
|
|
$r = {type => 'character', data => qq<\x{00B9}>}; # sup1 |
14271 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14272 |
|
|
|
14273 |
|
|
if (@{$self->{char}}) { |
14274 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14275 |
|
|
} else { |
14276 |
|
|
$self->{set_next_input_character}->($self); |
14277 |
|
|
} |
14278 |
|
|
|
14279 |
|
|
} else { |
14280 |
|
|
$self->{parse_error}->(); |
14281 |
|
|
## reconsume |
14282 |
|
|
} |
14283 |
|
|
} |
14284 |
|
|
} elsif ($self->{next_input_character} == 50) { # 2 |
14285 |
|
|
|
14286 |
|
|
if (@{$self->{char}}) { |
14287 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14288 |
|
|
} else { |
14289 |
|
|
$self->{set_next_input_character}->($self); |
14290 |
|
|
} |
14291 |
|
|
|
14292 |
|
|
{ |
14293 |
|
|
$r = {type => 'character', data => qq<\x{00B2}>}; # sup2 |
14294 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14295 |
|
|
|
14296 |
|
|
if (@{$self->{char}}) { |
14297 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14298 |
|
|
} else { |
14299 |
|
|
$self->{set_next_input_character}->($self); |
14300 |
|
|
} |
14301 |
|
|
|
14302 |
|
|
} else { |
14303 |
|
|
$self->{parse_error}->(); |
14304 |
|
|
## reconsume |
14305 |
|
|
} |
14306 |
|
|
} |
14307 |
|
|
} elsif ($self->{next_input_character} == 51) { # 3 |
14308 |
|
|
|
14309 |
|
|
if (@{$self->{char}}) { |
14310 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14311 |
|
|
} else { |
14312 |
|
|
$self->{set_next_input_character}->($self); |
14313 |
|
|
} |
14314 |
|
|
|
14315 |
|
|
{ |
14316 |
|
|
$r = {type => 'character', data => qq<\x{00B3}>}; # sup3 |
14317 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14318 |
|
|
|
14319 |
|
|
if (@{$self->{char}}) { |
14320 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14321 |
|
|
} else { |
14322 |
|
|
$self->{set_next_input_character}->($self); |
14323 |
|
|
} |
14324 |
|
|
|
14325 |
|
|
} else { |
14326 |
|
|
$self->{parse_error}->(); |
14327 |
|
|
## reconsume |
14328 |
|
|
} |
14329 |
|
|
} |
14330 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
14331 |
|
|
|
14332 |
|
|
if (@{$self->{char}}) { |
14333 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14334 |
|
|
} else { |
14335 |
|
|
$self->{set_next_input_character}->($self); |
14336 |
|
|
} |
14337 |
|
|
|
14338 |
|
|
{ |
14339 |
|
|
$r = {type => 'character', data => qq<\x{2287}>}; # supe |
14340 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14341 |
|
|
|
14342 |
|
|
if (@{$self->{char}}) { |
14343 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14344 |
|
|
} else { |
14345 |
|
|
$self->{set_next_input_character}->($self); |
14346 |
|
|
} |
14347 |
|
|
|
14348 |
|
|
} else { |
14349 |
|
|
$self->{parse_error}->(); |
14350 |
|
|
## reconsume |
14351 |
|
|
} |
14352 |
|
|
} |
14353 |
|
|
} else { |
14354 |
|
|
$r = {type => 'character', data => qq<\x{2283}>}; # sup |
14355 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14356 |
|
|
|
14357 |
|
|
if (@{$self->{char}}) { |
14358 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14359 |
|
|
} else { |
14360 |
|
|
$self->{set_next_input_character}->($self); |
14361 |
|
|
} |
14362 |
|
|
|
14363 |
|
|
} else { |
14364 |
|
|
$self->{parse_error}->(); |
14365 |
|
|
## reconsume |
14366 |
|
|
} |
14367 |
|
|
} |
14368 |
|
|
} else { |
14369 |
|
|
$self->{parse_error}->(); |
14370 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
14371 |
|
|
$self->{next_input_character} = 115; |
14372 |
|
|
} |
14373 |
|
|
} elsif ($self->{next_input_character} == 122) { # z |
14374 |
|
|
|
14375 |
|
|
if (@{$self->{char}}) { |
14376 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14377 |
|
|
} else { |
14378 |
|
|
$self->{set_next_input_character}->($self); |
14379 |
|
|
} |
14380 |
|
|
|
14381 |
|
|
if ($self->{next_input_character} == 108) { # l |
14382 |
|
|
|
14383 |
|
|
if (@{$self->{char}}) { |
14384 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14385 |
|
|
} else { |
14386 |
|
|
$self->{set_next_input_character}->($self); |
14387 |
|
|
} |
14388 |
|
|
|
14389 |
|
|
if ($self->{next_input_character} == 105) { # i |
14390 |
|
|
|
14391 |
|
|
if (@{$self->{char}}) { |
14392 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14393 |
|
|
} else { |
14394 |
|
|
$self->{set_next_input_character}->($self); |
14395 |
|
|
} |
14396 |
|
|
|
14397 |
|
|
if ($self->{next_input_character} == 103) { # g |
14398 |
|
|
|
14399 |
|
|
if (@{$self->{char}}) { |
14400 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14401 |
|
|
} else { |
14402 |
|
|
$self->{set_next_input_character}->($self); |
14403 |
|
|
} |
14404 |
|
|
|
14405 |
|
|
{ |
14406 |
|
|
$r = {type => 'character', data => qq<\x{00DF}>}; # szlig |
14407 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14408 |
|
|
|
14409 |
|
|
if (@{$self->{char}}) { |
14410 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14411 |
|
|
} else { |
14412 |
|
|
$self->{set_next_input_character}->($self); |
14413 |
|
|
} |
14414 |
|
|
|
14415 |
|
|
} else { |
14416 |
|
|
$self->{parse_error}->(); |
14417 |
|
|
## reconsume |
14418 |
|
|
} |
14419 |
|
|
} |
14420 |
|
|
} else { |
14421 |
|
|
$self->{parse_error}->(); |
14422 |
|
|
unshift @{$self->{char}}, (122, 108, 105, $self->{next_input_character}); |
14423 |
|
|
$self->{next_input_character} = 115; |
14424 |
|
|
} |
14425 |
|
|
} else { |
14426 |
|
|
$self->{parse_error}->(); |
14427 |
|
|
unshift @{$self->{char}}, (122, 108, $self->{next_input_character}); |
14428 |
|
|
$self->{next_input_character} = 115; |
14429 |
|
|
} |
14430 |
|
|
} else { |
14431 |
|
|
$self->{parse_error}->(); |
14432 |
|
|
unshift @{$self->{char}}, (122, $self->{next_input_character}); |
14433 |
|
|
$self->{next_input_character} = 115; |
14434 |
|
|
} |
14435 |
|
|
} else { |
14436 |
|
|
$self->{parse_error}->(); |
14437 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
14438 |
|
|
$self->{next_input_character} = 115; |
14439 |
|
|
} |
14440 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
14441 |
|
|
|
14442 |
|
|
if (@{$self->{char}}) { |
14443 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14444 |
|
|
} else { |
14445 |
|
|
$self->{set_next_input_character}->($self); |
14446 |
|
|
} |
14447 |
|
|
|
14448 |
|
|
if ($self->{next_input_character} == 97) { # a |
14449 |
|
|
|
14450 |
|
|
if (@{$self->{char}}) { |
14451 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14452 |
|
|
} else { |
14453 |
|
|
$self->{set_next_input_character}->($self); |
14454 |
|
|
} |
14455 |
|
|
|
14456 |
|
|
if ($self->{next_input_character} == 117) { # u |
14457 |
|
|
|
14458 |
|
|
if (@{$self->{char}}) { |
14459 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14460 |
|
|
} else { |
14461 |
|
|
$self->{set_next_input_character}->($self); |
14462 |
|
|
} |
14463 |
|
|
|
14464 |
|
|
{ |
14465 |
|
|
$r = {type => 'character', data => qq<\x{03C4}>}; # tau |
14466 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14467 |
|
|
|
14468 |
|
|
if (@{$self->{char}}) { |
14469 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14470 |
|
|
} else { |
14471 |
|
|
$self->{set_next_input_character}->($self); |
14472 |
|
|
} |
14473 |
|
|
|
14474 |
|
|
} else { |
14475 |
|
|
$self->{parse_error}->(); |
14476 |
|
|
## reconsume |
14477 |
|
|
} |
14478 |
|
|
} |
14479 |
|
|
} else { |
14480 |
|
|
$self->{parse_error}->(); |
14481 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
14482 |
|
|
$self->{next_input_character} = 116; |
14483 |
|
|
} |
14484 |
|
|
} elsif ($self->{next_input_character} == 104) { # h |
14485 |
|
|
|
14486 |
|
|
if (@{$self->{char}}) { |
14487 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14488 |
|
|
} else { |
14489 |
|
|
$self->{set_next_input_character}->($self); |
14490 |
|
|
} |
14491 |
|
|
|
14492 |
|
|
if ($self->{next_input_character} == 101) { # e |
14493 |
|
|
|
14494 |
|
|
if (@{$self->{char}}) { |
14495 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14496 |
|
|
} else { |
14497 |
|
|
$self->{set_next_input_character}->($self); |
14498 |
|
|
} |
14499 |
|
|
|
14500 |
|
|
if ($self->{next_input_character} == 114) { # r |
14501 |
|
|
|
14502 |
|
|
if (@{$self->{char}}) { |
14503 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14504 |
|
|
} else { |
14505 |
|
|
$self->{set_next_input_character}->($self); |
14506 |
|
|
} |
14507 |
|
|
|
14508 |
|
|
if ($self->{next_input_character} == 101) { # e |
14509 |
|
|
|
14510 |
|
|
if (@{$self->{char}}) { |
14511 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14512 |
|
|
} else { |
14513 |
|
|
$self->{set_next_input_character}->($self); |
14514 |
|
|
} |
14515 |
|
|
|
14516 |
|
|
if ($self->{next_input_character} == 52) { # 4 |
14517 |
|
|
|
14518 |
|
|
if (@{$self->{char}}) { |
14519 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14520 |
|
|
} else { |
14521 |
|
|
$self->{set_next_input_character}->($self); |
14522 |
|
|
} |
14523 |
|
|
|
14524 |
|
|
{ |
14525 |
|
|
$r = {type => 'character', data => qq<\x{2234}>}; # there4 |
14526 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14527 |
|
|
|
14528 |
|
|
if (@{$self->{char}}) { |
14529 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14530 |
|
|
} else { |
14531 |
|
|
$self->{set_next_input_character}->($self); |
14532 |
|
|
} |
14533 |
|
|
|
14534 |
|
|
} else { |
14535 |
|
|
$self->{parse_error}->(); |
14536 |
|
|
## reconsume |
14537 |
|
|
} |
14538 |
|
|
} |
14539 |
|
|
} else { |
14540 |
|
|
$self->{parse_error}->(); |
14541 |
|
|
unshift @{$self->{char}}, (104, 101, 114, 101, $self->{next_input_character}); |
14542 |
|
|
$self->{next_input_character} = 116; |
14543 |
|
|
} |
14544 |
|
|
} else { |
14545 |
|
|
$self->{parse_error}->(); |
14546 |
|
|
unshift @{$self->{char}}, (104, 101, 114, $self->{next_input_character}); |
14547 |
|
|
$self->{next_input_character} = 116; |
14548 |
|
|
} |
14549 |
|
|
} elsif ($self->{next_input_character} == 116) { # t |
14550 |
|
|
|
14551 |
|
|
if (@{$self->{char}}) { |
14552 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14553 |
|
|
} else { |
14554 |
|
|
$self->{set_next_input_character}->($self); |
14555 |
|
|
} |
14556 |
|
|
|
14557 |
|
|
if ($self->{next_input_character} == 97) { # a |
14558 |
|
|
|
14559 |
|
|
if (@{$self->{char}}) { |
14560 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14561 |
|
|
} else { |
14562 |
|
|
$self->{set_next_input_character}->($self); |
14563 |
|
|
} |
14564 |
|
|
|
14565 |
|
|
if ($self->{next_input_character} == 115) { # s |
14566 |
|
|
|
14567 |
|
|
if (@{$self->{char}}) { |
14568 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14569 |
|
|
} else { |
14570 |
|
|
$self->{set_next_input_character}->($self); |
14571 |
|
|
} |
14572 |
|
|
|
14573 |
|
|
if ($self->{next_input_character} == 121) { # y |
14574 |
|
|
|
14575 |
|
|
if (@{$self->{char}}) { |
14576 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14577 |
|
|
} else { |
14578 |
|
|
$self->{set_next_input_character}->($self); |
14579 |
|
|
} |
14580 |
|
|
|
14581 |
|
|
if ($self->{next_input_character} == 109) { # m |
14582 |
|
|
|
14583 |
|
|
if (@{$self->{char}}) { |
14584 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14585 |
|
|
} else { |
14586 |
|
|
$self->{set_next_input_character}->($self); |
14587 |
|
|
} |
14588 |
|
|
|
14589 |
|
|
{ |
14590 |
|
|
$r = {type => 'character', data => qq<\x{03D1}>}; # thetasym |
14591 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14592 |
|
|
|
14593 |
|
|
if (@{$self->{char}}) { |
14594 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14595 |
|
|
} else { |
14596 |
|
|
$self->{set_next_input_character}->($self); |
14597 |
|
|
} |
14598 |
|
|
|
14599 |
|
|
} else { |
14600 |
|
|
$self->{parse_error}->(); |
14601 |
|
|
## reconsume |
14602 |
|
|
} |
14603 |
|
|
} |
14604 |
|
|
} else { |
14605 |
|
|
$self->{parse_error}->(); |
14606 |
|
|
unshift @{$self->{char}}, (104, 101, 116, 97, 115, 121, $self->{next_input_character}); |
14607 |
|
|
$self->{next_input_character} = 116; |
14608 |
|
|
} |
14609 |
|
|
} else { |
14610 |
|
|
$self->{parse_error}->(); |
14611 |
|
|
unshift @{$self->{char}}, (104, 101, 116, 97, 115, $self->{next_input_character}); |
14612 |
|
|
$self->{next_input_character} = 116; |
14613 |
|
|
} |
14614 |
|
|
} else { |
14615 |
|
|
$r = {type => 'character', data => qq<\x{03B8}>}; # theta |
14616 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14617 |
|
|
|
14618 |
|
|
if (@{$self->{char}}) { |
14619 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14620 |
|
|
} else { |
14621 |
|
|
$self->{set_next_input_character}->($self); |
14622 |
|
|
} |
14623 |
|
|
|
14624 |
|
|
} else { |
14625 |
|
|
$self->{parse_error}->(); |
14626 |
|
|
## reconsume |
14627 |
|
|
} |
14628 |
|
|
} |
14629 |
|
|
} else { |
14630 |
|
|
$self->{parse_error}->(); |
14631 |
|
|
unshift @{$self->{char}}, (104, 101, 116, $self->{next_input_character}); |
14632 |
|
|
$self->{next_input_character} = 116; |
14633 |
|
|
} |
14634 |
|
|
} else { |
14635 |
|
|
$self->{parse_error}->(); |
14636 |
|
|
unshift @{$self->{char}}, (104, 101, $self->{next_input_character}); |
14637 |
|
|
$self->{next_input_character} = 116; |
14638 |
|
|
} |
14639 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
14640 |
|
|
|
14641 |
|
|
if (@{$self->{char}}) { |
14642 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14643 |
|
|
} else { |
14644 |
|
|
$self->{set_next_input_character}->($self); |
14645 |
|
|
} |
14646 |
|
|
|
14647 |
|
|
if ($self->{next_input_character} == 110) { # n |
14648 |
|
|
|
14649 |
|
|
if (@{$self->{char}}) { |
14650 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14651 |
|
|
} else { |
14652 |
|
|
$self->{set_next_input_character}->($self); |
14653 |
|
|
} |
14654 |
|
|
|
14655 |
|
|
if ($self->{next_input_character} == 115) { # s |
14656 |
|
|
|
14657 |
|
|
if (@{$self->{char}}) { |
14658 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14659 |
|
|
} else { |
14660 |
|
|
$self->{set_next_input_character}->($self); |
14661 |
|
|
} |
14662 |
|
|
|
14663 |
|
|
if ($self->{next_input_character} == 112) { # p |
14664 |
|
|
|
14665 |
|
|
if (@{$self->{char}}) { |
14666 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14667 |
|
|
} else { |
14668 |
|
|
$self->{set_next_input_character}->($self); |
14669 |
|
|
} |
14670 |
|
|
|
14671 |
|
|
{ |
14672 |
|
|
$r = {type => 'character', data => qq<\x{2009}>}; # thinsp |
14673 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14674 |
|
|
|
14675 |
|
|
if (@{$self->{char}}) { |
14676 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14677 |
|
|
} else { |
14678 |
|
|
$self->{set_next_input_character}->($self); |
14679 |
|
|
} |
14680 |
|
|
|
14681 |
|
|
} else { |
14682 |
|
|
$self->{parse_error}->(); |
14683 |
|
|
## reconsume |
14684 |
|
|
} |
14685 |
|
|
} |
14686 |
|
|
} else { |
14687 |
|
|
$self->{parse_error}->(); |
14688 |
|
|
unshift @{$self->{char}}, (104, 105, 110, 115, $self->{next_input_character}); |
14689 |
|
|
$self->{next_input_character} = 116; |
14690 |
|
|
} |
14691 |
|
|
} else { |
14692 |
|
|
$self->{parse_error}->(); |
14693 |
|
|
unshift @{$self->{char}}, (104, 105, 110, $self->{next_input_character}); |
14694 |
|
|
$self->{next_input_character} = 116; |
14695 |
|
|
} |
14696 |
|
|
} else { |
14697 |
|
|
$self->{parse_error}->(); |
14698 |
|
|
unshift @{$self->{char}}, (104, 105, $self->{next_input_character}); |
14699 |
|
|
$self->{next_input_character} = 116; |
14700 |
|
|
} |
14701 |
|
|
} elsif ($self->{next_input_character} == 111) { # o |
14702 |
|
|
|
14703 |
|
|
if (@{$self->{char}}) { |
14704 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14705 |
|
|
} else { |
14706 |
|
|
$self->{set_next_input_character}->($self); |
14707 |
|
|
} |
14708 |
|
|
|
14709 |
|
|
if ($self->{next_input_character} == 114) { # r |
14710 |
|
|
|
14711 |
|
|
if (@{$self->{char}}) { |
14712 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14713 |
|
|
} else { |
14714 |
|
|
$self->{set_next_input_character}->($self); |
14715 |
|
|
} |
14716 |
|
|
|
14717 |
|
|
if ($self->{next_input_character} == 110) { # n |
14718 |
|
|
|
14719 |
|
|
if (@{$self->{char}}) { |
14720 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14721 |
|
|
} else { |
14722 |
|
|
$self->{set_next_input_character}->($self); |
14723 |
|
|
} |
14724 |
|
|
|
14725 |
|
|
{ |
14726 |
|
|
$r = {type => 'character', data => qq<\x{00FE}>}; # thorn |
14727 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14728 |
|
|
|
14729 |
|
|
if (@{$self->{char}}) { |
14730 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14731 |
|
|
} else { |
14732 |
|
|
$self->{set_next_input_character}->($self); |
14733 |
|
|
} |
14734 |
|
|
|
14735 |
|
|
} else { |
14736 |
|
|
$self->{parse_error}->(); |
14737 |
|
|
## reconsume |
14738 |
|
|
} |
14739 |
|
|
} |
14740 |
|
|
} else { |
14741 |
|
|
$self->{parse_error}->(); |
14742 |
|
|
unshift @{$self->{char}}, (104, 111, 114, $self->{next_input_character}); |
14743 |
|
|
$self->{next_input_character} = 116; |
14744 |
|
|
} |
14745 |
|
|
} else { |
14746 |
|
|
$self->{parse_error}->(); |
14747 |
|
|
unshift @{$self->{char}}, (104, 111, $self->{next_input_character}); |
14748 |
|
|
$self->{next_input_character} = 116; |
14749 |
|
|
} |
14750 |
|
|
} else { |
14751 |
|
|
$self->{parse_error}->(); |
14752 |
|
|
unshift @{$self->{char}}, (104, $self->{next_input_character}); |
14753 |
|
|
$self->{next_input_character} = 116; |
14754 |
|
|
} |
14755 |
|
|
} elsif ($self->{next_input_character} == 105) { # i |
14756 |
|
|
|
14757 |
|
|
if (@{$self->{char}}) { |
14758 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14759 |
|
|
} else { |
14760 |
|
|
$self->{set_next_input_character}->($self); |
14761 |
|
|
} |
14762 |
|
|
|
14763 |
|
|
if ($self->{next_input_character} == 108) { # l |
14764 |
|
|
|
14765 |
|
|
if (@{$self->{char}}) { |
14766 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14767 |
|
|
} else { |
14768 |
|
|
$self->{set_next_input_character}->($self); |
14769 |
|
|
} |
14770 |
|
|
|
14771 |
|
|
if ($self->{next_input_character} == 100) { # d |
14772 |
|
|
|
14773 |
|
|
if (@{$self->{char}}) { |
14774 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14775 |
|
|
} else { |
14776 |
|
|
$self->{set_next_input_character}->($self); |
14777 |
|
|
} |
14778 |
|
|
|
14779 |
|
|
if ($self->{next_input_character} == 101) { # e |
14780 |
|
|
|
14781 |
|
|
if (@{$self->{char}}) { |
14782 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14783 |
|
|
} else { |
14784 |
|
|
$self->{set_next_input_character}->($self); |
14785 |
|
|
} |
14786 |
|
|
|
14787 |
|
|
{ |
14788 |
|
|
$r = {type => 'character', data => qq<\x{02DC}>}; # tilde |
14789 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14790 |
|
|
|
14791 |
|
|
if (@{$self->{char}}) { |
14792 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14793 |
|
|
} else { |
14794 |
|
|
$self->{set_next_input_character}->($self); |
14795 |
|
|
} |
14796 |
|
|
|
14797 |
|
|
} else { |
14798 |
|
|
$self->{parse_error}->(); |
14799 |
|
|
## reconsume |
14800 |
|
|
} |
14801 |
|
|
} |
14802 |
|
|
} else { |
14803 |
|
|
$self->{parse_error}->(); |
14804 |
|
|
unshift @{$self->{char}}, (105, 108, 100, $self->{next_input_character}); |
14805 |
|
|
$self->{next_input_character} = 116; |
14806 |
|
|
} |
14807 |
|
|
} else { |
14808 |
|
|
$self->{parse_error}->(); |
14809 |
|
|
unshift @{$self->{char}}, (105, 108, $self->{next_input_character}); |
14810 |
|
|
$self->{next_input_character} = 116; |
14811 |
|
|
} |
14812 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
14813 |
|
|
|
14814 |
|
|
if (@{$self->{char}}) { |
14815 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14816 |
|
|
} else { |
14817 |
|
|
$self->{set_next_input_character}->($self); |
14818 |
|
|
} |
14819 |
|
|
|
14820 |
|
|
if ($self->{next_input_character} == 101) { # e |
14821 |
|
|
|
14822 |
|
|
if (@{$self->{char}}) { |
14823 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14824 |
|
|
} else { |
14825 |
|
|
$self->{set_next_input_character}->($self); |
14826 |
|
|
} |
14827 |
|
|
|
14828 |
|
|
if ($self->{next_input_character} == 115) { # s |
14829 |
|
|
|
14830 |
|
|
if (@{$self->{char}}) { |
14831 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14832 |
|
|
} else { |
14833 |
|
|
$self->{set_next_input_character}->($self); |
14834 |
|
|
} |
14835 |
|
|
|
14836 |
|
|
{ |
14837 |
|
|
$r = {type => 'character', data => qq<\x{00D7}>}; # times |
14838 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14839 |
|
|
|
14840 |
|
|
if (@{$self->{char}}) { |
14841 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14842 |
|
|
} else { |
14843 |
|
|
$self->{set_next_input_character}->($self); |
14844 |
|
|
} |
14845 |
|
|
|
14846 |
|
|
} else { |
14847 |
|
|
$self->{parse_error}->(); |
14848 |
|
|
## reconsume |
14849 |
|
|
} |
14850 |
|
|
} |
14851 |
|
|
} else { |
14852 |
|
|
$self->{parse_error}->(); |
14853 |
|
|
unshift @{$self->{char}}, (105, 109, 101, $self->{next_input_character}); |
14854 |
|
|
$self->{next_input_character} = 116; |
14855 |
|
|
} |
14856 |
|
|
} else { |
14857 |
|
|
$self->{parse_error}->(); |
14858 |
|
|
unshift @{$self->{char}}, (105, 109, $self->{next_input_character}); |
14859 |
|
|
$self->{next_input_character} = 116; |
14860 |
|
|
} |
14861 |
|
|
} else { |
14862 |
|
|
$self->{parse_error}->(); |
14863 |
|
|
unshift @{$self->{char}}, (105, $self->{next_input_character}); |
14864 |
|
|
$self->{next_input_character} = 116; |
14865 |
|
|
} |
14866 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
14867 |
|
|
|
14868 |
|
|
if (@{$self->{char}}) { |
14869 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14870 |
|
|
} else { |
14871 |
|
|
$self->{set_next_input_character}->($self); |
14872 |
|
|
} |
14873 |
|
|
|
14874 |
|
|
if ($self->{next_input_character} == 97) { # a |
14875 |
|
|
|
14876 |
|
|
if (@{$self->{char}}) { |
14877 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14878 |
|
|
} else { |
14879 |
|
|
$self->{set_next_input_character}->($self); |
14880 |
|
|
} |
14881 |
|
|
|
14882 |
|
|
if ($self->{next_input_character} == 100) { # d |
14883 |
|
|
|
14884 |
|
|
if (@{$self->{char}}) { |
14885 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14886 |
|
|
} else { |
14887 |
|
|
$self->{set_next_input_character}->($self); |
14888 |
|
|
} |
14889 |
|
|
|
14890 |
|
|
if ($self->{next_input_character} == 101) { # e |
14891 |
|
|
|
14892 |
|
|
if (@{$self->{char}}) { |
14893 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14894 |
|
|
} else { |
14895 |
|
|
$self->{set_next_input_character}->($self); |
14896 |
|
|
} |
14897 |
|
|
|
14898 |
|
|
{ |
14899 |
|
|
$r = {type => 'character', data => qq<\x{2122}>}; # trade |
14900 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14901 |
|
|
|
14902 |
|
|
if (@{$self->{char}}) { |
14903 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14904 |
|
|
} else { |
14905 |
|
|
$self->{set_next_input_character}->($self); |
14906 |
|
|
} |
14907 |
|
|
|
14908 |
|
|
} else { |
14909 |
|
|
$self->{parse_error}->(); |
14910 |
|
|
## reconsume |
14911 |
|
|
} |
14912 |
|
|
} |
14913 |
|
|
} else { |
14914 |
|
|
$self->{parse_error}->(); |
14915 |
|
|
unshift @{$self->{char}}, (114, 97, 100, $self->{next_input_character}); |
14916 |
|
|
$self->{next_input_character} = 116; |
14917 |
|
|
} |
14918 |
|
|
} else { |
14919 |
|
|
$self->{parse_error}->(); |
14920 |
|
|
unshift @{$self->{char}}, (114, 97, $self->{next_input_character}); |
14921 |
|
|
$self->{next_input_character} = 116; |
14922 |
|
|
} |
14923 |
|
|
} else { |
14924 |
|
|
$self->{parse_error}->(); |
14925 |
|
|
unshift @{$self->{char}}, (114, $self->{next_input_character}); |
14926 |
|
|
$self->{next_input_character} = 116; |
14927 |
|
|
} |
14928 |
|
|
} else { |
14929 |
|
|
$self->{parse_error}->(); |
14930 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
14931 |
|
|
$self->{next_input_character} = 116; |
14932 |
|
|
} |
14933 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
14934 |
|
|
|
14935 |
|
|
if (@{$self->{char}}) { |
14936 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14937 |
|
|
} else { |
14938 |
|
|
$self->{set_next_input_character}->($self); |
14939 |
|
|
} |
14940 |
|
|
|
14941 |
|
|
if ($self->{next_input_character} == 65) { # A |
14942 |
|
|
|
14943 |
|
|
if (@{$self->{char}}) { |
14944 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14945 |
|
|
} else { |
14946 |
|
|
$self->{set_next_input_character}->($self); |
14947 |
|
|
} |
14948 |
|
|
|
14949 |
|
|
if ($self->{next_input_character} == 114) { # r |
14950 |
|
|
|
14951 |
|
|
if (@{$self->{char}}) { |
14952 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14953 |
|
|
} else { |
14954 |
|
|
$self->{set_next_input_character}->($self); |
14955 |
|
|
} |
14956 |
|
|
|
14957 |
|
|
if ($self->{next_input_character} == 114) { # r |
14958 |
|
|
|
14959 |
|
|
if (@{$self->{char}}) { |
14960 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14961 |
|
|
} else { |
14962 |
|
|
$self->{set_next_input_character}->($self); |
14963 |
|
|
} |
14964 |
|
|
|
14965 |
|
|
{ |
14966 |
|
|
$r = {type => 'character', data => qq<\x{21D1}>}; # uArr |
14967 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
14968 |
|
|
|
14969 |
|
|
if (@{$self->{char}}) { |
14970 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14971 |
|
|
} else { |
14972 |
|
|
$self->{set_next_input_character}->($self); |
14973 |
|
|
} |
14974 |
|
|
|
14975 |
|
|
} else { |
14976 |
|
|
$self->{parse_error}->(); |
14977 |
|
|
## reconsume |
14978 |
|
|
} |
14979 |
|
|
} |
14980 |
|
|
} else { |
14981 |
|
|
$self->{parse_error}->(); |
14982 |
|
|
unshift @{$self->{char}}, (65, 114, $self->{next_input_character}); |
14983 |
|
|
$self->{next_input_character} = 117; |
14984 |
|
|
} |
14985 |
|
|
} else { |
14986 |
|
|
$self->{parse_error}->(); |
14987 |
|
|
unshift @{$self->{char}}, (65, $self->{next_input_character}); |
14988 |
|
|
$self->{next_input_character} = 117; |
14989 |
|
|
} |
14990 |
|
|
} elsif ($self->{next_input_character} == 97) { # a |
14991 |
|
|
|
14992 |
|
|
if (@{$self->{char}}) { |
14993 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
14994 |
|
|
} else { |
14995 |
|
|
$self->{set_next_input_character}->($self); |
14996 |
|
|
} |
14997 |
|
|
|
14998 |
|
|
if ($self->{next_input_character} == 99) { # c |
14999 |
|
|
|
15000 |
|
|
if (@{$self->{char}}) { |
15001 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15002 |
|
|
} else { |
15003 |
|
|
$self->{set_next_input_character}->($self); |
15004 |
|
|
} |
15005 |
|
|
|
15006 |
|
|
if ($self->{next_input_character} == 117) { # u |
15007 |
|
|
|
15008 |
|
|
if (@{$self->{char}}) { |
15009 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15010 |
|
|
} else { |
15011 |
|
|
$self->{set_next_input_character}->($self); |
15012 |
|
|
} |
15013 |
|
|
|
15014 |
|
|
if ($self->{next_input_character} == 116) { # t |
15015 |
|
|
|
15016 |
|
|
if (@{$self->{char}}) { |
15017 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15018 |
|
|
} else { |
15019 |
|
|
$self->{set_next_input_character}->($self); |
15020 |
|
|
} |
15021 |
|
|
|
15022 |
|
|
if ($self->{next_input_character} == 101) { # e |
15023 |
|
|
|
15024 |
|
|
if (@{$self->{char}}) { |
15025 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15026 |
|
|
} else { |
15027 |
|
|
$self->{set_next_input_character}->($self); |
15028 |
|
|
} |
15029 |
|
|
|
15030 |
|
|
{ |
15031 |
|
|
$r = {type => 'character', data => qq<\x{00FA}>}; # uacute |
15032 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15033 |
|
|
|
15034 |
|
|
if (@{$self->{char}}) { |
15035 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15036 |
|
|
} else { |
15037 |
|
|
$self->{set_next_input_character}->($self); |
15038 |
|
|
} |
15039 |
|
|
|
15040 |
|
|
} else { |
15041 |
|
|
$self->{parse_error}->(); |
15042 |
|
|
## reconsume |
15043 |
|
|
} |
15044 |
|
|
} |
15045 |
|
|
} else { |
15046 |
|
|
$self->{parse_error}->(); |
15047 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
15048 |
|
|
$self->{next_input_character} = 117; |
15049 |
|
|
} |
15050 |
|
|
} else { |
15051 |
|
|
$self->{parse_error}->(); |
15052 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
15053 |
|
|
$self->{next_input_character} = 117; |
15054 |
|
|
} |
15055 |
|
|
} else { |
15056 |
|
|
$self->{parse_error}->(); |
15057 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
15058 |
|
|
$self->{next_input_character} = 117; |
15059 |
|
|
} |
15060 |
|
|
} elsif ($self->{next_input_character} == 114) { # r |
15061 |
|
|
|
15062 |
|
|
if (@{$self->{char}}) { |
15063 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15064 |
|
|
} else { |
15065 |
|
|
$self->{set_next_input_character}->($self); |
15066 |
|
|
} |
15067 |
|
|
|
15068 |
|
|
if ($self->{next_input_character} == 114) { # r |
15069 |
|
|
|
15070 |
|
|
if (@{$self->{char}}) { |
15071 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15072 |
|
|
} else { |
15073 |
|
|
$self->{set_next_input_character}->($self); |
15074 |
|
|
} |
15075 |
|
|
|
15076 |
|
|
{ |
15077 |
|
|
$r = {type => 'character', data => qq<\x{2191}>}; # uarr |
15078 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15079 |
|
|
|
15080 |
|
|
if (@{$self->{char}}) { |
15081 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15082 |
|
|
} else { |
15083 |
|
|
$self->{set_next_input_character}->($self); |
15084 |
|
|
} |
15085 |
|
|
|
15086 |
|
|
} else { |
15087 |
|
|
$self->{parse_error}->(); |
15088 |
|
|
## reconsume |
15089 |
|
|
} |
15090 |
|
|
} |
15091 |
|
|
} else { |
15092 |
|
|
$self->{parse_error}->(); |
15093 |
|
|
unshift @{$self->{char}}, (97, 114, $self->{next_input_character}); |
15094 |
|
|
$self->{next_input_character} = 117; |
15095 |
|
|
} |
15096 |
|
|
} else { |
15097 |
|
|
$self->{parse_error}->(); |
15098 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
15099 |
|
|
$self->{next_input_character} = 117; |
15100 |
|
|
} |
15101 |
|
|
} elsif ($self->{next_input_character} == 99) { # c |
15102 |
|
|
|
15103 |
|
|
if (@{$self->{char}}) { |
15104 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15105 |
|
|
} else { |
15106 |
|
|
$self->{set_next_input_character}->($self); |
15107 |
|
|
} |
15108 |
|
|
|
15109 |
|
|
if ($self->{next_input_character} == 105) { # i |
15110 |
|
|
|
15111 |
|
|
if (@{$self->{char}}) { |
15112 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15113 |
|
|
} else { |
15114 |
|
|
$self->{set_next_input_character}->($self); |
15115 |
|
|
} |
15116 |
|
|
|
15117 |
|
|
if ($self->{next_input_character} == 114) { # r |
15118 |
|
|
|
15119 |
|
|
if (@{$self->{char}}) { |
15120 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15121 |
|
|
} else { |
15122 |
|
|
$self->{set_next_input_character}->($self); |
15123 |
|
|
} |
15124 |
|
|
|
15125 |
|
|
if ($self->{next_input_character} == 99) { # c |
15126 |
|
|
|
15127 |
|
|
if (@{$self->{char}}) { |
15128 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15129 |
|
|
} else { |
15130 |
|
|
$self->{set_next_input_character}->($self); |
15131 |
|
|
} |
15132 |
|
|
|
15133 |
|
|
{ |
15134 |
|
|
$r = {type => 'character', data => qq<\x{00FB}>}; # ucirc |
15135 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15136 |
|
|
|
15137 |
|
|
if (@{$self->{char}}) { |
15138 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15139 |
|
|
} else { |
15140 |
|
|
$self->{set_next_input_character}->($self); |
15141 |
|
|
} |
15142 |
|
|
|
15143 |
|
|
} else { |
15144 |
|
|
$self->{parse_error}->(); |
15145 |
|
|
## reconsume |
15146 |
|
|
} |
15147 |
|
|
} |
15148 |
|
|
} else { |
15149 |
|
|
$self->{parse_error}->(); |
15150 |
|
|
unshift @{$self->{char}}, (99, 105, 114, $self->{next_input_character}); |
15151 |
|
|
$self->{next_input_character} = 117; |
15152 |
|
|
} |
15153 |
|
|
} else { |
15154 |
|
|
$self->{parse_error}->(); |
15155 |
|
|
unshift @{$self->{char}}, (99, 105, $self->{next_input_character}); |
15156 |
|
|
$self->{next_input_character} = 117; |
15157 |
|
|
} |
15158 |
|
|
} else { |
15159 |
|
|
$self->{parse_error}->(); |
15160 |
|
|
unshift @{$self->{char}}, (99, $self->{next_input_character}); |
15161 |
|
|
$self->{next_input_character} = 117; |
15162 |
|
|
} |
15163 |
|
|
} elsif ($self->{next_input_character} == 103) { # g |
15164 |
|
|
|
15165 |
|
|
if (@{$self->{char}}) { |
15166 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15167 |
|
|
} else { |
15168 |
|
|
$self->{set_next_input_character}->($self); |
15169 |
|
|
} |
15170 |
|
|
|
15171 |
|
|
if ($self->{next_input_character} == 114) { # r |
15172 |
|
|
|
15173 |
|
|
if (@{$self->{char}}) { |
15174 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15175 |
|
|
} else { |
15176 |
|
|
$self->{set_next_input_character}->($self); |
15177 |
|
|
} |
15178 |
|
|
|
15179 |
|
|
if ($self->{next_input_character} == 97) { # a |
15180 |
|
|
|
15181 |
|
|
if (@{$self->{char}}) { |
15182 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15183 |
|
|
} else { |
15184 |
|
|
$self->{set_next_input_character}->($self); |
15185 |
|
|
} |
15186 |
|
|
|
15187 |
|
|
if ($self->{next_input_character} == 118) { # v |
15188 |
|
|
|
15189 |
|
|
if (@{$self->{char}}) { |
15190 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15191 |
|
|
} else { |
15192 |
|
|
$self->{set_next_input_character}->($self); |
15193 |
|
|
} |
15194 |
|
|
|
15195 |
|
|
if ($self->{next_input_character} == 101) { # e |
15196 |
|
|
|
15197 |
|
|
if (@{$self->{char}}) { |
15198 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15199 |
|
|
} else { |
15200 |
|
|
$self->{set_next_input_character}->($self); |
15201 |
|
|
} |
15202 |
|
|
|
15203 |
|
|
{ |
15204 |
|
|
$r = {type => 'character', data => qq<\x{00F9}>}; # ugrave |
15205 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15206 |
|
|
|
15207 |
|
|
if (@{$self->{char}}) { |
15208 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15209 |
|
|
} else { |
15210 |
|
|
$self->{set_next_input_character}->($self); |
15211 |
|
|
} |
15212 |
|
|
|
15213 |
|
|
} else { |
15214 |
|
|
$self->{parse_error}->(); |
15215 |
|
|
## reconsume |
15216 |
|
|
} |
15217 |
|
|
} |
15218 |
|
|
} else { |
15219 |
|
|
$self->{parse_error}->(); |
15220 |
|
|
unshift @{$self->{char}}, (103, 114, 97, 118, $self->{next_input_character}); |
15221 |
|
|
$self->{next_input_character} = 117; |
15222 |
|
|
} |
15223 |
|
|
} else { |
15224 |
|
|
$self->{parse_error}->(); |
15225 |
|
|
unshift @{$self->{char}}, (103, 114, 97, $self->{next_input_character}); |
15226 |
|
|
$self->{next_input_character} = 117; |
15227 |
|
|
} |
15228 |
|
|
} else { |
15229 |
|
|
$self->{parse_error}->(); |
15230 |
|
|
unshift @{$self->{char}}, (103, 114, $self->{next_input_character}); |
15231 |
|
|
$self->{next_input_character} = 117; |
15232 |
|
|
} |
15233 |
|
|
} else { |
15234 |
|
|
$self->{parse_error}->(); |
15235 |
|
|
unshift @{$self->{char}}, (103, $self->{next_input_character}); |
15236 |
|
|
$self->{next_input_character} = 117; |
15237 |
|
|
} |
15238 |
|
|
} elsif ($self->{next_input_character} == 109) { # m |
15239 |
|
|
|
15240 |
|
|
if (@{$self->{char}}) { |
15241 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15242 |
|
|
} else { |
15243 |
|
|
$self->{set_next_input_character}->($self); |
15244 |
|
|
} |
15245 |
|
|
|
15246 |
|
|
if ($self->{next_input_character} == 108) { # l |
15247 |
|
|
|
15248 |
|
|
if (@{$self->{char}}) { |
15249 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15250 |
|
|
} else { |
15251 |
|
|
$self->{set_next_input_character}->($self); |
15252 |
|
|
} |
15253 |
|
|
|
15254 |
|
|
{ |
15255 |
|
|
$r = {type => 'character', data => qq<\x{00A8}>}; # uml |
15256 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15257 |
|
|
|
15258 |
|
|
if (@{$self->{char}}) { |
15259 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15260 |
|
|
} else { |
15261 |
|
|
$self->{set_next_input_character}->($self); |
15262 |
|
|
} |
15263 |
|
|
|
15264 |
|
|
} else { |
15265 |
|
|
$self->{parse_error}->(); |
15266 |
|
|
## reconsume |
15267 |
|
|
} |
15268 |
|
|
} |
15269 |
|
|
} else { |
15270 |
|
|
$self->{parse_error}->(); |
15271 |
|
|
unshift @{$self->{char}}, (109, $self->{next_input_character}); |
15272 |
|
|
$self->{next_input_character} = 117; |
15273 |
|
|
} |
15274 |
|
|
} elsif ($self->{next_input_character} == 112) { # p |
15275 |
|
|
|
15276 |
|
|
if (@{$self->{char}}) { |
15277 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15278 |
|
|
} else { |
15279 |
|
|
$self->{set_next_input_character}->($self); |
15280 |
|
|
} |
15281 |
|
|
|
15282 |
|
|
if ($self->{next_input_character} == 115) { # s |
15283 |
|
|
|
15284 |
|
|
if (@{$self->{char}}) { |
15285 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15286 |
|
|
} else { |
15287 |
|
|
$self->{set_next_input_character}->($self); |
15288 |
|
|
} |
15289 |
|
|
|
15290 |
|
|
if ($self->{next_input_character} == 105) { # i |
15291 |
|
|
|
15292 |
|
|
if (@{$self->{char}}) { |
15293 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15294 |
|
|
} else { |
15295 |
|
|
$self->{set_next_input_character}->($self); |
15296 |
|
|
} |
15297 |
|
|
|
15298 |
|
|
if ($self->{next_input_character} == 104) { # h |
15299 |
|
|
|
15300 |
|
|
if (@{$self->{char}}) { |
15301 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15302 |
|
|
} else { |
15303 |
|
|
$self->{set_next_input_character}->($self); |
15304 |
|
|
} |
15305 |
|
|
|
15306 |
|
|
{ |
15307 |
|
|
$r = {type => 'character', data => qq<\x{03D2}>}; # upsih |
15308 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15309 |
|
|
|
15310 |
|
|
if (@{$self->{char}}) { |
15311 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15312 |
|
|
} else { |
15313 |
|
|
$self->{set_next_input_character}->($self); |
15314 |
|
|
} |
15315 |
|
|
|
15316 |
|
|
} else { |
15317 |
|
|
$self->{parse_error}->(); |
15318 |
|
|
## reconsume |
15319 |
|
|
} |
15320 |
|
|
} |
15321 |
|
|
} elsif ($self->{next_input_character} == 108) { # l |
15322 |
|
|
|
15323 |
|
|
if (@{$self->{char}}) { |
15324 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15325 |
|
|
} else { |
15326 |
|
|
$self->{set_next_input_character}->($self); |
15327 |
|
|
} |
15328 |
|
|
|
15329 |
|
|
if ($self->{next_input_character} == 111) { # o |
15330 |
|
|
|
15331 |
|
|
if (@{$self->{char}}) { |
15332 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15333 |
|
|
} else { |
15334 |
|
|
$self->{set_next_input_character}->($self); |
15335 |
|
|
} |
15336 |
|
|
|
15337 |
|
|
if ($self->{next_input_character} == 110) { # n |
15338 |
|
|
|
15339 |
|
|
if (@{$self->{char}}) { |
15340 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15341 |
|
|
} else { |
15342 |
|
|
$self->{set_next_input_character}->($self); |
15343 |
|
|
} |
15344 |
|
|
|
15345 |
|
|
{ |
15346 |
|
|
$r = {type => 'character', data => qq<\x{03C5}>}; # upsilon |
15347 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15348 |
|
|
|
15349 |
|
|
if (@{$self->{char}}) { |
15350 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15351 |
|
|
} else { |
15352 |
|
|
$self->{set_next_input_character}->($self); |
15353 |
|
|
} |
15354 |
|
|
|
15355 |
|
|
} else { |
15356 |
|
|
$self->{parse_error}->(); |
15357 |
|
|
## reconsume |
15358 |
|
|
} |
15359 |
|
|
} |
15360 |
|
|
} else { |
15361 |
|
|
$self->{parse_error}->(); |
15362 |
|
|
unshift @{$self->{char}}, (112, 115, 105, 108, 111, $self->{next_input_character}); |
15363 |
|
|
$self->{next_input_character} = 117; |
15364 |
|
|
} |
15365 |
|
|
} else { |
15366 |
|
|
$self->{parse_error}->(); |
15367 |
|
|
unshift @{$self->{char}}, (112, 115, 105, 108, $self->{next_input_character}); |
15368 |
|
|
$self->{next_input_character} = 117; |
15369 |
|
|
} |
15370 |
|
|
} else { |
15371 |
|
|
$self->{parse_error}->(); |
15372 |
|
|
unshift @{$self->{char}}, (112, 115, 105, $self->{next_input_character}); |
15373 |
|
|
$self->{next_input_character} = 117; |
15374 |
|
|
} |
15375 |
|
|
} else { |
15376 |
|
|
$self->{parse_error}->(); |
15377 |
|
|
unshift @{$self->{char}}, (112, 115, $self->{next_input_character}); |
15378 |
|
|
$self->{next_input_character} = 117; |
15379 |
|
|
} |
15380 |
|
|
} else { |
15381 |
|
|
$self->{parse_error}->(); |
15382 |
|
|
unshift @{$self->{char}}, (112, $self->{next_input_character}); |
15383 |
|
|
$self->{next_input_character} = 117; |
15384 |
|
|
} |
15385 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
15386 |
|
|
|
15387 |
|
|
if (@{$self->{char}}) { |
15388 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15389 |
|
|
} else { |
15390 |
|
|
$self->{set_next_input_character}->($self); |
15391 |
|
|
} |
15392 |
|
|
|
15393 |
|
|
if ($self->{next_input_character} == 109) { # m |
15394 |
|
|
|
15395 |
|
|
if (@{$self->{char}}) { |
15396 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15397 |
|
|
} else { |
15398 |
|
|
$self->{set_next_input_character}->($self); |
15399 |
|
|
} |
15400 |
|
|
|
15401 |
|
|
if ($self->{next_input_character} == 108) { # l |
15402 |
|
|
|
15403 |
|
|
if (@{$self->{char}}) { |
15404 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15405 |
|
|
} else { |
15406 |
|
|
$self->{set_next_input_character}->($self); |
15407 |
|
|
} |
15408 |
|
|
|
15409 |
|
|
{ |
15410 |
|
|
$r = {type => 'character', data => qq<\x{00FC}>}; # uuml |
15411 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15412 |
|
|
|
15413 |
|
|
if (@{$self->{char}}) { |
15414 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15415 |
|
|
} else { |
15416 |
|
|
$self->{set_next_input_character}->($self); |
15417 |
|
|
} |
15418 |
|
|
|
15419 |
|
|
} else { |
15420 |
|
|
$self->{parse_error}->(); |
15421 |
|
|
## reconsume |
15422 |
|
|
} |
15423 |
|
|
} |
15424 |
|
|
} else { |
15425 |
|
|
$self->{parse_error}->(); |
15426 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
15427 |
|
|
$self->{next_input_character} = 117; |
15428 |
|
|
} |
15429 |
|
|
} else { |
15430 |
|
|
$self->{parse_error}->(); |
15431 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
15432 |
|
|
$self->{next_input_character} = 117; |
15433 |
|
|
} |
15434 |
|
|
} else { |
15435 |
|
|
$self->{parse_error}->(); |
15436 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
15437 |
|
|
$self->{next_input_character} = 117; |
15438 |
|
|
} |
15439 |
|
|
} elsif ($self->{next_input_character} == 119) { # w |
15440 |
|
|
|
15441 |
|
|
if (@{$self->{char}}) { |
15442 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15443 |
|
|
} else { |
15444 |
|
|
$self->{set_next_input_character}->($self); |
15445 |
|
|
} |
15446 |
|
|
|
15447 |
|
|
if ($self->{next_input_character} == 101) { # e |
15448 |
|
|
|
15449 |
|
|
if (@{$self->{char}}) { |
15450 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15451 |
|
|
} else { |
15452 |
|
|
$self->{set_next_input_character}->($self); |
15453 |
|
|
} |
15454 |
|
|
|
15455 |
|
|
if ($self->{next_input_character} == 105) { # i |
15456 |
|
|
|
15457 |
|
|
if (@{$self->{char}}) { |
15458 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15459 |
|
|
} else { |
15460 |
|
|
$self->{set_next_input_character}->($self); |
15461 |
|
|
} |
15462 |
|
|
|
15463 |
|
|
if ($self->{next_input_character} == 101) { # e |
15464 |
|
|
|
15465 |
|
|
if (@{$self->{char}}) { |
15466 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15467 |
|
|
} else { |
15468 |
|
|
$self->{set_next_input_character}->($self); |
15469 |
|
|
} |
15470 |
|
|
|
15471 |
|
|
if ($self->{next_input_character} == 114) { # r |
15472 |
|
|
|
15473 |
|
|
if (@{$self->{char}}) { |
15474 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15475 |
|
|
} else { |
15476 |
|
|
$self->{set_next_input_character}->($self); |
15477 |
|
|
} |
15478 |
|
|
|
15479 |
|
|
if ($self->{next_input_character} == 112) { # p |
15480 |
|
|
|
15481 |
|
|
if (@{$self->{char}}) { |
15482 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15483 |
|
|
} else { |
15484 |
|
|
$self->{set_next_input_character}->($self); |
15485 |
|
|
} |
15486 |
|
|
|
15487 |
|
|
{ |
15488 |
|
|
$r = {type => 'character', data => qq<\x{2118}>}; # weierp |
15489 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15490 |
|
|
|
15491 |
|
|
if (@{$self->{char}}) { |
15492 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15493 |
|
|
} else { |
15494 |
|
|
$self->{set_next_input_character}->($self); |
15495 |
|
|
} |
15496 |
|
|
|
15497 |
|
|
} else { |
15498 |
|
|
$self->{parse_error}->(); |
15499 |
|
|
## reconsume |
15500 |
|
|
} |
15501 |
|
|
} |
15502 |
|
|
} else { |
15503 |
|
|
$self->{parse_error}->(); |
15504 |
|
|
unshift @{$self->{char}}, (101, 105, 101, 114, $self->{next_input_character}); |
15505 |
|
|
$self->{next_input_character} = 119; |
15506 |
|
|
} |
15507 |
|
|
} else { |
15508 |
|
|
$self->{parse_error}->(); |
15509 |
|
|
unshift @{$self->{char}}, (101, 105, 101, $self->{next_input_character}); |
15510 |
|
|
$self->{next_input_character} = 119; |
15511 |
|
|
} |
15512 |
|
|
} else { |
15513 |
|
|
$self->{parse_error}->(); |
15514 |
|
|
unshift @{$self->{char}}, (101, 105, $self->{next_input_character}); |
15515 |
|
|
$self->{next_input_character} = 119; |
15516 |
|
|
} |
15517 |
|
|
} else { |
15518 |
|
|
$self->{parse_error}->(); |
15519 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
15520 |
|
|
$self->{next_input_character} = 119; |
15521 |
|
|
} |
15522 |
|
|
} else { |
15523 |
|
|
$self->{parse_error}->(); |
15524 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
15525 |
|
|
$self->{next_input_character} = 119; |
15526 |
|
|
} |
15527 |
|
|
} elsif ($self->{next_input_character} == 120) { # x |
15528 |
|
|
|
15529 |
|
|
if (@{$self->{char}}) { |
15530 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15531 |
|
|
} else { |
15532 |
|
|
$self->{set_next_input_character}->($self); |
15533 |
|
|
} |
15534 |
|
|
|
15535 |
|
|
if ($self->{next_input_character} == 105) { # i |
15536 |
|
|
|
15537 |
|
|
if (@{$self->{char}}) { |
15538 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15539 |
|
|
} else { |
15540 |
|
|
$self->{set_next_input_character}->($self); |
15541 |
|
|
} |
15542 |
|
|
|
15543 |
|
|
{ |
15544 |
|
|
$r = {type => 'character', data => qq<\x{03BE}>}; # xi |
15545 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15546 |
|
|
|
15547 |
|
|
if (@{$self->{char}}) { |
15548 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15549 |
|
|
} else { |
15550 |
|
|
$self->{set_next_input_character}->($self); |
15551 |
|
|
} |
15552 |
|
|
|
15553 |
|
|
} else { |
15554 |
|
|
$self->{parse_error}->(); |
15555 |
|
|
## reconsume |
15556 |
|
|
} |
15557 |
|
|
} |
15558 |
|
|
} else { |
15559 |
|
|
$self->{parse_error}->(); |
15560 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
15561 |
|
|
$self->{next_input_character} = 120; |
15562 |
|
|
} |
15563 |
|
|
} elsif ($self->{next_input_character} == 121) { # y |
15564 |
|
|
|
15565 |
|
|
if (@{$self->{char}}) { |
15566 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15567 |
|
|
} else { |
15568 |
|
|
$self->{set_next_input_character}->($self); |
15569 |
|
|
} |
15570 |
|
|
|
15571 |
|
|
if ($self->{next_input_character} == 97) { # a |
15572 |
|
|
|
15573 |
|
|
if (@{$self->{char}}) { |
15574 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15575 |
|
|
} else { |
15576 |
|
|
$self->{set_next_input_character}->($self); |
15577 |
|
|
} |
15578 |
|
|
|
15579 |
|
|
if ($self->{next_input_character} == 99) { # c |
15580 |
|
|
|
15581 |
|
|
if (@{$self->{char}}) { |
15582 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15583 |
|
|
} else { |
15584 |
|
|
$self->{set_next_input_character}->($self); |
15585 |
|
|
} |
15586 |
|
|
|
15587 |
|
|
if ($self->{next_input_character} == 117) { # u |
15588 |
|
|
|
15589 |
|
|
if (@{$self->{char}}) { |
15590 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15591 |
|
|
} else { |
15592 |
|
|
$self->{set_next_input_character}->($self); |
15593 |
|
|
} |
15594 |
|
|
|
15595 |
|
|
if ($self->{next_input_character} == 116) { # t |
15596 |
|
|
|
15597 |
|
|
if (@{$self->{char}}) { |
15598 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15599 |
|
|
} else { |
15600 |
|
|
$self->{set_next_input_character}->($self); |
15601 |
|
|
} |
15602 |
|
|
|
15603 |
|
|
if ($self->{next_input_character} == 101) { # e |
15604 |
|
|
|
15605 |
|
|
if (@{$self->{char}}) { |
15606 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15607 |
|
|
} else { |
15608 |
|
|
$self->{set_next_input_character}->($self); |
15609 |
|
|
} |
15610 |
|
|
|
15611 |
|
|
{ |
15612 |
|
|
$r = {type => 'character', data => qq<\x{00FD}>}; # yacute |
15613 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15614 |
|
|
|
15615 |
|
|
if (@{$self->{char}}) { |
15616 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15617 |
|
|
} else { |
15618 |
|
|
$self->{set_next_input_character}->($self); |
15619 |
|
|
} |
15620 |
|
|
|
15621 |
|
|
} else { |
15622 |
|
|
$self->{parse_error}->(); |
15623 |
|
|
## reconsume |
15624 |
|
|
} |
15625 |
|
|
} |
15626 |
|
|
} else { |
15627 |
|
|
$self->{parse_error}->(); |
15628 |
|
|
unshift @{$self->{char}}, (97, 99, 117, 116, $self->{next_input_character}); |
15629 |
|
|
$self->{next_input_character} = 121; |
15630 |
|
|
} |
15631 |
|
|
} else { |
15632 |
|
|
$self->{parse_error}->(); |
15633 |
|
|
unshift @{$self->{char}}, (97, 99, 117, $self->{next_input_character}); |
15634 |
|
|
$self->{next_input_character} = 121; |
15635 |
|
|
} |
15636 |
|
|
} else { |
15637 |
|
|
$self->{parse_error}->(); |
15638 |
|
|
unshift @{$self->{char}}, (97, 99, $self->{next_input_character}); |
15639 |
|
|
$self->{next_input_character} = 121; |
15640 |
|
|
} |
15641 |
|
|
} else { |
15642 |
|
|
$self->{parse_error}->(); |
15643 |
|
|
unshift @{$self->{char}}, (97, $self->{next_input_character}); |
15644 |
|
|
$self->{next_input_character} = 121; |
15645 |
|
|
} |
15646 |
|
|
} elsif ($self->{next_input_character} == 101) { # e |
15647 |
|
|
|
15648 |
|
|
if (@{$self->{char}}) { |
15649 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15650 |
|
|
} else { |
15651 |
|
|
$self->{set_next_input_character}->($self); |
15652 |
|
|
} |
15653 |
|
|
|
15654 |
|
|
if ($self->{next_input_character} == 110) { # n |
15655 |
|
|
|
15656 |
|
|
if (@{$self->{char}}) { |
15657 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15658 |
|
|
} else { |
15659 |
|
|
$self->{set_next_input_character}->($self); |
15660 |
|
|
} |
15661 |
|
|
|
15662 |
|
|
{ |
15663 |
|
|
$r = {type => 'character', data => qq<\x{00A5}>}; # yen |
15664 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15665 |
|
|
|
15666 |
|
|
if (@{$self->{char}}) { |
15667 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15668 |
|
|
} else { |
15669 |
|
|
$self->{set_next_input_character}->($self); |
15670 |
|
|
} |
15671 |
|
|
|
15672 |
|
|
} else { |
15673 |
|
|
$self->{parse_error}->(); |
15674 |
|
|
## reconsume |
15675 |
|
|
} |
15676 |
|
|
} |
15677 |
|
|
} else { |
15678 |
|
|
$self->{parse_error}->(); |
15679 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
15680 |
|
|
$self->{next_input_character} = 121; |
15681 |
|
|
} |
15682 |
|
|
} elsif ($self->{next_input_character} == 117) { # u |
15683 |
|
|
|
15684 |
|
|
if (@{$self->{char}}) { |
15685 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15686 |
|
|
} else { |
15687 |
|
|
$self->{set_next_input_character}->($self); |
15688 |
|
|
} |
15689 |
|
|
|
15690 |
|
|
if ($self->{next_input_character} == 109) { # m |
15691 |
|
|
|
15692 |
|
|
if (@{$self->{char}}) { |
15693 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15694 |
|
|
} else { |
15695 |
|
|
$self->{set_next_input_character}->($self); |
15696 |
|
|
} |
15697 |
|
|
|
15698 |
|
|
if ($self->{next_input_character} == 108) { # l |
15699 |
|
|
|
15700 |
|
|
if (@{$self->{char}}) { |
15701 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15702 |
|
|
} else { |
15703 |
|
|
$self->{set_next_input_character}->($self); |
15704 |
|
|
} |
15705 |
|
|
|
15706 |
|
|
{ |
15707 |
|
|
$r = {type => 'character', data => qq<\x{00FF}>}; # yuml |
15708 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15709 |
|
|
|
15710 |
|
|
if (@{$self->{char}}) { |
15711 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15712 |
|
|
} else { |
15713 |
|
|
$self->{set_next_input_character}->($self); |
15714 |
|
|
} |
15715 |
|
|
|
15716 |
|
|
} else { |
15717 |
|
|
$self->{parse_error}->(); |
15718 |
|
|
## reconsume |
15719 |
|
|
} |
15720 |
|
|
} |
15721 |
|
|
} else { |
15722 |
|
|
$self->{parse_error}->(); |
15723 |
|
|
unshift @{$self->{char}}, (117, 109, $self->{next_input_character}); |
15724 |
|
|
$self->{next_input_character} = 121; |
15725 |
|
|
} |
15726 |
|
|
} else { |
15727 |
|
|
$self->{parse_error}->(); |
15728 |
|
|
unshift @{$self->{char}}, (117, $self->{next_input_character}); |
15729 |
|
|
$self->{next_input_character} = 121; |
15730 |
|
|
} |
15731 |
|
|
} else { |
15732 |
|
|
$self->{parse_error}->(); |
15733 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
15734 |
|
|
$self->{next_input_character} = 121; |
15735 |
|
|
} |
15736 |
|
|
} elsif ($self->{next_input_character} == 122) { # z |
15737 |
|
|
|
15738 |
|
|
if (@{$self->{char}}) { |
15739 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15740 |
|
|
} else { |
15741 |
|
|
$self->{set_next_input_character}->($self); |
15742 |
|
|
} |
15743 |
|
|
|
15744 |
|
|
if ($self->{next_input_character} == 101) { # e |
15745 |
|
|
|
15746 |
|
|
if (@{$self->{char}}) { |
15747 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15748 |
|
|
} else { |
15749 |
|
|
$self->{set_next_input_character}->($self); |
15750 |
|
|
} |
15751 |
|
|
|
15752 |
|
|
if ($self->{next_input_character} == 116) { # t |
15753 |
|
|
|
15754 |
|
|
if (@{$self->{char}}) { |
15755 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15756 |
|
|
} else { |
15757 |
|
|
$self->{set_next_input_character}->($self); |
15758 |
|
|
} |
15759 |
|
|
|
15760 |
|
|
if ($self->{next_input_character} == 97) { # a |
15761 |
|
|
|
15762 |
|
|
if (@{$self->{char}}) { |
15763 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15764 |
|
|
} else { |
15765 |
|
|
$self->{set_next_input_character}->($self); |
15766 |
|
|
} |
15767 |
|
|
|
15768 |
|
|
{ |
15769 |
|
|
$r = {type => 'character', data => qq<\x{03B6}>}; # zeta |
15770 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15771 |
|
|
|
15772 |
|
|
if (@{$self->{char}}) { |
15773 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15774 |
|
|
} else { |
15775 |
|
|
$self->{set_next_input_character}->($self); |
15776 |
|
|
} |
15777 |
|
|
|
15778 |
|
|
} else { |
15779 |
|
|
$self->{parse_error}->(); |
15780 |
|
|
## reconsume |
15781 |
|
|
} |
15782 |
|
|
} |
15783 |
|
|
} else { |
15784 |
|
|
$self->{parse_error}->(); |
15785 |
|
|
unshift @{$self->{char}}, (101, 116, $self->{next_input_character}); |
15786 |
|
|
$self->{next_input_character} = 122; |
15787 |
|
|
} |
15788 |
|
|
} else { |
15789 |
|
|
$self->{parse_error}->(); |
15790 |
|
|
unshift @{$self->{char}}, (101, $self->{next_input_character}); |
15791 |
|
|
$self->{next_input_character} = 122; |
15792 |
|
|
} |
15793 |
|
|
} elsif ($self->{next_input_character} == 119) { # w |
15794 |
|
|
|
15795 |
|
|
if (@{$self->{char}}) { |
15796 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15797 |
|
|
} else { |
15798 |
|
|
$self->{set_next_input_character}->($self); |
15799 |
|
|
} |
15800 |
|
|
|
15801 |
|
|
if ($self->{next_input_character} == 106) { # j |
15802 |
|
|
|
15803 |
|
|
if (@{$self->{char}}) { |
15804 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15805 |
|
|
} else { |
15806 |
|
|
$self->{set_next_input_character}->($self); |
15807 |
|
|
} |
15808 |
|
|
|
15809 |
|
|
{ |
15810 |
|
|
$r = {type => 'character', data => qq<\x{200D}>}; # zwj |
15811 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15812 |
|
|
|
15813 |
|
|
if (@{$self->{char}}) { |
15814 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15815 |
|
|
} else { |
15816 |
|
|
$self->{set_next_input_character}->($self); |
15817 |
|
|
} |
15818 |
|
|
|
15819 |
|
|
} else { |
15820 |
|
|
$self->{parse_error}->(); |
15821 |
|
|
## reconsume |
15822 |
|
|
} |
15823 |
|
|
} |
15824 |
|
|
} elsif ($self->{next_input_character} == 110) { # n |
15825 |
|
|
|
15826 |
|
|
if (@{$self->{char}}) { |
15827 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15828 |
|
|
} else { |
15829 |
|
|
$self->{set_next_input_character}->($self); |
15830 |
|
|
} |
15831 |
|
|
|
15832 |
|
|
if ($self->{next_input_character} == 106) { # j |
15833 |
|
|
|
15834 |
|
|
if (@{$self->{char}}) { |
15835 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15836 |
|
|
} else { |
15837 |
|
|
$self->{set_next_input_character}->($self); |
15838 |
|
|
} |
15839 |
|
|
|
15840 |
|
|
{ |
15841 |
|
|
$r = {type => 'character', data => qq<\x{200C}>}; # zwnj |
15842 |
|
|
if ($self->{next_input_character} == 0x003B) { # ; |
15843 |
|
|
|
15844 |
|
|
if (@{$self->{char}}) { |
15845 |
|
|
$self->{next_input_character} = shift @{$self->{char}}; |
15846 |
|
|
} else { |
15847 |
|
|
$self->{set_next_input_character}->($self); |
15848 |
|
|
} |
15849 |
|
|
|
15850 |
|
|
} else { |
15851 |
|
|
$self->{parse_error}->(); |
15852 |
|
|
## reconsume |
15853 |
|
|
} |
15854 |
|
|
} |
15855 |
|
|
} else { |
15856 |
|
|
$self->{parse_error}->(); |
15857 |
|
|
unshift @{$self->{char}}, (119, 110, $self->{next_input_character}); |
15858 |
|
|
$self->{next_input_character} = 122; |
15859 |
|
|
} |
15860 |
|
|
} else { |
15861 |
|
|
$self->{parse_error}->(); |
15862 |
|
|
unshift @{$self->{char}}, (119, $self->{next_input_character}); |
15863 |
|
|
$self->{next_input_character} = 122; |
15864 |
|
|
} |
15865 |
|
|
} else { |
15866 |
|
|
$self->{parse_error}->(); |
15867 |
|
|
unshift @{$self->{char}}, ($self->{next_input_character}); |
15868 |
|
|
$self->{next_input_character} = 122; |
15869 |
|
|
} |
15870 |
|
|
} else { |
15871 |
|
|
$self->{parse_error}->(); |
15872 |
|
|
} |
15873 |
|
|
|
15874 |
|
|
|
15875 |
|
|
return $r; |
15876 |
|
|
} # _tokenize_attempt_to_consume_an_entity |
15877 |
|
|
|
15878 |
|
|
1; |
15879 |
wakaba |
1.2 |
# $Date: 2007/04/28 14:29:01 $ |