 Timestamp:
 Mar 29, 2014, 11:32:14 PM (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

proto/s2k/trunk/framework/output/cpplang/parabix2/parabix2_definitions.hpp
r3767 r3771 186 186 }; 187 187 188 struct Classify_bytes_Validate_utf8 189 { 190 Classify_bytes_Validate_utf8() 191 { 192 } 193 194 IDISA_INLINE void do_block(struct Basis_bits & basis_bits,struct Lex & lex,struct U8 & u8) 195 { 196 BitBlock temp1; 197 temp1 = simd_or(basis_bits.bit_0,basis_bits.bit_1); 198 BitBlock temp2; 199 temp2 = simd_andc(basis_bits.bit_2,basis_bits.bit_3); 200 BitBlock temp3; 201 temp3 = simd_andc(temp2,temp1); 202 BitBlock temp4; 203 temp4 = simd_andc(basis_bits.bit_5,basis_bits.bit_4); 204 BitBlock temp5; 205 temp5 = simd_andc(basis_bits.bit_6,basis_bits.bit_7); 206 BitBlock temp6; 207 temp6 = simd_and(temp4,temp5); 208 lex.RefStart = simd_and(temp3,temp6); 209 BitBlock temp7; 210 temp7 = simd_and(basis_bits.bit_2,basis_bits.bit_3); 211 BitBlock temp8; 212 temp8 = simd_andc(temp7,temp1); 213 BitBlock temp9; 214 temp9 = simd_andc(basis_bits.bit_4,basis_bits.bit_5); 215 BitBlock temp10; 216 temp10 = simd_and(basis_bits.bit_6,basis_bits.bit_7); 217 BitBlock temp11; 218 temp11 = simd_and(temp9,temp10); 219 lex.Semicolon = simd_and(temp8,temp11); 220 BitBlock temp12; 221 temp12 = simd_and(basis_bits.bit_4,basis_bits.bit_5); 222 BitBlock temp13; 223 temp13 = simd_or(basis_bits.bit_6,basis_bits.bit_7); 224 BitBlock temp14; 225 temp14 = simd_andc(temp12,temp13); 226 lex.LAngle = simd_and(temp8,temp14); 227 BitBlock temp15; 228 temp15 = simd_and(temp12,temp5); 229 lex.RAngle = simd_and(temp8,temp15); 230 BitBlock temp16; 231 temp16 = simd_andc(basis_bits.bit_1,basis_bits.bit_0); 232 BitBlock temp17; 233 temp17 = simd_andc(basis_bits.bit_3,basis_bits.bit_2); 234 BitBlock temp18; 235 temp18 = simd_and(temp16,temp17); 236 lex.LBracket = simd_and(temp18,temp11); 237 BitBlock temp19; 238 temp19 = simd_andc(basis_bits.bit_7,basis_bits.bit_6); 239 BitBlock temp20; 240 temp20 = simd_and(temp12,temp19); 241 lex.RBracket = simd_and(temp18,temp20); 242 BitBlock temp21; 243 temp21 = simd_or(basis_bits.bit_4,basis_bits.bit_5); 244 BitBlock temp22; 245 temp22 = simd_andc(temp19,temp21); 246 lex.Exclam = simd_and(temp3,temp22); 247 BitBlock temp23; 248 temp23 = simd_and(temp12,temp10); 249 lex.QMark = simd_and(temp8,temp23); 250 lex.Hyphen = simd_and(temp3,temp20); 251 lex.Equals = simd_and(temp8,temp20); 252 BitBlock temp24; 253 temp24 = simd_and(temp4,temp10); 254 lex.SQuote = simd_and(temp3,temp24); 255 BitBlock temp25; 256 temp25 = simd_andc(temp5,temp21); 257 lex.DQuote = simd_and(temp3,temp25); 258 lex.Slash = simd_and(temp3,temp23); 259 BitBlock temp26; 260 temp26 = simd_andc(temp10,temp21); 261 lex.Hash = simd_and(temp3,temp26); 262 BitBlock temp27; 263 temp27 = simd_and(temp16,temp7); 264 BitBlock temp28; 265 temp28 = simd_andc(temp9,temp13); 266 lex.x = simd_and(temp27,temp28); 267 BitBlock temp29; 268 temp29 = simd_and(temp9,temp5); 269 lex.Colon = simd_and(temp8,temp29); 270 BitBlock temp30; 271 temp30 = simd_and(temp18,temp23); 272 BitBlock temp31; 273 temp31 = simd_or(temp30,lex.Colon); 274 BitBlock temp32; 275 temp32 = simd_andc(temp16,basis_bits.bit_2); 276 BitBlock temp33; 277 temp33 = simd_or(basis_bits.bit_5,temp10); 278 BitBlock temp34; 279 temp34 = simd_and(basis_bits.bit_4,temp33); 280 BitBlock temp35; 281 temp35 = simd_not(temp34); 282 BitBlock temp36; 283 temp36 = simd_or(temp21,temp13); 284 BitBlock temp37; 285 temp37 = simd_or(simd_and(basis_bits.bit_3,temp35),simd_andc(temp36,basis_bits.bit_3)); 286 BitBlock temp38; 287 temp38 = simd_and(temp32,temp37); 288 BitBlock temp39; 289 temp39 = simd_or(temp31,temp38); 290 BitBlock temp40; 291 temp40 = simd_and(temp16,basis_bits.bit_2); 292 BitBlock temp41; 293 temp41 = simd_and(temp40,temp37); 294 lex.ASCII_name_start = simd_or(temp39,temp41); 295 BitBlock temp42; 296 temp42 = simd_or(temp30,lex.Hyphen); 297 BitBlock temp43; 298 temp43 = simd_and(temp3,temp15); 299 BitBlock temp44; 300 temp44 = simd_or(temp42,temp43); 301 BitBlock temp45; 302 temp45 = simd_andc(temp8,temp34); 303 BitBlock temp46; 304 temp46 = simd_or(temp44,temp45); 305 BitBlock temp47; 306 temp47 = simd_or(temp46,temp38); 307 lex.ASCII_name_char = simd_or(temp47,temp41); 308 lex.NameScan = simd_or(lex.ASCII_name_char,basis_bits.bit_0); 309 BitBlock temp48; 310 temp48 = simd_or(temp1,basis_bits.bit_2); 311 BitBlock x00_x1F; 312 x00_x1F = simd_not(temp48); 313 BitBlock temp49; 314 temp49 = simd_or(basis_bits.bit_2,basis_bits.bit_3); 315 BitBlock temp50; 316 temp50 = simd_or(temp1,temp49); 317 lex.CR = simd_andc(temp20,temp50); 318 lex.LF = simd_andc(temp29,temp50); 319 BitBlock temp51; 320 temp51 = simd_and(temp9,temp19); 321 lex.HT = simd_andc(temp51,temp50); 322 lex.SP = simd_andc(temp3,temp36); 323 BitBlock temp52; 324 temp52 = simd_or(temp20,temp29); 325 BitBlock temp53; 326 temp53 = simd_or(temp52,temp51); 327 BitBlock temp54; 328 temp54 = simd_andc(temp53,temp50); 329 lex.WS = simd_or(temp54,lex.SP); 330 BitBlock temp55; 331 temp55 = simd_or(basis_bits.bit_5,basis_bits.bit_6); 332 BitBlock temp56; 333 temp56 = simd_and(basis_bits.bit_4,temp55); 334 lex.Digit = simd_andc(temp8,temp56); 335 BitBlock temp57; 336 temp57 = simd_andc(temp16,temp49); 337 BitBlock temp58; 338 temp58 = simd_andc(temp57,basis_bits.bit_4); 339 BitBlock temp59; 340 temp59 = simd_not(temp10); 341 BitBlock temp60; 342 temp60 = simd_or(simd_and(basis_bits.bit_5,temp59),simd_andc(temp13,basis_bits.bit_5)); 343 BitBlock temp61; 344 temp61 = simd_and(temp58,temp60); 345 BitBlock temp62; 346 temp62 = simd_or(lex.Digit,temp61); 347 BitBlock temp63; 348 temp63 = simd_and(temp16,temp2); 349 BitBlock temp64; 350 temp64 = simd_andc(temp63,basis_bits.bit_4); 351 BitBlock temp65; 352 temp65 = simd_and(temp64,temp60); 353 lex.Hex = simd_or(temp62,temp65); 354 BitBlock lex_error; 355 lex_error = simd_andc(x00_x1F,lex.WS); 356 if (bitblock::any(lex_error)) 357 { 358 assert_0_error(lex_error,"Error: illegal character"); 359 } 360 u8.unibyte = simd_not(basis_bits.bit_0); 361 u8.suffix = simd<1>::constant<0>(); 362 BitBlock u8_error; 363 u8_error = simd<1>::constant<0>(); 364 BitBlock u8_FFFE_FFFF; 365 u8_FFFE_FFFF = simd<1>::constant<0>(); 366 BitBlock u8anyscope; 367 u8anyscope = simd<1>::constant<0>(); 368 if (bitblock::any(simd_or(basis_bits.bit_0,carry_set_0.carryRange(0,10)))) 369 { 370 u8.prefix = simd_and(basis_bits.bit_0,basis_bits.bit_1); 371 u8.prefix2 = simd_andc(u8.prefix,basis_bits.bit_2); 372 u8.prefix3 = simd_and(u8.prefix,temp2); 373 u8.prefix4 = simd_and(u8.prefix,temp7); 374 u8.suffix = simd_andc(basis_bits.bit_0,basis_bits.bit_1); 375 BitBlock temp66; 376 temp66 = simd_andc(u8.prefix,temp49); 377 BitBlock temp67; 378 temp67 = simd_or(temp21,basis_bits.bit_6); 379 BitBlock temp68; 380 temp68 = simd_andc(temp66,temp67); 381 BitBlock temp69; 382 temp69 = simd_and(basis_bits.bit_5,temp13); 383 BitBlock temp70; 384 temp70 = simd_or(basis_bits.bit_4,temp69); 385 BitBlock temp71; 386 temp71 = simd_and(u8.prefix4,temp70); 387 u8.badprefix = simd_or(temp68,temp71); 388 u8_error = u8.badprefix; 389 carry_set_0.getCarry(0) = bitblock::srli<127>(pablo_blk_Advance(u8.prefix2,carry_set_0.getCarry(0),u8.scope22)); 390 u8anyscope = u8.scope22; 391 if (bitblock::any(simd_or(simd_or(u8.prefix3,u8.prefix4),carry_set_0.carryRange(1,9)))) 392 { 393 BitBlock xE0; 394 xE0 = simd_andc(u8.prefix3,temp36); 395 BitBlock xED; 396 xED = simd_and(u8.prefix3,temp20); 397 BitBlock xF0; 398 xF0 = simd_andc(u8.prefix4,temp36); 399 BitBlock temp72; 400 temp72 = simd_andc(temp4,temp13); 401 BitBlock xF4; 402 xF4 = simd_and(u8.prefix4,temp72); 403 u8.xA0_xBF = simd_and(u8.suffix,basis_bits.bit_2); 404 u8.x80_x9F = simd_andc(u8.suffix,basis_bits.bit_2); 405 u8.x90_xBF = simd_and(u8.suffix,temp49); 406 u8.x80_x8F = simd_andc(u8.suffix,temp49); 407 BitBlock xEF; 408 xEF = simd_and(u8.prefix3,temp23); 409 BitBlock temp73; 410 temp73 = simd_and(u8.suffix,temp7); 411 u8.xBF = simd_and(temp73,temp23); 412 u8.xBE = simd_and(temp73,temp15); 413 carry_set_0.getCarry(1) = bitblock::srli<127>(pablo_blk_Advance(u8.prefix3,carry_set_0.getCarry(1),u8.scope32)); 414 carry_set_0.getCarry(2) = bitblock::srli<127>(pablo_blk_Advance(u8.scope32,carry_set_0.getCarry(2),u8.scope33)); 415 carry_set_0.getCarry(3) = bitblock::srli<127>(pablo_blk_Advance(u8.prefix4,carry_set_0.getCarry(3),u8.scope42)); 416 carry_set_0.getCarry(4) = bitblock::srli<127>(pablo_blk_Advance(u8.scope42,carry_set_0.getCarry(4),u8.scope43)); 417 carry_set_0.getCarry(5) = bitblock::srli<127>(pablo_blk_Advance(u8.scope43,carry_set_0.getCarry(5),u8.scope44)); 418 BitBlock E0_F0_scope; 419 carry_set_0.getCarry(6) = bitblock::srli<127>(pablo_blk_Advance(simd_or(xE0,xF0),carry_set_0.getCarry(6),E0_F0_scope)); 420 BitBlock ED_F4_scope; 421 carry_set_0.getCarry(7) = bitblock::srli<127>(pablo_blk_Advance(simd_or(xED,xF4),carry_set_0.getCarry(7),ED_F4_scope)); 422 u8.xE0_scope = simd_and(u8.scope32,E0_F0_scope); 423 u8.xED_scope = simd_and(u8.scope32,ED_F4_scope); 424 u8.xF0_scope = simd_and(u8.scope42,E0_F0_scope); 425 u8.xF4_scope = simd_and(u8.scope42,ED_F4_scope); 426 carry_set_0.getCarry(8) = bitblock::srli<127>(pablo_blk_Advance(xEF,carry_set_0.getCarry(8),u8.xEF_scope)); 427 BitBlock u8lastscope; 428 u8lastscope = simd_or(simd_or(u8.scope22,u8.scope33),u8.scope44); 429 u8anyscope = simd_or(simd_or(simd_or(u8lastscope,u8.scope32),u8.scope42),u8.scope43); 430 BitBlock u8error1; 431 u8error1 = simd_and(u8.xE0_scope,u8.x80_x9F); 432 BitBlock u8error2; 433 u8error2 = simd_and(u8.xED_scope,u8.xA0_xBF); 434 BitBlock u8error3; 435 u8error3 = simd_and(u8.xF0_scope,u8.x80_x8F); 436 BitBlock u8error4; 437 u8error4 = simd_and(u8.xF4_scope,u8.x90_xBF); 438 u8_error = simd_or(u8_error,simd_or(simd_or(simd_or(u8error1,u8error2),u8error3),u8error4)); 439 BitBlock EF_BF_pending; 440 carry_set_0.getCarry(9) = bitblock::srli<127>(pablo_blk_Advance(simd_and(u8.xEF_scope,u8.xBF),carry_set_0.getCarry(9),EF_BF_pending)); 441 u8_FFFE_FFFF = simd_and(EF_BF_pending,simd_or(u8.xBE,u8.xBF)); 442 } 443 else 444 { 445 carry_set_0.carryDequeueEnqueue(1,9); 446 } 447 BitBlock u8mismatch; 448 u8mismatch = simd_xor(u8anyscope,u8.suffix); 449 if (bitblock::any(simd_or(simd_or(u8_error,u8mismatch),u8_FFFE_FFFF))) 450 { 451 assert_0_error(simd_or(simd_or(u8_error,u8mismatch),u8_FFFE_FFFF),"UTF8 error found"); 452 } 453 } 454 else 455 { 456 carry_set_0.carryDequeueEnqueue(0,10); 457 } 458 carry_set_0.carryAdjust(10); 459 } 460 461 void do_final_block(struct Basis_bits & basis_bits,struct Lex & lex,struct U8 & u8,BitBlock & EOF_mask) 462 { 463 BitBlock temp1; 464 temp1 = simd_or(basis_bits.bit_0,basis_bits.bit_1); 465 BitBlock temp2; 466 temp2 = simd_andc(basis_bits.bit_2,basis_bits.bit_3); 467 BitBlock temp3; 468 temp3 = simd_andc(temp2,temp1); 469 BitBlock temp4; 470 temp4 = simd_andc(basis_bits.bit_5,basis_bits.bit_4); 471 BitBlock temp5; 472 temp5 = simd_andc(basis_bits.bit_6,basis_bits.bit_7); 473 BitBlock temp6; 474 temp6 = simd_and(temp4,temp5); 475 lex.RefStart = simd_and(temp3,temp6); 476 BitBlock temp7; 477 temp7 = simd_and(basis_bits.bit_2,basis_bits.bit_3); 478 BitBlock temp8; 479 temp8 = simd_andc(temp7,temp1); 480 BitBlock temp9; 481 temp9 = simd_andc(basis_bits.bit_4,basis_bits.bit_5); 482 BitBlock temp10; 483 temp10 = simd_and(basis_bits.bit_6,basis_bits.bit_7); 484 BitBlock temp11; 485 temp11 = simd_and(temp9,temp10); 486 lex.Semicolon = simd_and(temp8,temp11); 487 BitBlock temp12; 488 temp12 = simd_and(basis_bits.bit_4,basis_bits.bit_5); 489 BitBlock temp13; 490 temp13 = simd_or(basis_bits.bit_6,basis_bits.bit_7); 491 BitBlock temp14; 492 temp14 = simd_andc(temp12,temp13); 493 lex.LAngle = simd_and(temp8,temp14); 494 BitBlock temp15; 495 temp15 = simd_and(temp12,temp5); 496 lex.RAngle = simd_and(temp8,temp15); 497 BitBlock temp16; 498 temp16 = simd_andc(basis_bits.bit_1,basis_bits.bit_0); 499 BitBlock temp17; 500 temp17 = simd_andc(basis_bits.bit_3,basis_bits.bit_2); 501 BitBlock temp18; 502 temp18 = simd_and(temp16,temp17); 503 lex.LBracket = simd_and(temp18,temp11); 504 BitBlock temp19; 505 temp19 = simd_andc(basis_bits.bit_7,basis_bits.bit_6); 506 BitBlock temp20; 507 temp20 = simd_and(temp12,temp19); 508 lex.RBracket = simd_and(temp18,temp20); 509 BitBlock temp21; 510 temp21 = simd_or(basis_bits.bit_4,basis_bits.bit_5); 511 BitBlock temp22; 512 temp22 = simd_andc(temp19,temp21); 513 lex.Exclam = simd_and(temp3,temp22); 514 BitBlock temp23; 515 temp23 = simd_and(temp12,temp10); 516 lex.QMark = simd_and(temp8,temp23); 517 lex.Hyphen = simd_and(temp3,temp20); 518 lex.Equals = simd_and(temp8,temp20); 519 BitBlock temp24; 520 temp24 = simd_and(temp4,temp10); 521 lex.SQuote = simd_and(temp3,temp24); 522 BitBlock temp25; 523 temp25 = simd_andc(temp5,temp21); 524 lex.DQuote = simd_and(temp3,temp25); 525 lex.Slash = simd_and(temp3,temp23); 526 BitBlock temp26; 527 temp26 = simd_andc(temp10,temp21); 528 lex.Hash = simd_and(temp3,temp26); 529 BitBlock temp27; 530 temp27 = simd_and(temp16,temp7); 531 BitBlock temp28; 532 temp28 = simd_andc(temp9,temp13); 533 lex.x = simd_and(temp27,temp28); 534 BitBlock temp29; 535 temp29 = simd_and(temp9,temp5); 536 lex.Colon = simd_and(temp8,temp29); 537 BitBlock temp30; 538 temp30 = simd_and(temp18,temp23); 539 BitBlock temp31; 540 temp31 = simd_or(temp30,lex.Colon); 541 BitBlock temp32; 542 temp32 = simd_andc(temp16,basis_bits.bit_2); 543 BitBlock temp33; 544 temp33 = simd_or(basis_bits.bit_5,temp10); 545 BitBlock temp34; 546 temp34 = simd_and(basis_bits.bit_4,temp33); 547 BitBlock temp35; 548 temp35 = simd_not(temp34); 549 BitBlock temp36; 550 temp36 = simd_or(temp21,temp13); 551 BitBlock temp37; 552 temp37 = simd_or(simd_and(basis_bits.bit_3,temp35),simd_andc(temp36,basis_bits.bit_3)); 553 BitBlock temp38; 554 temp38 = simd_and(temp32,temp37); 555 BitBlock temp39; 556 temp39 = simd_or(temp31,temp38); 557 BitBlock temp40; 558 temp40 = simd_and(temp16,basis_bits.bit_2); 559 BitBlock temp41; 560 temp41 = simd_and(temp40,temp37); 561 lex.ASCII_name_start = simd_or(temp39,temp41); 562 BitBlock temp42; 563 temp42 = simd_or(temp30,lex.Hyphen); 564 BitBlock temp43; 565 temp43 = simd_and(temp3,temp15); 566 BitBlock temp44; 567 temp44 = simd_or(temp42,temp43); 568 BitBlock temp45; 569 temp45 = simd_andc(temp8,temp34); 570 BitBlock temp46; 571 temp46 = simd_or(temp44,temp45); 572 BitBlock temp47; 573 temp47 = simd_or(temp46,temp38); 574 lex.ASCII_name_char = simd_or(temp47,temp41); 575 lex.NameScan = simd_or(lex.ASCII_name_char,basis_bits.bit_0); 576 BitBlock temp48; 577 temp48 = simd_or(temp1,basis_bits.bit_2); 578 BitBlock x00_x1F; 579 x00_x1F = simd_not(temp48); 580 BitBlock temp49; 581 temp49 = simd_or(basis_bits.bit_2,basis_bits.bit_3); 582 BitBlock temp50; 583 temp50 = simd_or(temp1,temp49); 584 lex.CR = simd_andc(temp20,temp50); 585 lex.LF = simd_andc(temp29,temp50); 586 BitBlock temp51; 587 temp51 = simd_and(temp9,temp19); 588 lex.HT = simd_andc(temp51,temp50); 589 lex.SP = simd_andc(temp3,temp36); 590 BitBlock temp52; 591 temp52 = simd_or(temp20,temp29); 592 BitBlock temp53; 593 temp53 = simd_or(temp52,temp51); 594 BitBlock temp54; 595 temp54 = simd_andc(temp53,temp50); 596 lex.WS = simd_or(temp54,lex.SP); 597 BitBlock temp55; 598 temp55 = simd_or(basis_bits.bit_5,basis_bits.bit_6); 599 BitBlock temp56; 600 temp56 = simd_and(basis_bits.bit_4,temp55); 601 lex.Digit = simd_andc(temp8,temp56); 602 BitBlock temp57; 603 temp57 = simd_andc(temp16,temp49); 604 BitBlock temp58; 605 temp58 = simd_andc(temp57,basis_bits.bit_4); 606 BitBlock temp59; 607 temp59 = simd_not(temp10); 608 BitBlock temp60; 609 temp60 = simd_or(simd_and(basis_bits.bit_5,temp59),simd_andc(temp13,basis_bits.bit_5)); 610 BitBlock temp61; 611 temp61 = simd_and(temp58,temp60); 612 BitBlock temp62; 613 temp62 = simd_or(lex.Digit,temp61); 614 BitBlock temp63; 615 temp63 = simd_and(temp16,temp2); 616 BitBlock temp64; 617 temp64 = simd_andc(temp63,basis_bits.bit_4); 618 BitBlock temp65; 619 temp65 = simd_and(temp64,temp60); 620 lex.Hex = simd_or(temp62,temp65); 621 BitBlock lex_error; 622 lex_error = simd_andc(x00_x1F,lex.WS); 623 if (bitblock::any(simd_and(lex_error,EOF_mask))) 624 { 625 assert_0_error(simd_and(lex_error,EOF_mask),"Error: illegal character"); 626 } 627 u8.unibyte = simd_not(basis_bits.bit_0); 628 u8.suffix = simd<1>::constant<0>(); 629 BitBlock u8_error; 630 u8_error = simd<1>::constant<0>(); 631 BitBlock u8_FFFE_FFFF; 632 u8_FFFE_FFFF = simd<1>::constant<0>(); 633 BitBlock u8anyscope; 634 u8anyscope = simd<1>::constant<0>(); 635 if (bitblock::any(simd_or(basis_bits.bit_0,carry_set_0.carryRange(0,10)))) 636 { 637 u8.prefix = simd_and(basis_bits.bit_0,basis_bits.bit_1); 638 u8.prefix2 = simd_andc(u8.prefix,basis_bits.bit_2); 639 u8.prefix3 = simd_and(u8.prefix,temp2); 640 u8.prefix4 = simd_and(u8.prefix,temp7); 641 u8.suffix = simd_andc(basis_bits.bit_0,basis_bits.bit_1); 642 BitBlock temp66; 643 temp66 = simd_andc(u8.prefix,temp49); 644 BitBlock temp67; 645 temp67 = simd_or(temp21,basis_bits.bit_6); 646 BitBlock temp68; 647 temp68 = simd_andc(temp66,temp67); 648 BitBlock temp69; 649 temp69 = simd_and(basis_bits.bit_5,temp13); 650 BitBlock temp70; 651 temp70 = simd_or(basis_bits.bit_4,temp69); 652 BitBlock temp71; 653 temp71 = simd_and(u8.prefix4,temp70); 654 u8.badprefix = simd_or(temp68,temp71); 655 u8_error = u8.badprefix; 656 carry_set_0.getCarry(0) = bitblock::srli<127>(pablo_blk_Advance(u8.prefix2,carry_set_0.getCarry(0),u8.scope22)); 657 u8anyscope = u8.scope22; 658 if (bitblock::any(simd_or(simd_or(u8.prefix3,u8.prefix4),carry_set_0.carryRange(1,9)))) 659 { 660 BitBlock xE0; 661 xE0 = simd_andc(u8.prefix3,temp36); 662 BitBlock xED; 663 xED = simd_and(u8.prefix3,temp20); 664 BitBlock xF0; 665 xF0 = simd_andc(u8.prefix4,temp36); 666 BitBlock temp72; 667 temp72 = simd_andc(temp4,temp13); 668 BitBlock xF4; 669 xF4 = simd_and(u8.prefix4,temp72); 670 u8.xA0_xBF = simd_and(u8.suffix,basis_bits.bit_2); 671 u8.x80_x9F = simd_andc(u8.suffix,basis_bits.bit_2); 672 u8.x90_xBF = simd_and(u8.suffix,temp49); 673 u8.x80_x8F = simd_andc(u8.suffix,temp49); 674 BitBlock xEF; 675 xEF = simd_and(u8.prefix3,temp23); 676 BitBlock temp73; 677 temp73 = simd_and(u8.suffix,temp7); 678 u8.xBF = simd_and(temp73,temp23); 679 u8.xBE = simd_and(temp73,temp15); 680 carry_set_0.getCarry(1) = bitblock::srli<127>(pablo_blk_Advance(u8.prefix3,carry_set_0.getCarry(1),u8.scope32)); 681 carry_set_0.getCarry(2) = bitblock::srli<127>(pablo_blk_Advance(u8.scope32,carry_set_0.getCarry(2),u8.scope33)); 682 carry_set_0.getCarry(3) = bitblock::srli<127>(pablo_blk_Advance(u8.prefix4,carry_set_0.getCarry(3),u8.scope42)); 683 carry_set_0.getCarry(4) = bitblock::srli<127>(pablo_blk_Advance(u8.scope42,carry_set_0.getCarry(4),u8.scope43)); 684 carry_set_0.getCarry(5) = bitblock::srli<127>(pablo_blk_Advance(u8.scope43,carry_set_0.getCarry(5),u8.scope44)); 685 BitBlock E0_F0_scope; 686 carry_set_0.getCarry(6) = bitblock::srli<127>(pablo_blk_Advance(simd_or(xE0,xF0),carry_set_0.getCarry(6),E0_F0_scope)); 687 BitBlock ED_F4_scope; 688 carry_set_0.getCarry(7) = bitblock::srli<127>(pablo_blk_Advance(simd_or(xED,xF4),carry_set_0.getCarry(7),ED_F4_scope)); 689 u8.xE0_scope = simd_and(u8.scope32,E0_F0_scope); 690 u8.xED_scope = simd_and(u8.scope32,ED_F4_scope); 691 u8.xF0_scope = simd_and(u8.scope42,E0_F0_scope); 692 u8.xF4_scope = simd_and(u8.scope42,ED_F4_scope); 693 carry_set_0.getCarry(8) = bitblock::srli<127>(pablo_blk_Advance(xEF,carry_set_0.getCarry(8),u8.xEF_scope)); 694 BitBlock u8lastscope; 695 u8lastscope = simd_or(simd_or(u8.scope22,u8.scope33),u8.scope44); 696 u8anyscope = simd_or(simd_or(simd_or(u8lastscope,u8.scope32),u8.scope42),u8.scope43); 697 BitBlock u8error1; 698 u8error1 = simd_and(u8.xE0_scope,u8.x80_x9F); 699 BitBlock u8error2; 700 u8error2 = simd_and(u8.xED_scope,u8.xA0_xBF); 701 BitBlock u8error3; 702 u8error3 = simd_and(u8.xF0_scope,u8.x80_x8F); 703 BitBlock u8error4; 704 u8error4 = simd_and(u8.xF4_scope,u8.x90_xBF); 705 u8_error = simd_or(u8_error,simd_or(simd_or(simd_or(u8error1,u8error2),u8error3),u8error4)); 706 BitBlock EF_BF_pending; 707 carry_set_0.getCarry(9) = bitblock::srli<127>(pablo_blk_Advance(simd_and(u8.xEF_scope,u8.xBF),carry_set_0.getCarry(9),EF_BF_pending)); 708 u8_FFFE_FFFF = simd_and(EF_BF_pending,simd_or(u8.xBE,u8.xBF)); 709 } 710 else 711 { 712 carry_set_0.carryDequeueEnqueue(1,9); 713 } 714 BitBlock u8mismatch; 715 u8mismatch = simd_xor(u8anyscope,u8.suffix); 716 if (bitblock::any(simd_or(simd_or(u8_error,u8mismatch),u8_FFFE_FFFF))) 717 { 718 assert_0_error(simd_or(simd_or(u8_error,u8mismatch),u8_FFFE_FFFF),"UTF8 error found"); 719 } 720 } 721 else 722 { 723 carry_set_0.carryDequeueEnqueue(0,10); 724 } 725 } 726 727 void clear() 728 { 729 730 } 731 732 CarryDeclare(carry_set_0,10,0); 733 }; 734 735 struct Parse_CtCDPI 736 { 737 Parse_CtCDPI() 738 { 739 carry_set_0.setCarry(carry_set_0.carryFlip(2),2); 740 } 741 742 IDISA_INLINE void do_block(struct Lex & lex,struct Marker & marker,struct CtCDPI_Callouts & ctCDPI_Callouts,struct Check_streams & check_streams) 743 { 744 ctCDPI_Callouts.Ct_starts = simd<1>::constant<0>(); 745 ctCDPI_Callouts.Ct_ends = simd<1>::constant<0>(); 746 ctCDPI_Callouts.CD_starts = simd<1>::constant<0>(); 747 ctCDPI_Callouts.CD_ends = simd<1>::constant<0>(); 748 ctCDPI_Callouts.PI_starts = simd<1>::constant<0>(); 749 ctCDPI_Callouts.PI_name_starts = simd<1>::constant<0>(); 750 ctCDPI_Callouts.PI_name_ends = simd<1>::constant<0>(); 751 ctCDPI_Callouts.PI_ends = simd<1>::constant<0>(); 752 BitBlock CtCDPI_starts; 753 CtCDPI_starts = simd<1>::constant<0>(); 754 BitBlock CtCDPI_ends; 755 CtCDPI_ends = simd<1>::constant<0>(); 756 BitBlock ctCDPI_mask; 757 ctCDPI_mask = simd<1>::constant<0>(); 758 BitBlock v; 759 v = simd_or(lex.LAngle,lex.Hyphen); 760 BitBlock w; 761 w = simd_or(lex.Hyphen,lex.QMark); 762 BitBlock v1; 763 carry_set_0.getPending64(0) = bitblock::srli<127>(pablo_blk_Advance_n_<1>(v,carry_set_0.getPending64(0),v1)); 764 BitBlock w1; 765 carry_set_0.getPending64(1) = bitblock::srli<127>(pablo_blk_Advance_n_<1>(w,carry_set_0.getPending64(1),w1)); 766 BitBlock LAngle_scope; 767 LAngle_scope = simd_andc(v1,w1); 768 BitBlock PI_opener; 769 PI_opener = simd_and(LAngle_scope,lex.QMark); 770 BitBlock CtCD_opener; 771 CtCD_opener = simd_and(LAngle_scope,lex.Exclam); 772 BitBlock CtCDPI_opener; 773 CtCDPI_opener = simd_or(PI_opener,CtCD_opener); 774 BitBlock CD_closer; 775 CD_closer = simd<1>::constant<0>(); 776 BitBlock DoubleHyphen; 777 DoubleHyphen = simd_and(simd_and(v1,w1),lex.Hyphen); 778 if (bitblock::any(simd_or(lex.RBracket,carry_set_0.carryRange(0,2)))) 779 { 780 BitBlock DoubleRBracket; 781 BitBlock _temp0; 782 carry_set_0.getCarry(0) = bitblock::srli<127>(pablo_blk_Advance(lex.RBracket,carry_set_0.getCarry(0),_temp0)); 783 DoubleRBracket = simd_and(_temp0,lex.RBracket); 784 BitBlock _temp1; 785 carry_set_0.getCarry(1) = bitblock::srli<127>(pablo_blk_Advance(DoubleRBracket,carry_set_0.getCarry(1),_temp1)); 786 CD_closer = simd_and(_temp1,lex.RAngle); 787 } 788 else 789 { 790 carry_set_0.carryDequeueEnqueue(0,2); 791 } 792 BitBlock PI_closer; 793 PI_closer = simd_and(simd_andc(w1,v1),lex.RAngle); 794 BitBlock CtCDPI_Cursor; 795 carry_set_0.getCarry(2) = bitblock::srli<127>(pablo_blk_ScanToFirst(CtCDPI_opener,carry_set_0.getCarry(2),CtCDPI_Cursor)); 796 if (bitblock::any(simd_or(CtCDPI_Cursor,carry_set_0.carryRange(3,13)))) 797 { 798 CtCDPI_starts = simd_or(CtCDPI_starts,CtCDPI_Cursor); 799 BitBlock PI_Cursor; 800 PI_Cursor = simd_and(CtCDPI_Cursor,PI_opener); 801 BitBlock CD_Ct_Cursor; 802 carry_set_0.getCarry(3) = bitblock::srli<127>(pablo_blk_Advance(simd_andc(CtCDPI_Cursor,PI_Cursor),carry_set_0.getCarry(3),CD_Ct_Cursor)); 803 BitBlock CD_Cursor; 804 CD_Cursor = simd_and(CD_Ct_Cursor,lex.LBracket); 805 BitBlock Ct_Cursor; 806 Ct_Cursor = simd_and(CD_Ct_Cursor,lex.Hyphen); 807 if (bitblock::any(simd_or(PI_Cursor,carry_set_0.carryRange(4,4)))) 808 { 809 ctCDPI_Callouts.PI_starts = simd_or(ctCDPI_Callouts.PI_starts,PI_Cursor); 810 carry_set_0.getCarry(4) = bitblock::srli<127>(pablo_blk_Advance(PI_Cursor,carry_set_0.getCarry(4),PI_Cursor)); 811 ctCDPI_Callouts.PI_name_starts = simd_or(ctCDPI_Callouts.PI_name_starts,PI_Cursor); 812 BitBlock PI_name_end; 813 carry_set_0.getCarry(5) = bitblock::srli<127>(pablo_blk_ScanThru(PI_Cursor,lex.NameScan,carry_set_0.getCarry(5),PI_name_end)); 814 BitBlock PI_error; 815 PI_error = simd_and(PI_Cursor,PI_name_end); 816 BitBlock PI_noWS; 817 PI_noWS = simd_andc(PI_name_end,lex.WS); 818 BitBlock _temp2; 819 carry_set_0.getCarry(6) = bitblock::srli<127>(pablo_blk_Advance(PI_noWS,carry_set_0.getCarry(6),_temp2)); 820 PI_error = simd_or(PI_error,simd_or(simd_andc(PI_noWS,lex.QMark),simd_andc(_temp2,PI_closer))); 821 if (bitblock::any(PI_error)) 822 { 823 assert_0_error(PI_error,"Error in PI syntax"); 824 } 825 ctCDPI_Callouts.PI_name_ends = simd_or(ctCDPI_Callouts.PI_name_ends,PI_name_end); 826 carry_set_0.getCarry(7) = bitblock::srli<127>(pablo_blk_ScanThru(PI_name_end,simd_not(PI_closer),carry_set_0.getCarry(7),PI_Cursor)); 827 ctCDPI_Callouts.PI_ends = simd_or(ctCDPI_Callouts.PI_ends,PI_Cursor); 828 CtCDPI_ends = simd_or(CtCDPI_ends,PI_Cursor); 829 } 830 else 831 { 832 carry_set_0.carryDequeueEnqueue(4,4); 833 } 834 if (bitblock::any(simd_or(CD_Cursor,carry_set_0.carryRange(8,1)))) 835 { 836 ctCDPI_Callouts.CD_starts = simd_or(ctCDPI_Callouts.CD_starts,CD_Cursor); 837 carry_set_0.getCarry(8) = bitblock::srli<127>(pablo_blk_ScanThru(CD_Cursor,simd_not(CD_closer),carry_set_0.getCarry(8),CD_Cursor)); 838 ctCDPI_Callouts.CD_ends = simd_or(ctCDPI_Callouts.CD_ends,CD_Cursor); 839 CtCDPI_ends = simd_or(CtCDPI_ends,CD_Cursor); 840 } 841 else 842 { 843 carry_set_0.carryDequeueEnqueue(8,1); 844 } 845 if (bitblock::any(simd_or(Ct_Cursor,carry_set_0.carryRange(9,5)))) 846 { 847 ctCDPI_Callouts.Ct_starts = simd_or(ctCDPI_Callouts.Ct_starts,Ct_Cursor); 848 carry_set_0.getCarry(9) = bitblock::srli<127>(pablo_blk_Advance(Ct_Cursor,carry_set_0.getCarry(9),Ct_Cursor)); 849 BitBlock Ct_error; 850 Ct_error = simd_andc(Ct_Cursor,lex.Hyphen); 851 BitBlock _temp3; 852 carry_set_0.getCarry(10) = bitblock::srli<127>(pablo_blk_Advance(Ct_Cursor,carry_set_0.getCarry(10),_temp3)); 853 carry_set_0.getCarry(11) = bitblock::srli<127>(pablo_blk_Advance(_temp3,carry_set_0.getCarry(11),Ct_Cursor)); 854 BitBlock _temp4; 855 carry_set_0.getCarry(12) = bitblock::srli<127>(pablo_blk_ScanThru(Ct_Cursor,simd_not(DoubleHyphen),carry_set_0.getCarry(12),_temp4)); 856 carry_set_0.getCarry(13) = bitblock::srli<127>(pablo_blk_Advance(_temp4,carry_set_0.getCarry(13),Ct_Cursor)); 857 if (bitblock::any(simd_or(Ct_error,simd_andc(Ct_Cursor,lex.RAngle)))) 858 { 859 assert_0_error(simd_or(Ct_error,simd_andc(Ct_Cursor,lex.RAngle)),"Error in comment syntax"); 860 } 861 ctCDPI_Callouts.Ct_ends = simd_or(ctCDPI_Callouts.Ct_ends,Ct_Cursor); 862 CtCDPI_ends = simd_or(CtCDPI_ends,Ct_Cursor); 863 } 864 else 865 { 866 carry_set_0.carryDequeueEnqueue(9,5); 867 } 868 CtCDPI_Cursor = simd_or(simd_or(PI_Cursor,CD_Cursor),Ct_Cursor); 869 carry_set_0.getCarry(14) = bitblock::srli<127>(pablo_blk_InclusiveSpan(CtCDPI_starts,CtCDPI_ends,carry_set_0.getCarry(14),ctCDPI_mask)); 870 if (bitblock::any(simd<1>::constant<0>())) 871 { 872 assert_0_error(simd<1>::constant<0>(),"Error in comment, CDATA or processing instruction syntax"); 873 } 874 carry_set_0.getCarry(15) = bitblock::srli<127>(pablo_blk_ScanThru(CtCDPI_Cursor,simd_not(CtCDPI_opener),carry_set_0.getCarry(15),CtCDPI_Cursor)); 875 while (bitblock::any(CtCDPI_Cursor)) 876 { 877 CarryDeclare(carry_set_1,13,0); 878 CtCDPI_starts = simd_or(CtCDPI_starts,CtCDPI_Cursor); 879 BitBlock PI_Cursor; 880 PI_Cursor = simd_and(CtCDPI_Cursor,PI_opener); 881 BitBlock CD_Ct_Cursor; 882 carry_set_1.getCarry(0) = bitblock::srli<127>(pablo_blk_Advance(simd_andc(CtCDPI_Cursor,PI_Cursor),carry_set_1.getCarry(0),CD_Ct_Cursor)); 883 BitBlock CD_Cursor; 884 CD_Cursor = simd_and(CD_Ct_Cursor,lex.LBracket); 885 BitBlock Ct_Cursor; 886 Ct_Cursor = simd_and(CD_Ct_Cursor,lex.Hyphen); 887 if (bitblock::any(PI_Cursor)) 888 { 889 ctCDPI_Callouts.PI_starts = simd_or(ctCDPI_Callouts.PI_starts,PI_Cursor); 890 carry_set_1.getCarry(1) = bitblock::srli<127>(pablo_blk_Advance(PI_Cursor,carry_set_1.getCarry(1),PI_Cursor)); 891 ctCDPI_Callouts.PI_name_starts = simd_or(ctCDPI_Callouts.PI_name_starts,PI_Cursor); 892 BitBlock PI_name_end; 893 carry_set_1.getCarry(2) = bitblock::srli<127>(pablo_blk_ScanThru(PI_Cursor,lex.NameScan,carry_set_1.getCarry(2),PI_name_end)); 894 BitBlock PI_error; 895 PI_error = simd_and(PI_Cursor,PI_name_end); 896 BitBlock PI_noWS; 897 PI_noWS = simd_andc(PI_name_end,lex.WS); 898 BitBlock _temp2; 899 carry_set_1.getCarry(3) = bitblock::srli<127>(pablo_blk_Advance(PI_noWS,carry_set_1.getCarry(3),_temp2)); 900 PI_error = simd_or(PI_error,simd_or(simd_andc(PI_noWS,lex.QMark),simd_andc(_temp2,PI_closer))); 901 if (bitblock::any(PI_error)) 902 { 903 assert_0_error(PI_error,"Error in PI syntax"); 904 } 905 ctCDPI_Callouts.PI_name_ends = simd_or(ctCDPI_Callouts.PI_name_ends,PI_name_end); 906 carry_set_1.getCarry(4) = bitblock::srli<127>(pablo_blk_ScanThru(PI_name_end,simd_not(PI_closer),carry_set_1.getCarry(4),PI_Cursor)); 907 ctCDPI_Callouts.PI_ends = simd_or(ctCDPI_Callouts.PI_ends,PI_Cursor); 908 CtCDPI_ends = simd_or(CtCDPI_ends,PI_Cursor); 909 } 910 if (bitblock::any(CD_Cursor)) 911 { 912 ctCDPI_Callouts.CD_starts = simd_or(ctCDPI_Callouts.CD_starts,CD_Cursor); 913 carry_set_1.getCarry(5) = bitblock::srli<127>(pablo_blk_ScanThru(CD_Cursor,simd_not(CD_closer),carry_set_1.getCarry(5),CD_Cursor)); 914 ctCDPI_Callouts.CD_ends = simd_or(ctCDPI_Callouts.CD_ends,CD_Cursor); 915 CtCDPI_ends = simd_or(CtCDPI_ends,CD_Cursor); 916 } 917 if (bitblock::any(Ct_Cursor)) 918 { 919 ctCDPI_Callouts.Ct_starts = simd_or(ctCDPI_Callouts.Ct_starts,Ct_Cursor); 920 carry_set_1.getCarry(6) = bitblock::srli<127>(pablo_blk_Advance(Ct_Cursor,carry_set_1.getCarry(6),Ct_Cursor)); 921 BitBlock Ct_error; 922 Ct_error = simd_andc(Ct_Cursor,lex.Hyphen); 923 BitBlock _temp3; 924 carry_set_1.getCarry(7) = bitblock::srli<127>(pablo_blk_Advance(Ct_Cursor,carry_set_1.getCarry(7),_temp3)); 925 carry_set_1.getCarry(8) = bitblock::srli<127>(pablo_blk_Advance(_temp3,carry_set_1.getCarry(8),Ct_Cursor)); 926 BitBlock _temp4; 927 carry_set_1.getCarry(9) = bitblock::srli<127>(pablo_blk_ScanThru(Ct_Cursor,simd_not(DoubleHyphen),carry_set_1.getCarry(9),_temp4)); 928 carry_set_1.getCarry(10) = bitblock::srli<127>(pablo_blk_Advance(_temp4,carry_set_1.getCarry(10),Ct_Cursor)); 929 if (bitblock::any(simd_or(Ct_error,simd_andc(Ct_Cursor,lex.RAngle)))) 930 { 931 assert_0_error(simd_or(Ct_error,simd_andc(Ct_Cursor,lex.RAngle)),"Error in comment syntax"); 932 } 933 ctCDPI_Callouts.Ct_ends = simd_or(ctCDPI_Callouts.Ct_ends,Ct_Cursor); 934 CtCDPI_ends = simd_or(CtCDPI_ends,Ct_Cursor); 935 } 936 CtCDPI_Cursor = simd_or(simd_or(PI_Cursor,CD_Cursor),Ct_Cursor); 937 carry_set_1.getCarry(11) = bitblock::srli<127>(pablo_blk_InclusiveSpan(CtCDPI_starts,CtCDPI_ends,carry_set_1.getCarry(11),ctCDPI_mask)); 938 if (bitblock::any(simd<1>::constant<0>())) 939 { 940 assert_0_error(simd<1>::constant<0>(),"Error in comment, CDATA or processing instruction syntax"); 941 } 942 carry_set_1.getCarry(12) = bitblock::srli<127>(pablo_blk_ScanThru(CtCDPI_Cursor,simd_not(CtCDPI_opener),carry_set_1.getCarry(12),CtCDPI_Cursor)); 943 LocalCarryCombine(carry_set_0,carry_set_1,3,13); 944 } 945 } 946 else 947 { 948 carry_set_0.carryDequeueEnqueue(3,13); 949 } 950 BitBlock _temp5; 951 carry_set_0.getCarry(16) = bitblock::srli<127>(pablo_blk_InclusiveSpan(simd_or(ctCDPI_Callouts.Ct_starts,ctCDPI_Callouts.PI_starts),simd_or(ctCDPI_Callouts.Ct_ends,ctCDPI_Callouts.PI_ends),carry_set_0.getCarry(16),_temp5)); 952 check_streams.misc_mask = simd_and(simd_or(simd_or(simd_or(lex.WS,lex.LAngle),_temp5),CtCDPI_starts),EOF_mask); 953 marker.LAngle_scope = simd_andc(LAngle_scope,ctCDPI_mask); 954 marker.Ref_opener = simd_andc(lex.RefStart,ctCDPI_mask); 955 marker.CD_closer = simd_andc(CD_closer,ctCDPI_mask); 956 carry_set_0.carryAdjust(17); 957 } 958 959 void do_final_block(struct Lex & lex,struct Marker & marker,struct CtCDPI_Callouts & ctCDPI_Callouts,struct Check_streams & check_streams,BitBlock & EOF_mask) 960 { 961 ctCDPI_Callouts.Ct_starts = simd<1>::constant<0>(); 962 ctCDPI_Callouts.Ct_ends = simd<1>::constant<0>(); 963 ctCDPI_Callouts.CD_starts = simd<1>::constant<0>(); 964 ctCDPI_Callouts.CD_ends = simd<1>::constant<0>(); 965 ctCDPI_Callouts.PI_starts = simd<1>::constant<0>(); 966 ctCDPI_Callouts.PI_name_starts = simd<1>::constant<0>(); 967 ctCDPI_Callouts.PI_name_ends = simd<1>::constant<0>(); 968 ctCDPI_Callouts.PI_ends = simd<1>::constant<0>(); 969 BitBlock CtCDPI_starts; 970 CtCDPI_starts = simd<1>::constant<0>(); 971 BitBlock CtCDPI_ends; 972 CtCDPI_ends = simd<1>::constant<0>(); 973 BitBlock ctCDPI_mask; 974 ctCDPI_mask = simd<1>::constant<0>(); 975 BitBlock v; 976 v = simd_or(lex.LAngle,lex.Hyphen); 977 BitBlock w; 978 w = simd_or(lex.Hyphen,lex.QMark); 979 BitBlock v1; 980 carry_set_0.getPending64(0) = bitblock::srli<127>(pablo_blk_Advance_n_<1>(v,carry_set_0.getPending64(0),v1)); 981 BitBlock w1; 982 carry_set_0.getPending64(1) = bitblock::srli<127>(pablo_blk_Advance_n_<1>(w,carry_set_0.getPending64(1),w1)); 983 BitBlock LAngle_scope; 984 LAngle_scope = simd_andc(v1,w1); 985 BitBlock PI_opener; 986 PI_opener = simd_and(LAngle_scope,lex.QMark); 987 BitBlock CtCD_opener; 988 CtCD_opener = simd_and(LAngle_scope,lex.Exclam); 989 BitBlock CtCDPI_opener; 990 CtCDPI_opener = simd_or(PI_opener,CtCD_opener); 991 BitBlock CD_closer; 992 CD_closer = simd<1>::constant<0>(); 993 BitBlock DoubleHyphen; 994 DoubleHyphen = simd_and(simd_and(v1,w1),lex.Hyphen); 995 if (bitblock::any(simd_or(lex.RBracket,carry_set_0.carryRange(0,2)))) 996 { 997 BitBlock DoubleRBracket; 998 BitBlock _temp0; 999 carry_set_0.getCarry(0) = bitblock::srli<127>(pablo_blk_Advance(lex.RBracket,carry_set_0.getCarry(0),_temp0)); 1000 DoubleRBracket = simd_and(_temp0,lex.RBracket); 1001 BitBlock _temp1; 1002 carry_set_0.getCarry(1) = bitblock::srli<127>(pablo_blk_Advance(DoubleRBracket,carry_set_0.getCarry(1),_temp1)); 1003 CD_closer = simd_and(_temp1,lex.RAngle); 1004 } 1005 else 1006 { 1007 carry_set_0.carryDequeueEnqueue(0,2); 1008 } 1009 BitBlock PI_closer; 1010 PI_closer = simd_and(simd_andc(w1,v1),lex.RAngle); 1011 BitBlock CtCDPI_Cursor; 1012 carry_set_0.getCarry(2) = bitblock::srli<127>(pablo_blk_ScanToFirst(simd_or(CtCDPI_opener,simd_not(EOF_mask)),carry_set_0.getCarry(2),CtCDPI_Cursor)); 1013 if (bitblock::any(simd_and(simd_or(CtCDPI_Cursor,carry_set_0.carryRange(3,13)),EOF_mask))) 1014 { 1015 CtCDPI_starts = simd_or(CtCDPI_starts,CtCDPI_Cursor); 1016 BitBlock PI_Cursor; 1017 PI_Cursor = simd_and(CtCDPI_Cursor,PI_opener); 1018 BitBlock CD_Ct_Cursor; 1019 carry_set_0.getCarry(3) = bitblock::srli<127>(pablo_blk_Advance(simd_andc(CtCDPI_Cursor,PI_Cursor),carry_set_0.getCarry(3),CD_Ct_Cursor)); 1020 BitBlock CD_Cursor; 1021 CD_Cursor = simd_and(CD_Ct_Cursor,lex.LBracket); 1022 BitBlock Ct_Cursor; 1023 Ct_Cursor = simd_and(CD_Ct_Cursor,lex.Hyphen); 1024 if (bitblock::any(simd_or(PI_Cursor,carry_set_0.carryRange(4,4)))) 1025 { 1026 ctCDPI_Callouts.PI_starts = simd_or(ctCDPI_Callouts.PI_starts,PI_Cursor); 1027 carry_set_0.getCarry(4) = bitblock::srli<127>(pablo_blk_Advance(PI_Cursor,carry_set_0.getCarry(4),PI_Cursor)); 1028 ctCDPI_Callouts.PI_name_starts = simd_or(ctCDPI_Callouts.PI_name_starts,PI_Cursor); 1029 BitBlock PI_name_end; 1030 carry_set_0.getCarry(5) = bitblock::srli<127>(pablo_blk_ScanThru(PI_Cursor,lex.NameScan,carry_set_0.getCarry(5),PI_name_end)); 1031 BitBlock PI_error; 1032 PI_error = simd_and(PI_Cursor,PI_name_end); 1033 BitBlock PI_noWS; 1034 PI_noWS = simd_andc(PI_name_end,lex.WS); 1035 BitBlock _temp2; 1036 carry_set_0.getCarry(6) = bitblock::srli<127>(pablo_blk_Advance(PI_noWS,carry_set_0.getCarry(6),_temp2)); 1037 PI_error = simd_or(PI_error,simd_or(simd_andc(PI_noWS,lex.QMark),simd_andc(_temp2,PI_closer))); 1038 if (bitblock::any(PI_error)) 1039 { 1040 assert_0_error(PI_error,"Error in PI syntax"); 1041 } 1042 ctCDPI_Callouts.PI_name_ends = simd_or(ctCDPI_Callouts.PI_name_ends,PI_name_end); 1043 carry_set_0.getCarry(7) = bitblock::srli<127>(pablo_blk_ScanThru(PI_name_end,simd_andc(EOF_mask,PI_closer),carry_set_0.getCarry(7),PI_Cursor)); 1044 ctCDPI_Callouts.PI_ends = simd_or(ctCDPI_Callouts.PI_ends,PI_Cursor); 1045 CtCDPI_ends = simd_or(CtCDPI_ends,PI_Cursor); 1046 } 1047 else 1048 { 1049 carry_set_0.carryDequeueEnqueue(4,4); 1050 } 1051 if (bitblock::any(simd_or(CD_Cursor,carry_set_0.carryRange(8,1)))) 1052 { 1053 ctCDPI_Callouts.CD_starts = simd_or(ctCDPI_Callouts.CD_starts,CD_Cursor); 1054 carry_set_0.getCarry(8) = bitblock::srli<127>(pablo_blk_ScanThru(CD_Cursor,simd_andc(EOF_mask,CD_closer),carry_set_0.getCarry(8),CD_Cursor)); 1055 ctCDPI_Callouts.CD_ends = simd_or(ctCDPI_Callouts.CD_ends,CD_Cursor); 1056 CtCDPI_ends = simd_or(CtCDPI_ends,CD_Cursor); 1057 } 1058 else 1059 { 1060 carry_set_0.carryDequeueEnqueue(8,1); 1061 } 1062 if (bitblock::any(simd_or(Ct_Cursor,carry_set_0.carryRange(9,5)))) 1063 { 1064 ctCDPI_Callouts.Ct_starts = simd_or(ctCDPI_Callouts.Ct_starts,Ct_Cursor); 1065 carry_set_0.getCarry(9) = bitblock::srli<127>(pablo_blk_Advance(Ct_Cursor,carry_set_0.getCarry(9),Ct_Cursor)); 1066 BitBlock Ct_error; 1067 Ct_error = simd_andc(Ct_Cursor,lex.Hyphen); 1068 BitBlock _temp3; 1069 carry_set_0.getCarry(10) = bitblock::srli<127>(pablo_blk_Advance(Ct_Cursor,carry_set_0.getCarry(10),_temp3)); 1070 carry_set_0.getCarry(11) = bitblock::srli<127>(pablo_blk_Advance(_temp3,carry_set_0.getCarry(11),Ct_Cursor)); 1071 BitBlock _temp4; 1072 carry_set_0.getCarry(12) = bitblock::srli<127>(pablo_blk_ScanThru(Ct_Cursor,simd_andc(EOF_mask,DoubleHyphen),carry_set_0.getCarry(12),_temp4)); 1073 carry_set_0.getCarry(13) = bitblock::srli<127>(pablo_blk_Advance(_temp4,carry_set_0.getCarry(13),Ct_Cursor)); 1074 if (bitblock::any(simd_or(Ct_error,simd_andc(Ct_Cursor,lex.RAngle)))) 1075 { 1076 assert_0_error(simd_or(Ct_error,simd_andc(Ct_Cursor,lex.RAngle)),"Error in comment syntax"); 1077 } 1078 ctCDPI_Callouts.Ct_ends = simd_or(ctCDPI_Callouts.Ct_ends,Ct_Cursor); 1079 CtCDPI_ends = simd_or(CtCDPI_ends,Ct_Cursor); 1080 } 1081 else 1082 { 1083 carry_set_0.carryDequeueEnqueue(9,5); 1084 } 1085 CtCDPI_Cursor = simd_or(simd_or(PI_Cursor,CD_Cursor),Ct_Cursor); 1086 carry_set_0.getCarry(14) = bitblock::srli<127>(pablo_blk_InclusiveSpan(CtCDPI_starts,CtCDPI_ends,carry_set_0.getCarry(14),ctCDPI_mask)); 1087 if (bitblock::any(simd_andc(ctCDPI_mask,EOF_mask))) 1088 { 1089 assert_0_error(simd_andc(ctCDPI_mask,EOF_mask),"Error in comment, CDATA or processing instruction syntax"); 1090 } 1091 carry_set_0.getCarry(15) = bitblock::srli<127>(pablo_blk_ScanThru(CtCDPI_Cursor,simd_andc(EOF_mask,CtCDPI_opener),carry_set_0.getCarry(15),CtCDPI_Cursor)); 1092 while (bitblock::any(simd_and(CtCDPI_Cursor,EOF_mask))) 1093 { 1094 CarryDeclare(carry_set_1,13,0); 1095 CtCDPI_starts = simd_or(CtCDPI_starts,CtCDPI_Cursor); 1096 BitBlock PI_Cursor; 1097 PI_Cursor = simd_and(CtCDPI_Cursor,PI_opener); 1098 BitBlock CD_Ct_Cursor; 1099 carry_set_1.getCarry(0) = bitblock::srli<127>(pablo_blk_Advance(simd_andc(CtCDPI_Cursor,PI_Cursor),carry_set_1.getCarry(0),CD_Ct_Cursor)); 1100 BitBlock CD_Cursor; 1101 CD_Cursor = simd_and(CD_Ct_Cursor,lex.LBracket); 1102 BitBlock Ct_Cursor; 1103 Ct_Cursor = simd_and(CD_Ct_Cursor,lex.Hyphen); 1104 if (bitblock::any(PI_Cursor)) 1105 { 1106 ctCDPI_Callouts.PI_starts = simd_or(ctCDPI_Callouts.PI_starts,PI_Cursor); 1107 carry_set_1.getCarry(1) = bitblock::srli<127>(pablo_blk_Advance(PI_Cursor,carry_set_1.getCarry(1),PI_Cursor)); 1108 ctCDPI_Callouts.PI_name_starts = simd_or(ctCDPI_Callouts.PI_name_starts,PI_Cursor); 1109 BitBlock PI_name_end; 1110 carry_set_1.getCarry(2) = bitblock::srli<127>(pablo_blk_ScanThru(PI_Cursor,lex.NameScan,carry_set_1.getCarry(2),PI_name_end)); 1111 BitBlock PI_error; 1112 PI_error = simd_and(PI_Cursor,PI_name_end); 1113 BitBlock PI_noWS; 1114 PI_noWS = simd_andc(PI_name_end,lex.WS); 1115 BitBlock _temp2; 1116 carry_set_1.getCarry(3) = bitblock::srli<127>(pablo_blk_Advance(PI_noWS,carry_set_1.getCarry(3),_temp2)); 1117 PI_error = simd_or(PI_error,simd_or(simd_andc(PI_noWS,lex.QMark),simd_andc(_temp2,PI_closer))); 1118 if (bitblock::any(PI_error)) 1119 { 1120 assert_0_error(PI_error,"Error in PI syntax"); 1121 } 1122 ctCDPI_Callouts.PI_name_ends = simd_or(ctCDPI_Callouts.PI_name_ends,PI_name_end); 1123 carry_set_1.getCarry(4) = bitblock::srli<127>(pablo_blk_ScanThru(PI_name_end,simd_andc(EOF_mask,PI_closer),carry_set_1.getCarry(4),PI_Cursor)); 1124 ctCDPI_Callouts.PI_ends = simd_or(ctCDPI_Callouts.PI_ends,PI_Cursor); 1125 CtCDPI_ends = simd_or(CtCDPI_ends,PI_Cursor); 1126 } 1127 if (bitblock::any(CD_Cursor)) 1128 { 1129 ctCDPI_Callouts.CD_starts = simd_or(ctCDPI_Callouts.CD_starts,CD_Cursor); 1130 carry_set_1.getCarry(5) = bitblock::srli<127>(pablo_blk_ScanThru(CD_Cursor,simd_andc(EOF_mask,CD_closer),carry_set_1.getCarry(5),CD_Cursor)); 1131 ctCDPI_Callouts.CD_ends = simd_or(ctCDPI_Callouts.CD_ends,CD_Cursor); 1132 CtCDPI_ends = simd_or(CtCDPI_ends,CD_Cursor); 1133 } 1134 if (bitblock::any(Ct_Cursor)) 1135 { 1136 ctCDPI_Callouts.Ct_starts = simd_or(ctCDPI_Callouts.Ct_starts,Ct_Cursor); 1137 carry_set_1.getCarry(6) = bitblock::srli<127>(pablo_blk_Advance(Ct_Cursor,carry_set_1.getCarry(6),Ct_Cursor)); 1138 BitBlock Ct_error; 1139 Ct_error = simd_andc(Ct_Cursor,lex.Hyphen); 1140 BitBlock _temp3; 1141 carry_set_1.getCarry(7) = bitblock::srli<127>(pablo_blk_Advance(Ct_Cursor,carry_set_1.getCarry(7),_temp3)); 1142 carry_set_1.getCarry(8) = bitblock::srli<127>(pablo_blk_Advance(_temp3,carry_set_1.getCarry(8),Ct_Cursor)); 1143 BitBlock _temp4; 1144 carry_set_1.getCarry(9) = bitblock::srli<127>(pablo_blk_ScanThru(Ct_Cursor,simd_andc(EOF_mask,DoubleHyphen),carry_set_1.getCarry(9),_temp4)); 1145 carry_set_1.getCarry(10) = bitblock::srli<127>(pablo_blk_Advance(_temp4,carry_set_1.getCarry(10),Ct_Cursor)); 1146 if (bitblock::any(simd_or(Ct_error,simd_andc(Ct_Cursor,lex.RAngle)))) 1147 { 1148 assert_0_error(simd_or(Ct_error,simd_andc(Ct_Cursor,lex.RAngle)),"Error in comment syntax"); 1149 } 1150 ctCDPI_Callouts.Ct_ends = simd_or(ctCDPI_Callouts.Ct_ends,Ct_Cursor); 1151 CtCDPI_ends = simd_or(CtCDPI_ends,Ct_Cursor); 1152 } 1153 CtCDPI_Cursor = simd_or(simd_or(PI_Cursor,CD_Cursor),Ct_Cursor); 1154 carry_set_1.getCarry(11) = bitblock::srli<127>(pablo_blk_InclusiveSpan(CtCDPI_starts,CtCDPI_ends,carry_set_1.getCarry(11),ctCDPI_mask)); 1155 if (bitblock::any(simd_andc(ctCDPI_mask,EOF_mask))) 1156 { 1157 assert_0_error(simd_andc(ctCDPI_mask,EOF_mask),"Error in comment, CDATA or processing instruction syntax"); 1158 } 1159 carry_set_1.getCarry(12) = bitblock::srli<127>(pablo_blk_ScanThru(CtCDPI_Cursor,simd_andc(EOF_mask,CtCDPI_opener),carry_set_1.getCarry(12),CtCDPI_Cursor)); 1160 LocalCarryCombine(carry_set_0,carry_set_1,3,13); 1161 } 1162 } 1163 else 1164 { 1165 carry_set_0.carryDequeueEnqueue(3,13); 1166 } 1167 BitBlock _temp5; 1168 carry_set_0.getCarry(16) = bitblock::srli<127>(pablo_blk_InclusiveSpan(simd_or(ctCDPI_Callouts.Ct_starts,ctCDPI_Callouts.PI_starts),simd_or(ctCDPI_Callouts.Ct_ends,ctCDPI_Callouts.PI_ends),carry_set_0.getCarry(16),_temp5)); 1169 check_streams.misc_mask = simd_and(simd_or(simd_or(simd_or(lex.WS,lex.LAngle),_temp5),CtCDPI_starts),EOF_mask); 1170 marker.LAngle_scope = simd_andc(LAngle_scope,ctCDPI_mask); 1171 marker.Ref_opener = simd_andc(lex.RefStart,ctCDPI_mask); 1172 marker.CD_closer = simd_andc(CD_closer,ctCDPI_mask); 1173 } 1174 1175 void clear() 1176 { 1177 carry_set_0.setCarry(carry_set_0.carryFlip(2),2); 1178 } 1179 1180 CarryDeclare(carry_set_0,17,2); 1181 }; 1182 1183 struct Parse_tags 1184 { 1185 Parse_tags() 1186 { 1187 } 1188 1189 IDISA_INLINE void do_block(struct Lex & lex,struct Marker & marker,struct Tag_Callouts & tag_Callouts) 1190 { 1191 BitBlock EqExpected; 1192 EqExpected = simd<1>::constant<0>(); 1193 BitBlock AttListEnd; 1194 AttListEnd = simd<1>::constant<0>(); 1195 BitBlock DQuoteDelim; 1196 DQuoteDelim = simd_or(lex.DQuote,lex.LAngle); 1197 BitBlock SQuoteDelim; 1198 SQuoteDelim = simd_or(lex.SQuote,lex.LAngle); 1199 BitBlock AttListDelim; 1200 AttListDelim = simd_or(lex.Slash,lex.RAngle); 1201 tag_Callouts.ElemName_starts = simd_andc(marker.LAngle_scope,lex.Slash); 1202 tag_Callouts.EndTag_marks = simd_and(marker.LAngle_scope,lex.Slash); 1203 carry_set_0.getCarry(0) = bitblock::srli<127>(pablo_blk_ScanThru(tag_Callouts.ElemName_starts,lex.NameScan,carry_set_0.getCarry(0),tag_Callouts.ElemName_ends)); 1204 BitBlock ParseError; 1205 ParseError = simd_and(tag_Callouts.ElemName_starts,tag_Callouts.ElemName_ends); 1206 tag_Callouts.AttName_starts = simd<1>::constant<0>(); 1207 tag_Callouts.AttName_ends = simd<1>::constant<0>(); 1208 tag_Callouts.AttVal_starts = simd<1>::constant<0>(); 1209 tag_Callouts.AttVal_ends = simd<1>::constant<0>(); 1210 if (bitblock::any(simd_or(simd_and(tag_Callouts.ElemName_ends,lex.WS),carry_set_0.carryRange(1,8)))) 1211 { 1212 BitBlock AfterWS; 1213 carry_set_0.getCarry(1) = bitblock::srli<127>(pablo_blk_ScanThru(tag_Callouts.ElemName_ends,lex.WS,carry_set_0.getCarry(1),AfterWS)); 1214 AttListEnd = simd_and(AfterWS,AttListDelim); 1215 BitBlock AttNameStart; 1216 AttNameStart = simd_andc(AfterWS,AttListDelim); 1217 if (bitblock::any(simd_or(AttNameStart,carry_set_0.carryRange(2,7)))) 1218 { 1219 ParseError = simd_or(ParseError,simd_andc(AttNameStart,lex.NameScan)); 1220 tag_Callouts.AttName_starts = simd_or(tag_Callouts.AttName_starts,AttNameStart); 1221 BitBlock AttNameFollow; 1222 carry_set_0.getCarry(2) = bitblock::srli<127>(pablo_blk_ScanThru(AttNameStart,lex.NameScan,carry_set_0.getCarry(2),AttNameFollow)); 1223 tag_Callouts.AttName_ends = simd_or(tag_Callouts.AttName_ends,AttNameFollow); 1224 if (bitblock::any(simd_or(simd_and(AttNameFollow,lex.WS),carry_set_0.carryRange(3,1)))) 1225 { 1226 carry_set_0.getCarry(3) = bitblock::srli<127>(pablo_blk_ScanThru(AttNameFollow,lex.WS,carry_set_0.getCarry(3),EqExpected)); 1227 } 1228 else 1229 { 1230 EqExpected = AttNameFollow; 1231 carry_set_0.carryDequeueEnqueue(3,1); 1232 } 1233 ParseError = simd_or(ParseError,simd_andc(EqExpected,lex.Equals)); 1234 BitBlock AttValPos; 1235 carry_set_0.getCarry(4) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(EqExpected,lex.WS,carry_set_0.getCarry(4),AttValPos)); 1236 tag_Callouts.AttVal_starts = simd_or(tag_Callouts.AttVal_starts,AttValPos); 1237 BitBlock DQuoteAttVal; 1238 DQuoteAttVal = simd_and(AttValPos,lex.DQuote); 1239 BitBlock SQuoteAttVal; 1240 SQuoteAttVal = simd_and(AttValPos,lex.SQuote); 1241 BitBlock DQuoteAttEnd; 1242 carry_set_0.getCarry(5) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(DQuoteAttVal,simd_not(DQuoteDelim),carry_set_0.getCarry(5),DQuoteAttEnd)); 1243 BitBlock SQuoteAttEnd; 1244 carry_set_0.getCarry(6) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(SQuoteAttVal,simd_not(SQuoteDelim),carry_set_0.getCarry(6),SQuoteAttEnd)); 1245 BitBlock AttValEnd; 1246 AttValEnd = simd_or(DQuoteAttEnd,SQuoteAttEnd); 1247 ParseError = simd_or(ParseError,simd_andc(simd_or(AttValPos,AttValEnd),simd_or(lex.DQuote,lex.SQuote))); 1248 BitBlock AttValFollow; 1249 carry_set_0.getCarry(7) = bitblock::srli<127>(pablo_blk_Advance(AttValEnd,carry_set_0.getCarry(7),AttValFollow)); 1250 tag_Callouts.AttVal_ends = simd_or(tag_Callouts.AttVal_ends,AttValFollow); 1251 if (bitblock::any(simd_or(simd_and(AttValFollow,lex.WS),carry_set_0.carryRange(8,1)))) 1252 { 1253 carry_set_0.getCarry(8) = bitblock::srli<127>(pablo_blk_ScanThru(AttValFollow,lex.WS,carry_set_0.getCarry(8),AfterWS)); 1254 AttListEnd = simd_or(AttListEnd,simd_and(AfterWS,AttListDelim)); 1255 AttNameStart = simd_andc(AfterWS,AttListDelim); 1256 } 1257 else 1258 { 1259 AttListEnd = simd_or(AttListEnd,simd_and(AttValFollow,AttListDelim)); 1260 AttNameStart = simd_andc(AttValFollow,AttListDelim); 1261 carry_set_0.carryDequeueEnqueue(8,1); 1262 } 1263 ParseError = simd_or(ParseError,simd_and(AttValFollow,AttNameStart)); 1264 while (bitblock::any(AttNameStart)) 1265 { 1266 CarryDeclare(carry_set_1,7,0); 1267 ParseError = simd_or(ParseError,simd_andc(AttNameStart,lex.NameScan)); 1268 tag_Callouts.AttName_starts = simd_or(tag_Callouts.AttName_starts,AttNameStart); 1269 BitBlock AttNameFollow; 1270 carry_set_1.getCarry(0) = bitblock::srli<127>(pablo_blk_ScanThru(AttNameStart,lex.NameScan,carry_set_1.getCarry(0),AttNameFollow)); 1271 tag_Callouts.AttName_ends = simd_or(tag_Callouts.AttName_ends,AttNameFollow); 1272 if (bitblock::any(simd_and(AttNameFollow,lex.WS))) 1273 { 1274 carry_set_1.getCarry(1) = bitblock::srli<127>(pablo_blk_ScanThru(AttNameFollow,lex.WS,carry_set_1.getCarry(1),EqExpected)); 1275 } 1276 else 1277 { 1278 EqExpected = AttNameFollow; 1279 } 1280 ParseError = simd_or(ParseError,simd_andc(EqExpected,lex.Equals)); 1281 BitBlock AttValPos; 1282 carry_set_1.getCarry(2) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(EqExpected,lex.WS,carry_set_1.getCarry(2),AttValPos)); 1283 tag_Callouts.AttVal_starts = simd_or(tag_Callouts.AttVal_starts,AttValPos); 1284 BitBlock DQuoteAttVal; 1285 DQuoteAttVal = simd_and(AttValPos,lex.DQuote); 1286 BitBlock SQuoteAttVal; 1287 SQuoteAttVal = simd_and(AttValPos,lex.SQuote); 1288 BitBlock DQuoteAttEnd; 1289 carry_set_1.getCarry(3) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(DQuoteAttVal,simd_not(DQuoteDelim),carry_set_1.getCarry(3),DQuoteAttEnd)); 1290 BitBlock SQuoteAttEnd; 1291 carry_set_1.getCarry(4) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(SQuoteAttVal,simd_not(SQuoteDelim),carry_set_1.getCarry(4),SQuoteAttEnd)); 1292 BitBlock AttValEnd; 1293 AttValEnd = simd_or(DQuoteAttEnd,SQuoteAttEnd); 1294 ParseError = simd_or(ParseError,simd_andc(simd_or(AttValPos,AttValEnd),simd_or(lex.DQuote,lex.SQuote))); 1295 BitBlock AttValFollow; 1296 carry_set_1.getCarry(5) = bitblock::srli<127>(pablo_blk_Advance(AttValEnd,carry_set_1.getCarry(5),AttValFollow)); 1297 tag_Callouts.AttVal_ends = simd_or(tag_Callouts.AttVal_ends,AttValFollow); 1298 if (bitblock::any(simd_and(AttValFollow,lex.WS))) 1299 { 1300 carry_set_1.getCarry(6) = bitblock::srli<127>(pablo_blk_ScanThru(AttValFollow,lex.WS,carry_set_1.getCarry(6),AfterWS)); 1301 AttListEnd = simd_or(AttListEnd,simd_and(AfterWS,AttListDelim)); 1302 AttNameStart = simd_andc(AfterWS,AttListDelim); 1303 } 1304 else 1305 { 1306 AttListEnd = simd_or(AttListEnd,simd_and(AttValFollow,AttListDelim)); 1307 AttNameStart = simd_andc(AttValFollow,AttListDelim); 1308 } 1309 ParseError = simd_or(ParseError,simd_and(AttValFollow,AttNameStart)); 1310 LocalCarryCombine(carry_set_0,carry_set_1,2,7); 1311 } 1312 } 1313 else 1314 { 1315 carry_set_0.carryDequeueEnqueue(2,7); 1316 } 1317 } 1318 else 1319 { 1320 AttListEnd = simd_and(tag_Callouts.ElemName_ends,AttListDelim); 1321 ParseError = simd_or(ParseError,simd_andc(tag_Callouts.ElemName_ends,AttListDelim)); 1322 carry_set_0.carryDequeueEnqueue(1,8); 1323 } 1324 BitBlock STagEnds; 1325 STagEnds = simd_and(AttListEnd,lex.RAngle); 1326 carry_set_0.getCarry(9) = bitblock::srli<127>(pablo_blk_Advance(simd_and(AttListEnd,lex.Slash),carry_set_0.getCarry(9),tag_Callouts.EmptyTag_marks)); 1327 ParseError = simd_or(ParseError,simd_andc(tag_Callouts.EmptyTag_marks,lex.RAngle)); 1328 BitBlock EndTagEnds; 1329 carry_set_0.getCarry(10) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(tag_Callouts.EndTag_marks,lex.NameScan,carry_set_0.getCarry(10),EndTagEnds)); 1330 if (bitblock::any(simd_or(simd_and(EndTagEnds,lex.WS),carry_set_0.carryRange(11,1)))) 1331 { 1332 carry_set_0.getCarry(11) = bitblock::srli<127>(pablo_blk_ScanThru(EndTagEnds,lex.WS,carry_set_0.getCarry(11),EndTagEnds)); 1333 } 1334 else 1335 { 1336 carry_set_0.carryDequeueEnqueue(11,1); 1337 } 1338 ParseError = simd_or(ParseError,simd_andc(EndTagEnds,lex.RAngle)); 1339 if (bitblock::any(ParseError)) 1340 { 1341 assert_0_error(ParseError,"Tag parsing error found"); 1342 } 1343 carry_set_0.getCarry(12) = bitblock::srli<127>(pablo_blk_SpanUpTo(tag_Callouts.AttVal_starts,tag_Callouts.AttVal_ends,carry_set_0.getCarry(12),tag_Callouts.AttVal_spans)); 1344 carry_set_0.carryAdjust(13); 1345 } 1346 1347 void do_final_block(struct Lex & lex,struct Marker & marker,struct Tag_Callouts & tag_Callouts,BitBlock & EOF_mask) 1348 { 1349 BitBlock EqExpected; 1350 EqExpected = simd<1>::constant<0>(); 1351 BitBlock AttListEnd; 1352 AttListEnd = simd<1>::constant<0>(); 1353 BitBlock DQuoteDelim; 1354 DQuoteDelim = simd_or(lex.DQuote,lex.LAngle); 1355 BitBlock SQuoteDelim; 1356 SQuoteDelim = simd_or(lex.SQuote,lex.LAngle); 1357 BitBlock AttListDelim; 1358 AttListDelim = simd_or(lex.Slash,lex.RAngle); 1359 tag_Callouts.ElemName_starts = simd_andc(marker.LAngle_scope,lex.Slash); 1360 tag_Callouts.EndTag_marks = simd_and(marker.LAngle_scope,lex.Slash); 1361 carry_set_0.getCarry(0) = bitblock::srli<127>(pablo_blk_ScanThru(tag_Callouts.ElemName_starts,lex.NameScan,carry_set_0.getCarry(0),tag_Callouts.ElemName_ends)); 1362 BitBlock ParseError; 1363 ParseError = simd_and(tag_Callouts.ElemName_starts,tag_Callouts.ElemName_ends); 1364 tag_Callouts.AttName_starts = simd<1>::constant<0>(); 1365 tag_Callouts.AttName_ends = simd<1>::constant<0>(); 1366 tag_Callouts.AttVal_starts = simd<1>::constant<0>(); 1367 tag_Callouts.AttVal_ends = simd<1>::constant<0>(); 1368 if (bitblock::any(simd_or(simd_and(tag_Callouts.ElemName_ends,lex.WS),carry_set_0.carryRange(1,8)))) 1369 { 1370 BitBlock AfterWS; 1371 carry_set_0.getCarry(1) = bitblock::srli<127>(pablo_blk_ScanThru(tag_Callouts.ElemName_ends,lex.WS,carry_set_0.getCarry(1),AfterWS)); 1372 AttListEnd = simd_and(AfterWS,AttListDelim); 1373 BitBlock AttNameStart; 1374 AttNameStart = simd_andc(AfterWS,AttListDelim); 1375 if (bitblock::any(simd_and(simd_or(AttNameStart,carry_set_0.carryRange(2,7)),EOF_mask))) 1376 { 1377 ParseError = simd_or(ParseError,simd_andc(AttNameStart,lex.NameScan)); 1378 tag_Callouts.AttName_starts = simd_or(tag_Callouts.AttName_starts,AttNameStart); 1379 BitBlock AttNameFollow; 1380 carry_set_0.getCarry(2) = bitblock::srli<127>(pablo_blk_ScanThru(AttNameStart,lex.NameScan,carry_set_0.getCarry(2),AttNameFollow)); 1381 tag_Callouts.AttName_ends = simd_or(tag_Callouts.AttName_ends,AttNameFollow); 1382 if (bitblock::any(simd_or(simd_and(AttNameFollow,lex.WS),carry_set_0.carryRange(3,1)))) 1383 { 1384 carry_set_0.getCarry(3) = bitblock::srli<127>(pablo_blk_ScanThru(AttNameFollow,lex.WS,carry_set_0.getCarry(3),EqExpected)); 1385 } 1386 else 1387 { 1388 EqExpected = AttNameFollow; 1389 carry_set_0.carryDequeueEnqueue(3,1); 1390 } 1391 ParseError = simd_or(ParseError,simd_andc(EqExpected,lex.Equals)); 1392 BitBlock AttValPos; 1393 carry_set_0.getCarry(4) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(EqExpected,lex.WS,carry_set_0.getCarry(4),AttValPos)); 1394 tag_Callouts.AttVal_starts = simd_or(tag_Callouts.AttVal_starts,AttValPos); 1395 BitBlock DQuoteAttVal; 1396 DQuoteAttVal = simd_and(AttValPos,lex.DQuote); 1397 BitBlock SQuoteAttVal; 1398 SQuoteAttVal = simd_and(AttValPos,lex.SQuote); 1399 BitBlock DQuoteAttEnd; 1400 carry_set_0.getCarry(5) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(DQuoteAttVal,simd_andc(EOF_mask,DQuoteDelim),carry_set_0.getCarry(5),DQuoteAttEnd)); 1401 BitBlock SQuoteAttEnd; 1402 carry_set_0.getCarry(6) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(SQuoteAttVal,simd_andc(EOF_mask,SQuoteDelim),carry_set_0.getCarry(6),SQuoteAttEnd)); 1403 BitBlock AttValEnd; 1404 AttValEnd = simd_or(DQuoteAttEnd,SQuoteAttEnd); 1405 ParseError = simd_or(ParseError,simd_andc(simd_or(AttValPos,AttValEnd),simd_or(lex.DQuote,lex.SQuote))); 1406 BitBlock AttValFollow; 1407 carry_set_0.getCarry(7) = bitblock::srli<127>(pablo_blk_Advance(AttValEnd,carry_set_0.getCarry(7),AttValFollow)); 1408 tag_Callouts.AttVal_ends = simd_or(tag_Callouts.AttVal_ends,AttValFollow); 1409 if (bitblock::any(simd_or(simd_and(AttValFollow,lex.WS),carry_set_0.carryRange(8,1)))) 1410 { 1411 carry_set_0.getCarry(8) = bitblock::srli<127>(pablo_blk_ScanThru(AttValFollow,lex.WS,carry_set_0.getCarry(8),AfterWS)); 1412 AttListEnd = simd_or(AttListEnd,simd_and(AfterWS,AttListDelim)); 1413 AttNameStart = simd_andc(AfterWS,AttListDelim); 1414 } 1415 else 1416 { 1417 AttListEnd = simd_or(AttListEnd,simd_and(AttValFollow,AttListDelim)); 1418 AttNameStart = simd_andc(AttValFollow,AttListDelim); 1419 carry_set_0.carryDequeueEnqueue(8,1); 1420 } 1421 ParseError = simd_or(ParseError,simd_and(AttValFollow,AttNameStart)); 1422 while (bitblock::any(simd_and(AttNameStart,EOF_mask))) 1423 { 1424 CarryDeclare(carry_set_1,7,0); 1425 ParseError = simd_or(ParseError,simd_andc(AttNameStart,lex.NameScan)); 1426 tag_Callouts.AttName_starts = simd_or(tag_Callouts.AttName_starts,AttNameStart); 1427 BitBlock AttNameFollow; 1428 carry_set_1.getCarry(0) = bitblock::srli<127>(pablo_blk_ScanThru(AttNameStart,lex.NameScan,carry_set_1.getCarry(0),AttNameFollow)); 1429 tag_Callouts.AttName_ends = simd_or(tag_Callouts.AttName_ends,AttNameFollow); 1430 if (bitblock::any(simd_and(AttNameFollow,lex.WS))) 1431 { 1432 carry_set_1.getCarry(1) = bitblock::srli<127>(pablo_blk_ScanThru(AttNameFollow,lex.WS,carry_set_1.getCarry(1),EqExpected)); 1433 } 1434 else 1435 { 1436 EqExpected = AttNameFollow; 1437 } 1438 ParseError = simd_or(ParseError,simd_andc(EqExpected,lex.Equals)); 1439 BitBlock AttValPos; 1440 carry_set_1.getCarry(2) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(EqExpected,lex.WS,carry_set_1.getCarry(2),AttValPos)); 1441 tag_Callouts.AttVal_starts = simd_or(tag_Callouts.AttVal_starts,AttValPos); 1442 BitBlock DQuoteAttVal; 1443 DQuoteAttVal = simd_and(AttValPos,lex.DQuote); 1444 BitBlock SQuoteAttVal; 1445 SQuoteAttVal = simd_and(AttValPos,lex.SQuote); 1446 BitBlock DQuoteAttEnd; 1447 carry_set_1.getCarry(3) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(DQuoteAttVal,simd_andc(EOF_mask,DQuoteDelim),carry_set_1.getCarry(3),DQuoteAttEnd)); 1448 BitBlock SQuoteAttEnd; 1449 carry_set_1.getCarry(4) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(SQuoteAttVal,simd_andc(EOF_mask,SQuoteDelim),carry_set_1.getCarry(4),SQuoteAttEnd)); 1450 BitBlock AttValEnd; 1451 AttValEnd = simd_or(DQuoteAttEnd,SQuoteAttEnd); 1452 ParseError = simd_or(ParseError,simd_andc(simd_or(AttValPos,AttValEnd),simd_or(lex.DQuote,lex.SQuote))); 1453 BitBlock AttValFollow; 1454 carry_set_1.getCarry(5) = bitblock::srli<127>(pablo_blk_Advance(AttValEnd,carry_set_1.getCarry(5),AttValFollow)); 1455 tag_Callouts.AttVal_ends = simd_or(tag_Callouts.AttVal_ends,AttValFollow); 1456 if (bitblock::any(simd_and(AttValFollow,lex.WS))) 1457 { 1458 carry_set_1.getCarry(6) = bitblock::srli<127>(pablo_blk_ScanThru(AttValFollow,lex.WS,carry_set_1.getCarry(6),AfterWS)); 1459 AttListEnd = simd_or(AttListEnd,simd_and(AfterWS,AttListDelim)); 1460 AttNameStart = simd_andc(AfterWS,AttListDelim); 1461 } 1462 else 1463 { 1464 AttListEnd = simd_or(AttListEnd,simd_and(AttValFollow,AttListDelim)); 1465 AttNameStart = simd_andc(AttValFollow,AttListDelim); 1466 } 1467 ParseError = simd_or(ParseError,simd_and(AttValFollow,AttNameStart)); 1468 LocalCarryCombine(carry_set_0,carry_set_1,2,7); 1469 } 1470 } 1471 else 1472 { 1473 carry_set_0.carryDequeueEnqueue(2,7); 1474 } 1475 } 1476 else 1477 { 1478 AttListEnd = simd_and(tag_Callouts.ElemName_ends,AttListDelim); 1479 ParseError = simd_or(ParseError,simd_andc(tag_Callouts.ElemName_ends,AttListDelim)); 1480 carry_set_0.carryDequeueEnqueue(1,8); 1481 } 1482 BitBlock STagEnds; 1483 STagEnds = simd_and(AttListEnd,lex.RAngle); 1484 carry_set_0.getCarry(9) = bitblock::srli<127>(pablo_blk_Advance(simd_and(AttListEnd,lex.Slash),carry_set_0.getCarry(9),tag_Callouts.EmptyTag_marks)); 1485 ParseError = simd_or(ParseError,simd_andc(tag_Callouts.EmptyTag_marks,lex.RAngle)); 1486 BitBlock EndTagEnds; 1487 carry_set_0.getCarry(10) = bitblock::srli<127>(pablo_blk_AdvanceThenScanThru(tag_Callouts.EndTag_marks,lex.NameScan,carry_set_0.getCarry(10),EndTagEnds)); 1488 if (bitblock::any(simd_or(simd_and(EndTagEnds,lex.WS),carry_set_0.carryRange(11,1)))) 1489 { 1490 carry_set_0.getCarry(11) = bitblock::srli<127>(pablo_blk_ScanThru(EndTagEnds,lex.WS,carry_set_0.getCarry(11),EndTagEnds)); 1491 } 1492 else 1493 { 1494 carry_set_0.carryDequeueEnqueue(11,1); 1495 } 1496 ParseError = simd_or(ParseError,simd_andc(EndTagEnds,lex.RAngle)); 1497 if (bitblock::any(ParseError)) 1498 { 1499 assert_0_error(ParseError,"Tag parsing error found"); 1500 } 1501 carry_set_0.getCarry(12) = bitblock::srli<127>(pablo_blk_SpanUpTo(tag_Callouts.AttVal_starts,tag_Callouts.AttVal_ends,carry_set_0.getCarry(12),tag_Callouts.AttVal_spans)); 1502 } 1503 1504 void clear() 1505 { 1506 1507 } 1508 1509 CarryDeclare(carry_set_0,13,0); 1510 }; 1511 1512 struct Parse_refs 1513 { 1514 Parse_refs() 1515 { 1516 } 1517 1518 IDISA_INLINE void do_block(struct Lex & lex,struct Marker & marker,struct Ref_Callouts & ref_Callouts) 1519 { 1520 ref_Callouts.GenRef_starts = simd<1>::constant<0>(); 1521 ref_Callouts.GenRef_ends = simd<1>::constant<0>(); 1522 ref_Callouts.DecRef_starts = simd<1>::constant<0>(); 1523 ref_Callouts.DecRef_ends = simd<1>::constant<0>(); 1524 ref_Callouts.HexRef_starts = simd<1>::constant<0>(); 1525 ref_Callouts.HexRef_ends = simd<1>::constant<0>(); 1526 BitBlock ref_error; 1527 ref_error = simd<1>::constant<0>(); 1528 if (bitblock::any(simd_or(marker.Ref_opener,carry_set_0.carryRange(0,6)))) 1529 { 1530 BitBlock Ref_scope; 1531 carry_set_0.getCarry(0) = bitblock::srli<127>(pablo_blk_Advance(marker.Ref_opener,carry_set_0.getCarry(0),Ref_scope)); 1532 BitBlock NumRef2; 1533 NumRef2 = simd_and(Ref_scope,lex.Hash); 1534 ref_Callouts.GenRef_starts = simd_andc(Ref_scope,lex.Hash); 1535 BitBlock NumRef3; 1536 carry_set_0.getCarry(1) = bitblock::srli<127>(pablo_blk_Advance(NumRef2,carry_set_0.getCarry(1),NumRef3)); 1537 BitBlock HexRef3; 1538 HexRef3 = simd_and(NumRef3,lex.x); 1539 ref_Callouts.DecRef_starts = simd_andc(NumRef3,lex.x); 1540 carry_set_0.getCarry(2) = bitblock::srli<127>(pablo_blk_Advance(HexRef3,carry_set_0.getCarry(2),ref_Callouts.HexRef_starts)); 1541 carry_set_0.getCarry(3) = bitblock::srli<127>(pablo_blk_ScanThru(ref_Callouts.GenRef_starts,lex.NameScan,carry_set_0.getCarry(3),ref_Callouts.GenRef_ends)); 1542 carry_set_0.getCarry(4) = bitblock::srli<127>(pablo_blk_ScanThru(ref_Callouts.DecRef_starts,lex.Digit,carry_set_0.getCarry(4),ref_Callouts.DecRef_ends)); 1543 carry_set_0.getCarry(5) = bitblock::srli<127>(pablo_blk_ScanThru(ref_Callouts.HexRef_starts,lex.Hex,carry_set_0.getCarry(5),ref_Callouts.HexRef_ends)); 1544 BitBlock ref_error1; 1545 ref_error1 = simd_andc(ref_Callouts.DecRef_starts,lex.Digit); 1546 BitBlock ref_error2; 1547 ref_error2 = simd_andc(ref_Callouts.HexRef_starts,lex.Hex); 1548 BitBlock ref_ends; 1549 ref_ends = simd_or(simd_or(ref_Callouts.GenRef_ends,ref_Callouts.DecRef_ends),ref_Callouts.HexRef_ends); 1550 BitBlock ref_error3; 1551 ref_error3 = simd_andc(ref_ends,lex.Semicolon); 1552 if (bitblock::any(simd_or(simd_or(ref_error1,ref_error2),ref_error3))) 1553 { 1554 assert_0_error(simd_or(simd_or(ref_error1,ref_error2),ref_error3),"Reference error found"); 1555 } 1556 } 1557 else 1558 { 1559 carry_set_0.carryDequeueEnqueue(0,6); 1560 } 1561 carry_set_0.carryAdjust(6); 1562 } 1563 1564 void do_final_block(struct Lex & lex,struct Marker & marker,struct Ref_Callouts & ref_Callouts,BitBlock & EOF_mask) 1565 { 1566 ref_Callouts.GenRef_starts = simd<1>::constant<0>(); 1567 ref_Callouts.GenRef_ends = simd<1>::constant<0>(); 1568 ref_Callouts.DecRef_starts = simd<1>::constant<0>(); 1569 ref_Callouts.DecRef_ends = simd<1>::constant<0>(); 1570 ref_Callouts.HexRef_starts = simd<1>::constant<0>(); 1571 ref_Callouts.HexRef_ends = simd<1>::constant<0>(); 1572 BitBlock ref_error; 1573 ref_error = simd<1>::constant<0>(); 1574 if (bitblock::any(simd_or(marker.Ref_opener,carry_set_0.carryRange(0,6)))) 1575 { 1576 BitBlock Ref_scope; 1577 carry_set_0.getCarry(0) = bitblock::srli<127>(pablo_blk_Advance(marker.Ref_opener,carry_set_0.getCarry(0),Ref_scope)); 1578 BitBlock NumRef2; 1579 NumRef2 = simd_and(Ref_scope,lex.Hash); 1580 ref_Callouts.GenRef_starts = simd_andc(Ref_scope,lex.Hash); 1581 BitBlock NumRef3; 1582 carry_set_0.getCarry(1) = bitblock::srli<127>(pablo_blk_Advance(NumRef2,carry_set_0.getCarry(1),NumRef3)); 1583 BitBlock HexRef3; 1584 HexRef3 = simd_and(NumRef3,lex.x); 1585 ref_Callouts.DecRef_starts = simd_andc(NumRef3,lex.x); 1586 carry_set_0.getCarry(2) = bitblock::srli<127>(pablo_blk_Advance(HexRef3,carry_set_0.getCarry(2),ref_Callouts.HexRef_starts)); 1587 carry_set_0.getCarry(3) = bitblock::srli<127>(pablo_blk_ScanThru(ref_Callouts.GenRef_starts,lex.NameScan,carry_set_0.getCarry(3),ref_Callouts.GenRef_ends)); 1588 carry_set_0.getCarry(4) = bitblock::srli<127>(pablo_blk_ScanThru(ref_Callouts.DecRef_starts,lex.Digit,carry_set_0.getCarry(4),ref_Callouts.DecRef_ends)); 1589 carry_set_0.getCarry(5) = bitblock::srli<127>(pablo_blk_ScanThru(ref_Callouts.HexRef_starts,lex.Hex,carry_set_0.getCarry(5),ref_Callouts.HexRef_ends)); 1590 BitBlock ref_error1; 1591 ref_error1 = simd_andc(ref_Callouts.DecRef_starts,lex.Digit); 1592 BitBlock ref_error2; 1593 ref_error2 = simd_andc(ref_Callouts.HexRef_starts,lex.Hex); 1594 BitBlock ref_ends; 1595 ref_ends = simd_or(simd_or(ref_Callouts.GenRef_ends,ref_Callouts.DecRef_ends),ref_Callouts.HexRef_ends); 1596 BitBlock ref_error3; 1597 ref_error3 = simd_andc(ref_ends,lex.Semicolon); 1598 if (bitblock::any(simd_or(simd_or(ref_error1,ref_error2),ref_error3))) 1599 { 1600 assert_0_error(simd_or(simd_or(ref_error1,ref_error2),ref_error3),"Reference error found"); 1601 } 1602 } 1603 else 1604 { 1605 carry_set_0.carryDequeueEnqueue(0,6); 1606 } 1607 } 1608 1609 void clear() 1610 { 1611 1612 } 1613 1614 CarryDeclare(carry_set_0,6,0); 1615 }; 1616 1617 struct Validate_xml_names 1618 { 1619 Validate_xml_names() 1620 { 1621 } 1622 1623 IDISA_INLINE void do_block(struct CtCDPI_Callouts & ctCDPI_Callouts,struct Ref_Callouts & ref_Callouts,struct Tag_Callouts & tag_Callouts,struct Lex & lex,struct U8 & u8,struct Check_streams & check_streams) 1624 { 1625 BitBlock PI_names; 1626 carry_set_0.getCarry(0) = bitblock::srli<127>(pablo_blk_SpanUpTo(ctCDPI_Callouts.PI_name_starts,ctCDPI_Callouts.PI_name_ends,carry_set_0.getCarry(0),PI_names)); 1627 BitBlock GenRefs; 1628 carry_set_0.getCarry(1) = bitblock::srli<127>(pablo_blk_SpanUpTo(ref_Callouts.GenRef_starts,ref_Callouts.GenRef_ends,carry_set_0.getCarry(1),GenRefs)); 1629 BitBlock ElemNames; 1630 carry_set_0.getCarry(2) = bitblock::srli<127>(pablo_blk_SpanUpTo(tag_Callouts.ElemName_starts,tag_Callouts.ElemName_ends,carry_set_0.getCarry(2),ElemNames)); 1631 BitBlock AttNames; 1632 carry_set_0.getCarry(3) = bitblock::srli<127>(pablo_blk_SpanUpTo(tag_Callouts.AttName_starts,tag_Callouts.AttName_ends,carry_set_0.getCarry(3),AttNames)); 1633 BitBlock qname_stream; 1634 qname_stream = simd_or(ElemNames,AttNames); 1635 BitBlock ncname_stream; 1636 ncname_stream = simd_or(PI_names,GenRefs); 1637 BitBlock name_stream; 1638 name_stream = simd_or(qname_stream,ncname_stream); 1639 BitBlock name_start; 1640 BitBlock _temp0; 1641 carry_set_0.getCarry(4) = bitblock::srli<127>(pablo_blk_Advance(name_stream,carry_set_0.getCarry(4),_temp0)); 1642 name_start = simd_andc(name_stream,_temp0); 1643 BitBlock name_cursor; 1644 BitBlock _temp1; 1645 carry_set_0.getCarry(5) = bitblock::srli<127>(pablo_blk_Advance(name_stream,carry_set_0.getCarry(5),_temp1)); 1646 name_cursor = simd_andc(name_stream,_temp1); 1647 BitBlock void_prefix_err; 1648 void_prefix_err = simd_and(name_cursor,lex.Colon); 1649 BitBlock namespace_sep; 1650 BitBlock _temp2; 1651 carry_set_0.getCarry(6) = bitblock::srli<127>(pablo_blk_ScanThru(name_cursor,simd_andc(lex.NameScan,lex.Colon),carry_set_0.getCarry(6),_temp2)); 1652 namespace_sep = simd_and(_temp2,lex.Colon); 1653 BitBlock local_part_start; 1654 carry_set_0.getCarry(7) = bitblock::srli<127>(pablo_blk_Advance(namespace_sep,carry_set_0.getCarry(7),local_part_start)); 1655 BitBlock local_part_err; 1656 local_part_err = simd_andc(local_part_start,lex.NameScan); 1657 BitBlock colon2_err; 1658 BitBlock _temp3; 1659 carry_set_0.getCarry(8) = bitblock::srli<127>(pablo_blk_ScanThru(local_part_start,simd_andc(lex.NameScan,lex.Colon),carry_set_0.getCarry(8),_temp3)); 1660 colon2_err = simd_and(_temp3,lex.Colon); 1661 BitBlock ncname_err; 1662 ncname_err = simd_and(ncname_stream,lex.Colon); 1663 if (bitblock::any(simd_or(simd_or(simd_or(void_prefix_err,local_part_err),colon2_err),ncname_err))) 1664 { 1665 assert_0_error(simd_or(simd_or(simd_or(void_prefix_err,local_part_err),colon2_err),ncname_err),"name syntax error"); 1666 } 1667 check_streams.non_ascii_name_starts = simd_andc(name_start,lex.ASCII_name_start); 1668 check_streams.non_ascii_names = simd_andc(simd_andc(simd_andc(name_stream,name_start),lex.ASCII_name_char),u8.suffix); 1669 carry_set_0.carryAdjust(9); 1670 } 1671 1672 void do_final_block(struct CtCDPI_Callouts & ctCDPI_Callouts,struct Ref_Callouts & ref_Callouts,struct Tag_Callouts & tag_Callouts,struct Lex & lex,struct U8 & u8,struct Check_streams & check_streams,BitBlock & EOF_mask) 1673 { 1674 BitBlock PI_names; 1675 carry_set_0.getCarry(0) = bitblock::srli<127>(pablo_blk_SpanUpTo(ctCDPI_Callouts.PI_name_starts,ctCDPI_Callouts.PI_name_ends,carry_set_0.getCarry(0),PI_names)); 1676 BitBlock GenRefs; 1677 carry_set_0.getCarry(1) = bitblock::srli<127>(pablo_blk_SpanUpTo(ref_Callouts.GenRef_starts,ref_Callouts.GenRef_ends,carry_set_0.getCarry(1),GenRefs)); 1678 BitBlock ElemNames; 1679 carry_set_0.getCarry(2) = bitblock::srli<127>(pablo_blk_SpanUpTo(tag_Callouts.ElemName_starts,tag_Callouts.ElemName_ends,carry_set_0.getCarry(2),ElemNames)); 1680 BitBlock AttNames; 1681 carry_set_0.getCarry(3) = bitblock::srli<127>(pablo_blk_SpanUpTo(tag_Callouts.AttName_starts,tag_Callouts.AttName_ends,carry_set_0.getCarry(3),AttNames)); 1682 BitBlock qname_stream; 1683 qname_stream = simd_or(ElemNames,AttNames); 1684 BitBlock ncname_stream; 1685 ncname_stream = simd_or(PI_names,GenRefs); 1686 BitBlock name_stream; 1687 name_stream = simd_or(qname_stream,ncname_stream); 1688 BitBlock name_start; 1689 BitBlock _temp0; 1690 carry_set_0.getCarry(4) = bitblock::srli<127>(pablo_blk_Advance(name_stream,carry_set_0.getCarry(4),_temp0)); 1691 name_start = simd_andc(name_stream,_temp0); 1692 BitBlock name_cursor; 1693 BitBlock _temp1; 1694 carry_set_0.getCarry(5) = bitblock::srli<127>(pablo_blk_Advance(name_stream,carry_set_0.getCarry(5),_temp1)); 1695 name_cursor = simd_andc(name_stream,_temp1); 1696 BitBlock void_prefix_err; 1697 void_prefix_err = simd_and(name_cursor,lex.Colon); 1698 BitBlock namespace_sep; 1699 BitBlock _temp2; 1700 carry_set_0.getCarry(6) = bitblock::srli<127>(pablo_blk_ScanThru(name_cursor,simd_andc(lex.NameScan,lex.Colon),carry_set_0.getCarry(6),_temp2)); 1701 namespace_sep = simd_and(_temp2,lex.Colon); 1702 BitBlock local_part_start; 1703 carry_set_0.getCarry(7) = bitblock::srli<127>(pablo_blk_Advance(namespace_sep,carry_set_0.getCarry(7),local_part_start)); 1704 BitBlock local_part_err; 1705 local_part_err = simd_andc(local_part_start,lex.NameScan); 1706 BitBlock colon2_err; 1707 BitBlock _temp3; 1708 carry_set_0.getCarry(8) = bitblock::srli<127>(pablo_blk_ScanThru(local_part_start,simd_andc(lex.NameScan,lex.Colon),carry_set_0.getCarry(8),_temp3)); 1709 colon2_err = simd_and(_temp3,lex.Colon); 1710 BitBlock ncname_err; 1711 ncname_err = simd_and(ncname_stream,lex.Colon); 1712 if (bitblock::any(simd_or(simd_or(simd_or(void_prefix_err,local_part_err),colon2_err),ncname_err))) 1713 { 1714 assert_0_error(simd_or(simd_or(simd_or(void_prefix_err,local_part_err),colon2_err),ncname_err),"name syntax error"); 1715 } 1716 check_streams.non_ascii_name_starts = simd_andc(name_start,lex.ASCII_name_start); 1717 check_streams.non_ascii_names = simd_andc(simd_andc(simd_andc(name_stream,name_start),lex.ASCII_name_char),u8.suffix); 1718 } 1719 1720 void clear() 1721 { 1722 1723 } 1724 1725 CarryDeclare(carry_set_0,9,0); 1726 }; 1727 1728 struct Do_check_streams 1729 { 1730 Do_check_streams() 1731 { 1732 } 1733 1734 IDISA_INLINE void do_block(struct Marker & marker,struct Tag_Callouts & tag_Callouts,struct Check_streams & check_streams) 1735 { 1736 if (bitblock::any(simd_andc(marker.CD_closer,tag_Callouts.AttVal_spans))) 1737 { 1738 assert_0_error(simd_andc(marker.CD_closer,tag_Callouts.AttVal_spans),"Error: ]]> in text"); 1739 } 1740 check_streams.tag_marks = simd_or(simd_or(simd_or(tag_Callouts.EmptyTag_marks,tag_Callouts.ElemName_starts),tag_Callouts.EndTag_marks),tag_Callouts.AttName_starts); 1741 check_streams.name_follows = simd_or(tag_Callouts.ElemName_ends,tag_Callouts.AttName_ends); 1742 check_streams.att_refs = simd_and(tag_Callouts.AttVal_spans,marker.Ref_opener); 1743 } 1744 1745 void do_final_block(struct Marker & marker,struct Tag_Callouts & tag_Callouts,struct Check_streams & check_streams,BitBlock & EOF_mask) 1746 { 1747 if (bitblock::any(simd_andc(marker.CD_closer,tag_Callouts.AttVal_spans))) 1748 { 1749 assert_0_error(simd_andc(marker.CD_closer,tag_Callouts.AttVal_spans),"Error: ]]> in text"); 1750 } 1751 check_streams.tag_marks = simd_or(simd_or(simd_or(tag_Callouts.EmptyTag_marks,tag_Callouts.ElemName_starts),tag_Callouts.EndTag_marks),tag_Callouts.AttName_starts); 1752 check_streams.name_follows = simd_or(tag_Callouts.ElemName_ends,tag_Callouts.AttName_ends); 1753 check_streams.att_refs = simd_and(tag_Callouts.AttVal_spans,marker.Ref_opener); 1754 } 1755 1756 void clear() 1757 { 1758 1759 } 1760 1761 CarryDeclare(carry_set_0,0,0); 1762 }; 1763 188 1764 189 1765 // }
Note: See TracChangeset
for help on using the changeset viewer.