Changeset 766 for proto/JSON/src


Ignore:
Timestamp:
Dec 2, 2010, 1:44:34 PM (8 years ago)
Author:
ksherdy
Message:

Initial working JSON compilable and executable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/JSON/src/json.c

    r755 r766  
    3939BitBlock temp41;
    4040BitBlock strct_Lex__RSquareBracket_;
    41 BitBlock strct_Lex__Ee_;
     41BitBlock temp43;
    4242BitBlock temp44;
    4343BitBlock temp45;
     
    4747BitBlock temp49;
    4848BitBlock temp42;
    49 BitBlock StringErrors_1;
    50 BitBlock strct_u8__xF4_;
    51 BitBlock StringErrors_3;
    52 BitBlock temp43;
    53 BitBlock StringErrors_5;
    54 BitBlock StringErrors_4;
    55 BitBlock strct_Lex__True_;
     49BitBlock FalseErrors_1;
     50BitBlock M4b;
     51BitBlock M4a;
     52BitBlock TrueSpans;
    5653BitBlock strct_Lex__DecimalPoint_;
    5754BitBlock strct_Lex__Null_;
    58 BitBlock temp10;
    5955BitBlock array_bit__2_;
    6056BitBlock strct_u8__suffix_;
    61 BitBlock StringSpans_6;
     57BitBlock Scope3;
     58BitBlock strct_Lex__n_;
     59BitBlock EvenEscape;
     60BitBlock StringEscapeChars;
     61BitBlock OddFinal;
     62BitBlock Temp40;
     63BitBlock Temp41;
     64BitBlock Temp42;
     65BitBlock strct_u8__unibyte_;
     66BitBlock temp81;
     67BitBlock NullSpans;
     68BitBlock strct_u8__xED_;
     69BitBlock temp28;
     70BitBlock temp29;
     71BitBlock temp22;
     72BitBlock temp23;
     73BitBlock temp20;
     74BitBlock temp21;
     75BitBlock temp26;
     76BitBlock temp27;
     77BitBlock temp24;
     78BitBlock temp25;
     79BitBlock M4;
     80BitBlock M7;
     81BitBlock M6;
     82BitBlock M1;
     83BitBlock M0;
     84BitBlock strct_Lex__a_;
     85BitBlock M2b;
     86BitBlock strct_u8__x80_x8F_;
     87BitBlock TrueErrors_5;
     88BitBlock AtomSpans;
     89BitBlock array_bit__0_;
     90BitBlock strct_Lex__Minus_;
     91BitBlock strct_u8__prefix4_;
     92BitBlock strct_Lex__LCurlyBrace_;
     93BitBlock ParityMask;
     94BitBlock temp36;
     95BitBlock AllZero = simd_const_1(0);
     96BitBlock Temp28;
     97BitBlock Temp29;
     98BitBlock EvenFinal;
     99BitBlock Temp22;
     100BitBlock Temp23;
     101BitBlock Temp20;
     102BitBlock Temp21;
     103BitBlock Temp26;
     104BitBlock Temp27;
     105BitBlock Temp24;
     106BitBlock Temp25;
     107BitBlock Escape;
     108BitBlock StringMask;
     109BitBlock strct_u8__x90_xBF_;
     110BitBlock M3b;
     111BitBlock M9b;
     112BitBlock Scope3_6;
     113BitBlock Scope3_7;
     114BitBlock strct_Lex__Comma_;
     115BitBlock array_bit__7_;
     116BitBlock strct_Lex__Colon_;
     117BitBlock OddStart;
     118BitBlock Scope2;
     119BitBlock StringNotEscapedChars;
     120BitBlock Scope1;
     121BitBlock Scope4;
     122BitBlock strct_Lex__e_;
     123BitBlock TrueErrors_4;
     124BitBlock strct_u8__xA0_xBF_;
     125BitBlock strct_u8__prefix3_;
     126BitBlock FalseSpans;
     127BitBlock strct_Lex__PlusMinus_;
     128BitBlock M9b_10;
     129BitBlock M5b_0;
     130BitBlock strct_u8__x80_x9F_;
     131BitBlock StringErrors_20;
     132BitBlock StringErrors_21;
     133BitBlock StringErrors_22;
     134BitBlock StringEnds;
     135BitBlock temp75;
     136BitBlock temp74;
     137BitBlock temp77;
     138BitBlock E9b;
     139BitBlock temp71;
     140BitBlock temp70;
     141BitBlock temp73;
     142BitBlock temp72;
     143BitBlock strct_Lex__LSquareBracket_;
     144BitBlock temp79;
     145BitBlock temp78;
     146BitBlock M7b;
     147BitBlock M7a;
     148BitBlock strct_u8__prefix_;
     149BitBlock strct_Lex__s_;
     150BitBlock strct_Lex__WS_;
     151BitBlock AllOne = simd_const_1(1);
     152BitBlock strct_Lex__t_;
     153BitBlock strct_Ctrl__LF_;
     154BitBlock StringSpans;
     155BitBlock Follows_8;
     156BitBlock Follows_9;
     157BitBlock strct_Ctrl__CR_;
     158BitBlock strct_u8__badprefix_;
     159BitBlock strct_Lex__Zero_;
     160BitBlock strct_Lex__RCurlyBrace_;
     161BitBlock strct_Lex__Ee_;
     162BitBlock strct_u8__xF4_;
     163BitBlock strct_Lex__Digit1_9_;
     164BitBlock strct_Lex__True_;
     165BitBlock temp10;
     166BitBlock EvenStart;
     167BitBlock NullErrors_12;
     168BitBlock NullErrors_11;
    62169BitBlock strct_u8__xE0_;
    63170BitBlock temp59;
     
    67174BitBlock temp55;
    68175BitBlock temp54;
    69 BitBlock strct_Lex__LSquareBracket_;
     176BitBlock temp53;
    70177BitBlock temp52;
    71178BitBlock temp51;
    72179BitBlock temp50;
    73 BitBlock Temp9;
    74 BitBlock strct_Ctrl__CR_;
     180BitBlock Temp43;
    75181BitBlock strct_Lex__f_;
     182BitBlock M5b;
    76183BitBlock UnescapedDQuotes;
    77 BitBlock StringEscapeChars;
    78 BitBlock OddFinal;
    79 BitBlock strct_u8__unibyte_;
    80 BitBlock StringErrors_0;
     184BitBlock AtomsSpans;
    81185BitBlock TrueStarts;
    82 BitBlock StringErrors_2;
     186BitBlock FalseErrors;
    83187BitBlock array_bit__3_;
    84 BitBlock strct_u8__xED_;
    85188BitBlock strct_Ctrl__HT_;
    86 BitBlock temp28;
    87 BitBlock temp29;
    88 BitBlock temp22;
    89 BitBlock strct_Ctrl__SP_;
    90 BitBlock temp20;
    91 BitBlock temp21;
    92 BitBlock temp26;
    93 BitBlock temp27;
    94 BitBlock temp24;
    95 BitBlock temp25;
     189BitBlock uScope2;
     190BitBlock strct_Ctrl__x00_x1F_;
     191BitBlock temp30;
     192BitBlock uScope1;
     193BitBlock uScope4;
    96194BitBlock temp3;
    97195BitBlock temp2;
    98196BitBlock temp1;
    99 BitBlock OddEscape;
     197BitBlock temp76;
    100198BitBlock temp7;
    101199BitBlock temp6;
     
    104202BitBlock temp9;
    105203BitBlock temp8;
    106 BitBlock strct_Lex__a_;
    107204BitBlock StringStarts;
    108 BitBlock strct_u8__x80_x8F_;
     205BitBlock TrueErrors;
    109206BitBlock StringCursor;
    110207BitBlock NullStarts;
    111 BitBlock StringMask;
    112 BitBlock strct_Lex__Digit1_9_;
     208BitBlock M10b;
    113209BitBlock strct_u8__prefix2_;
    114 BitBlock AtomSpans;
    115 BitBlock array_bit__0_;
     210BitBlock Scope1_15;
     211BitBlock E1;
    116212BitBlock temp39;
    117213BitBlock temp38;
    118 BitBlock strct_Lex__Minus_;
    119 BitBlock strct_u8__prefix4_;
    120214BitBlock temp31;
    121 BitBlock temp30;
     215BitBlock array_bit__5_;
    122216BitBlock temp33;
    123217BitBlock temp32;
    124 BitBlock strct_Lex__LCurlyBrace_;
     218BitBlock temp35;
    125219BitBlock temp34;
    126220BitBlock temp37;
    127 BitBlock temp36;
    128 BitBlock ParityMask;
    129 BitBlock AllZero = simd_const_1(0);
    130 BitBlock temp35;
    131 BitBlock EvenFinal;
    132 BitBlock AtomStarts;
     221BitBlock E5b;
     222BitBlock NumberSpans;
    133223BitBlock strct_Lex__DQuote_;
    134 BitBlock Temp20;
    135 BitBlock Temp21;
    136224BitBlock strct_Lex__RSolidus_;
    137 BitBlock Escape;
    138225BitBlock array_bit__1_;
    139226BitBlock Even;
     227BitBlock Follows;
    140228BitBlock array_bit__6_;
     229BitBlock error_mask;
    141230BitBlock strct_Lex__r_;
    142231BitBlock Start;
     232BitBlock Scope2_13;
     233BitBlock M1_23;
     234BitBlock Scope1_16;
    143235BitBlock strct_u8__xF0_;
    144 BitBlock temp14;
    145 BitBlock strct_Ctrl__x00_x1F_;
    146 BitBlock strct_u8__x90_xBF_;
    147 BitBlock uScope2;
    148 BitBlock strct_u8__badprefix_;
    149 BitBlock EvenStart;
     236BitBlock Scope2_14;
     237BitBlock M1a;
     238BitBlock Temp38;
     239BitBlock M1b;
     240BitBlock Temp31;
     241BitBlock Temp30;
     242BitBlock Temp33;
     243BitBlock Temp32;
     244BitBlock Temp35;
     245BitBlock Temp34;
     246BitBlock Temp37;
     247BitBlock Temp36;
     248BitBlock strct_Ctrl__SP_;
    150249BitBlock strct_Lex__False_;
    151 BitBlock temp23;
    152 BitBlock uScope1;
    153250BitBlock strct_Lex__Digit0_9_;
    154 BitBlock strct_Lex__Comma_;
    155 BitBlock array_bit__7_;
    156 BitBlock strct_Lex__Colon_;
    157 BitBlock uScope4;
    158 BitBlock temp53;
     251BitBlock NullErrors;
    159252BitBlock FalseStarts;
    160 BitBlock error_mask;
     253BitBlock FalseErrors_2;
     254BitBlock FalseErrors_3;
    161255BitBlock NumberStarts;
    162 BitBlock StringNotEscapedChars;
    163 BitBlock EscapeChars;
    164256BitBlock temp88;
    165257BitBlock temp89;
    166 BitBlock strct_Lex__e_;
    167258BitBlock temp84;
    168259BitBlock temp85;
     
    170261BitBlock temp87;
    171262BitBlock temp80;
    172 BitBlock temp81;
     263BitBlock AtomStarts;
    173264BitBlock temp82;
    174265BitBlock temp83;
    175 BitBlock strct_u8__xA0_xBF_;
     266BitBlock M11;
    176267BitBlock StringErrors;
    177 BitBlock strct_u8__prefix3_;
     268BitBlock OddEscape;
     269BitBlock NumberErrors;
    178270BitBlock Odd;
    179271BitBlock temp66;
     
    198290BitBlock Temp18;
    199291BitBlock strct_Lex__u_;
    200 BitBlock strct_u8__x80_x9F_;
    201292BitBlock uScope3;
    202 BitBlock strct_Lex__Zero_;
    203 BitBlock strct_Lex__WS_;
     293BitBlock M2a;
    204294BitBlock temp13;
    205295BitBlock temp12;
     
    209299BitBlock temp16;
    210300BitBlock temp15;
    211 BitBlock StringEnds;
     301BitBlock temp14;
    212302BitBlock Temp7;
    213303BitBlock temp19;
    214304BitBlock temp18;
    215 BitBlock temp75;
    216 BitBlock temp74;
    217 BitBlock temp77;
    218 BitBlock temp76;
    219 BitBlock temp71;
    220 BitBlock temp70;
    221 BitBlock temp73;
    222 BitBlock temp72;
    223305BitBlock strct_Lex__Number_;
    224 BitBlock strct_Lex__n_;
    225306BitBlock strct_Lex__l_;
    226 BitBlock temp79;
    227 BitBlock temp78;
    228 BitBlock strct_u8__prefix_;
    229 BitBlock strct_Lex__s_;
    230 BitBlock Temp5;
    231 BitBlock EvenEscape;
    232 BitBlock array_bit__5_;
    233 BitBlock AllOne = simd_const_1(1);
    234 BitBlock strct_Lex__t_;
    235 BitBlock strct_Ctrl__LF_;
    236 BitBlock StringSpans;
     307BitBlock StringErrors_17;
    237308BitBlock strct_Lex__Escape_;
     309BitBlock StringErrors_19;
     310BitBlock StringErrors_18;
    238311BitBlock Temp3;
    239312BitBlock Temp2;
     
    241314BitBlock u;
    242315BitBlock Temp6;
    243 BitBlock strct_Lex__PlusMinus_;
     316BitBlock Temp5;
    244317BitBlock Temp4;
    245318BitBlock strct_Lex__HexDigit_;
    246 BitBlock strct_Lex__RCurlyBrace_;
     319BitBlock Temp9;
    247320BitBlock Temp8;
    248 BitBlock OddStart;
     321BitBlock M8b;
     322BitBlock Temp39;
     323CarryType carry28 = Carry0;
     324CarryType carry29 = Carry0;
     325CarryType carry20 = Carry0;
     326CarryType carry21 = Carry0;
     327CarryType carry22 = Carry0;
     328CarryType carry23 = Carry0;
     329CarryType carry24 = Carry0;
     330CarryType carry25 = Carry0;
     331CarryType carry26 = Carry0;
     332CarryType carry27 = Carry0;
    249333CarryType carry1 = Carry0;
    250334CarryType carry0 = Carry0;
     
    257341CarryType carry9 = Carry0;
    258342CarryType carry8 = Carry0;
     343CarryType carry15 = Carry0;
     344CarryType carry14 = Carry0;
     345CarryType carry17 = Carry0;
     346CarryType carry16 = Carry0;
     347CarryType carry11 = Carry0;
     348CarryType carry10 = Carry0;
     349CarryType carry13 = Carry0;
     350CarryType carry12 = Carry0;
     351CarryType carry19 = Carry0;
     352CarryType carry18 = Carry0;
     353CarryType carry_brw2 = Carry0;
     354CarryType carry_brw1 = Carry0;
    259355CarryType carry_brw0 = Carry0;
    260 CarryType carry10 = Carry0;
    261 
    262        
    263         // BitBlock error_mask;  // PyBit compiler auto declares this variables
     356CarryType carry32 = Carry0;
     357CarryType carry31 = Carry0;
     358CarryType carry30 = Carry0;
     359
     360       
     361        // BitBlock error_mask;  // PyBit compiler auto declares this variable
    264362        BitBlock EOF_mask = simd_const_1(1);
    265363       
     
    271369        BitBlock high_bit_mask = sisd_high_bit_mask;   
    272370        BitBlock high_bit_is_set;
    273         // BitBlock ParityMask = simd_const_1(0); // ParityMask declaration via PyBit
     371        // BitBlock ParityMask = simd_const_1(0); // PyBit compiler auto declares this variable
    274372        BitBlock bitblock_parity_mask; 
    275373       
     
    465563Escape = simd_or(EvenEscape,OddEscape);
    466564UnescapedDQuotes = simd_andc(strct_Lex__DQuote_,Escape);
     565
     566                        /* Generate Parity Mask */
     567                        high_bit_mask = sisd_high_bit_mask;
     568                        high_bit_is_set = simd_and(high_bit_mask, bitblock_parity_mask);                       
     569                        bitblock_parity_mask = sisd_add( simd_not(sisd_srl(high_bit_is_set, sisd_from_int(BLOCK_SIZE-1))) , sisd_low_bit_mask);                                         
     570                        ParityMask = bitblock_parallel_prefix_parity(UnescapedDQuotes, bitblock_parity_mask);
     571
    467572advance_with_carry(ParityMask, carry3, Temp8);
    468573StringMask = simd_and(ParityMask,Temp8);
    469 StringSpans_6 = simd_or(StringMask,UnescapedDQuotes);
     574StringSpans = simd_or(StringMask,UnescapedDQuotes);
    470575Temp9 = simd_or(strct_Lex__True_,strct_Lex__False_);
    471576Temp10 = simd_or(Temp9,strct_Lex__Null_);
    472577Temp11 = simd_or(Temp10,strct_Lex__Number_);
    473 AtomSpans = simd_or(Temp11,StringSpans_6);
     578AtomSpans = simd_or(Temp11,StringSpans);
    474579advance_with_carry(AtomSpans, carry4, Temp12);
    475580AtomStarts = simd_andc(AtomSpans,Temp12);
     
    479584FalseStarts = simd_and(AtomStarts,temp62);
    480585NullStarts = simd_and(AtomStarts,temp64);
    481 StringEscapeChars = simd_and(EscapeChars,StringMask);
    482 StringErrors_0 = simd_andc(StringEscapeChars,strct_Lex__Escape_);
     586StringEscapeChars = simd_and(Escape,StringMask);
     587StringErrors_17 = simd_andc(StringEscapeChars,strct_Lex__Escape_);
    483588u = simd_and(StringEscapeChars,strct_Lex__u_);
    484589advance_with_carry(u, carry5, uScope1);
     
    487592advance_with_carry(uScope3, carry8, uScope4);
    488593Temp13 = simd_andc(uScope1,strct_Lex__HexDigit_);
    489 StringErrors_1 = simd_or(StringErrors_0,Temp13);
     594StringErrors_18 = simd_or(StringErrors_17,Temp13);
    490595Temp14 = simd_andc(uScope2,strct_Lex__HexDigit_);
    491 StringErrors_2 = simd_or(StringErrors_1,Temp14);
     596StringErrors_19 = simd_or(StringErrors_18,Temp14);
    492597Temp15 = simd_andc(uScope3,strct_Lex__HexDigit_);
    493 StringErrors_3 = simd_or(StringErrors_2,Temp15);
     598StringErrors_20 = simd_or(StringErrors_19,Temp15);
    494599Temp16 = simd_andc(uScope4,strct_Lex__HexDigit_);
    495 StringErrors_4 = simd_or(StringErrors_3,Temp16);
    496 Temp17 = simd_or(EscapeChars,strct_Lex__RSolidus_);
     600StringErrors_21 = simd_or(StringErrors_20,Temp16);
     601Temp17 = simd_or(Escape,strct_Lex__RSolidus_);
    497602StringNotEscapedChars = simd_andc(StringMask,Temp17);
    498603Temp18 = simd_and(StringNotEscapedChars,strct_Ctrl__x00_x1F_);
    499 StringErrors_5 = simd_or(StringErrors_4,Temp18);
     604StringErrors_22 = simd_or(StringErrors_21,Temp18);
    500605advance_with_carry(StringStarts, carry9, StringCursor);
    501606adc128(StringCursor, StringMask, carry10, Temp19);
    502607StringEnds = simd_andc(Temp19,StringMask);
    503608Temp20 = simd_andc(StringEnds,UnescapedDQuotes);
    504 StringErrors = simd_or(StringErrors_5,Temp20);
    505 sbb128(StringEnds, StringStarts, carry_brw0, Temp21);
    506 StringSpans = simd_or(Temp21,StringEnds);
    507 error_mask = StringErrors;
    508 
    509 
    510                         /* Generate Parity Mask */
    511                         high_bit_mask = sisd_high_bit_mask;
    512                         high_bit_is_set = simd_and(high_bit_mask, bitblock_parity_mask);                       
    513                         bitblock_parity_mask = sisd_add( simd_not(sisd_srl(high_bit_is_set, sisd_from_int(BLOCK_SIZE-1))) , sisd_low_bit_mask);                                         
    514                         ParityMask = bitblock_parallel_prefix_parity(UnescapedDQuotes, bitblock_parity_mask);
     609StringErrors = simd_or(StringErrors_22,Temp20);
     610M0 = NumberStarts;
     611Temp21 = simd_and(strct_Lex__Minus_,NumberStarts);
     612adc128(NumberStarts, Temp21, carry11, Temp22);
     613M1_23 = simd_andc(Temp22,Temp21);
     614Temp23 = simd_or(strct_Lex__Zero_,strct_Lex__Digit1_9_);
     615E1 = simd_andc(M1_23,Temp23);
     616M1 = simd_andc(M1_23,E1);
     617M1a = simd_and(M1,strct_Lex__Zero_);
     618M1b = simd_and(M1,strct_Lex__Digit1_9_);
     619advance_with_carry(M1a, carry12, M2a);
     620advance_with_carry(M1b, carry13, M2b);
     621adc128(M2b, strct_Lex__Digit0_9_, carry14, Temp24);
     622M3b = simd_andc(Temp24,strct_Lex__Digit0_9_);
     623M4 = simd_or(M2a,M3b);
     624M4a = simd_andc(M4,strct_Lex__DecimalPoint_);
     625M4b = simd_and(M4,strct_Lex__DecimalPoint_);
     626advance_with_carry(M4b, carry15, M5b_0);
     627E5b = simd_andc(M5b_0,strct_Lex__Digit0_9_);
     628M5b = simd_andc(M5b_0,E5b);
     629adc128(M5b, strct_Lex__Digit0_9_, carry16, Temp25);
     630M6 = simd_andc(Temp25,strct_Lex__Digit0_9_);
     631M7 = simd_or(M4a,M6);
     632M7a = simd_andc(M7,strct_Lex__Ee_);
     633M7b = simd_and(M7,strct_Lex__Ee_);
     634advance_with_carry(M7b, carry17, M8b);
     635Temp26 = simd_and(strct_Lex__PlusMinus_,M8b);
     636adc128(M8b, Temp26, carry18, Temp27);
     637M9b_10 = simd_andc(Temp27,Temp26);
     638E9b = simd_andc(M9b_10,strct_Lex__Digit0_9_);
     639M9b = simd_andc(M9b_10,E9b);
     640adc128(M9b, strct_Lex__Digit0_9_, carry19, Temp28);
     641M10b = simd_andc(Temp28,strct_Lex__Digit0_9_);
     642M11 = simd_or(M7a,M10b);
     643Temp29 = simd_or(E1,E5b);
     644NumberErrors = simd_or(Temp29,E9b);
     645advance_with_carry(TrueStarts, carry20, Scope1_15);
     646advance_with_carry(Scope1_15, carry21, Scope2_13);
     647advance_with_carry(Scope2_13, carry22, Scope3_6);
     648TrueErrors_4 = simd_andc(Scope1_15,temp66);
     649Temp30 = simd_andc(Scope2_13,strct_Lex__u_);
     650TrueErrors_5 = simd_or(TrueErrors_4,Temp30);
     651Temp31 = simd_andc(Scope3_6,temp50);
     652TrueErrors = simd_or(TrueErrors_5,Temp31);
     653advance_with_carry(Scope3_6, carry23, Follows_8);
     654sbb128(Follows_8, TrueStarts, carry_brw0, TrueSpans);
     655advance_with_carry(FalseStarts, carry24, Scope1_16);
     656advance_with_carry(Scope1_16, carry25, Scope2_14);
     657advance_with_carry(Scope2_14, carry26, Scope3_7);
     658advance_with_carry(Scope3_7, carry27, Scope4);
     659FalseErrors_1 = simd_andc(Scope1_16,strct_Lex__a_);
     660Temp32 = simd_andc(Scope2_14,strct_Lex__l_);
     661FalseErrors_2 = simd_or(FalseErrors_1,Temp32);
     662Temp33 = simd_andc(Scope3_7,strct_Lex__s_);
     663FalseErrors_3 = simd_or(FalseErrors_2,Temp33);
     664Temp34 = simd_andc(Scope4,temp50);
     665FalseErrors = simd_or(FalseErrors_3,Temp34);
     666advance_with_carry(Scope4, carry28, Follows_9);
     667sbb128(Follows_9, FalseStarts, carry_brw1, FalseSpans);
     668advance_with_carry(NullStarts, carry29, Scope1);
     669advance_with_carry(Scope1, carry30, Scope2);
     670advance_with_carry(Scope2, carry31, Scope3);
     671Temp35 = simd_andc(Scope1,strct_Lex__u_);
     672NullErrors_11 = simd_or(NullErrors,Temp35);
     673Temp36 = simd_andc(Scope2,strct_Lex__l_);
     674NullErrors_12 = simd_or(NullErrors_11,Temp36);
     675Temp37 = simd_andc(Scope3,strct_Lex__l_);
     676NullErrors = simd_or(NullErrors_12,Temp37);
     677advance_with_carry(Scope3, carry32, Follows);
     678sbb128(Follows, NullStarts, carry_brw2, NullSpans);
     679Temp38 = simd_or(StringSpans,NumberSpans);
     680Temp39 = simd_or(Temp38,TrueSpans);
     681Temp40 = simd_or(Temp39,FalseSpans);
     682AtomsSpans = simd_or(Temp40,NullSpans);
     683Temp41 = simd_or(StringErrors,NumberErrors);
     684Temp42 = simd_or(Temp41,TrueErrors);
     685Temp43 = simd_or(Temp42,FalseErrors);
     686error_mask = simd_or(Temp43,NullErrors);
     687
    515688                       
    516689                        #ifdef DEBUG
     
    533706                        print_simd_register("FalseStarts", FalseStarts);
    534707                        print_simd_register("NullStarts", NullStarts);
     708                        print_simd_register("AtomSpans", AtomSpans);
    535709                                               
    536710                        #endif
    537711                       
    538712                        if (bitblock_has_bit(error_mask)){
    539                                 err_pos = src_pos + buf_pos + count_forward_zeroes(error_mask);
    540                                 fprintf(stderr, "Error at position %i\n.", err_pos);
     713                                err_pos = src_pos + buf_pos + count_forward_zeroes(error_mask) + 1;
     714                                fprintf(stderr, "Error at position %i.\n", err_pos);
    541715                                exit(-1);
    542716                        }
     
    730904advance_with_carry(ParityMask, carry3, Temp8);
    731905StringMask = simd_and(ParityMask,Temp8);
    732 StringSpans_6 = simd_or(StringMask,UnescapedDQuotes);
     906StringSpans = simd_or(StringMask,UnescapedDQuotes);
    733907Temp9 = simd_or(strct_Lex__True_,strct_Lex__False_);
    734908Temp10 = simd_or(Temp9,strct_Lex__Null_);
    735909Temp11 = simd_or(Temp10,strct_Lex__Number_);
    736 AtomSpans = simd_or(Temp11,StringSpans_6);
     910AtomSpans = simd_or(Temp11,StringSpans);
    737911advance_with_carry(AtomSpans, carry4, Temp12);
    738912AtomStarts = simd_andc(AtomSpans,Temp12);
     
    742916FalseStarts = simd_and(AtomStarts,temp62);
    743917NullStarts = simd_and(AtomStarts,temp64);
    744 
    745918StringEscapeChars = simd_and(Escape,StringMask);
    746 StringErrors_0 = simd_andc(StringEscapeChars,strct_Lex__Escape_);
     919StringErrors_17 = simd_andc(StringEscapeChars,strct_Lex__Escape_);
    747920u = simd_and(StringEscapeChars,strct_Lex__u_);
    748921advance_with_carry(u, carry5, uScope1);
     
    751924advance_with_carry(uScope3, carry8, uScope4);
    752925Temp13 = simd_andc(uScope1,strct_Lex__HexDigit_);
    753 StringErrors_1 = simd_or(StringErrors_0,Temp13);
     926StringErrors_18 = simd_or(StringErrors_17,Temp13);
    754927Temp14 = simd_andc(uScope2,strct_Lex__HexDigit_);
    755 StringErrors_2 = simd_or(StringErrors_1,Temp14);
     928StringErrors_19 = simd_or(StringErrors_18,Temp14);
    756929Temp15 = simd_andc(uScope3,strct_Lex__HexDigit_);
    757 StringErrors_3 = simd_or(StringErrors_2,Temp15);
     930StringErrors_20 = simd_or(StringErrors_19,Temp15);
    758931Temp16 = simd_andc(uScope4,strct_Lex__HexDigit_);
    759 StringErrors_4 = simd_or(StringErrors_3,Temp16);
     932StringErrors_21 = simd_or(StringErrors_20,Temp16);
    760933Temp17 = simd_or(Escape,strct_Lex__RSolidus_);
    761934StringNotEscapedChars = simd_andc(StringMask,Temp17);
    762935Temp18 = simd_and(StringNotEscapedChars,strct_Ctrl__x00_x1F_);
    763 StringErrors_5 = simd_or(StringErrors_4,Temp18);
     936StringErrors_22 = simd_or(StringErrors_21,Temp18);
    764937advance_with_carry(StringStarts, carry9, StringCursor);
    765938adc128(StringCursor, StringMask, carry10, Temp19);
    766939StringEnds = simd_andc(Temp19,StringMask);
    767940Temp20 = simd_andc(StringEnds,UnescapedDQuotes);
    768 StringErrors = simd_or(StringErrors_5,Temp20);
    769 sbb128(StringEnds, StringStarts, carry_brw0, Temp21);
    770 StringSpans = simd_or(Temp21,StringEnds);
    771 error_mask = StringErrors;
     941StringErrors = simd_or(StringErrors_22,Temp20);
     942M0 = NumberStarts;
     943Temp21 = simd_and(strct_Lex__Minus_,NumberStarts);
     944adc128(NumberStarts, Temp21, carry11, Temp22);
     945M1_23 = simd_andc(Temp22,Temp21);
     946Temp23 = simd_or(strct_Lex__Zero_,strct_Lex__Digit1_9_);
     947E1 = simd_andc(M1_23,Temp23);
     948M1 = simd_andc(M1_23,E1);
     949M1a = simd_and(M1,strct_Lex__Zero_);
     950M1b = simd_and(M1,strct_Lex__Digit1_9_);
     951advance_with_carry(M1a, carry12, M2a);
     952advance_with_carry(M1b, carry13, M2b);
     953adc128(M2b, strct_Lex__Digit0_9_, carry14, Temp24);
     954M3b = simd_andc(Temp24,strct_Lex__Digit0_9_);
     955M4 = simd_or(M2a,M3b);
     956M4a = simd_andc(M4,strct_Lex__DecimalPoint_);
     957M4b = simd_and(M4,strct_Lex__DecimalPoint_);
     958advance_with_carry(M4b, carry15, M5b_0);
     959E5b = simd_andc(M5b_0,strct_Lex__Digit0_9_);
     960M5b = simd_andc(M5b_0,E5b);
     961adc128(M5b, strct_Lex__Digit0_9_, carry16, Temp25);
     962M6 = simd_andc(Temp25,strct_Lex__Digit0_9_);
     963M7 = simd_or(M4a,M6);
     964M7a = simd_andc(M7,strct_Lex__Ee_);
     965M7b = simd_and(M7,strct_Lex__Ee_);
     966advance_with_carry(M7b, carry17, M8b);
     967Temp26 = simd_and(strct_Lex__PlusMinus_,M8b);
     968adc128(M8b, Temp26, carry18, Temp27);
     969M9b_10 = simd_andc(Temp27,Temp26);
     970E9b = simd_andc(M9b_10,strct_Lex__Digit0_9_);
     971M9b = simd_andc(M9b_10,E9b);
     972adc128(M9b, strct_Lex__Digit0_9_, carry19, Temp28);
     973M10b = simd_andc(Temp28,strct_Lex__Digit0_9_);
     974M11 = simd_or(M7a,M10b);
     975Temp29 = simd_or(E1,E5b);
     976NumberErrors = simd_or(Temp29,E9b);
     977advance_with_carry(TrueStarts, carry20, Scope1_15);
     978advance_with_carry(Scope1_15, carry21, Scope2_13);
     979advance_with_carry(Scope2_13, carry22, Scope3_6);
     980TrueErrors_4 = simd_andc(Scope1_15,temp66);
     981Temp30 = simd_andc(Scope2_13,strct_Lex__u_);
     982TrueErrors_5 = simd_or(TrueErrors_4,Temp30);
     983Temp31 = simd_andc(Scope3_6,temp50);
     984TrueErrors = simd_or(TrueErrors_5,Temp31);
     985advance_with_carry(Scope3_6, carry23, Follows_8);
     986sbb128(Follows_8, TrueStarts, carry_brw0, TrueSpans);
     987advance_with_carry(FalseStarts, carry24, Scope1_16);
     988advance_with_carry(Scope1_16, carry25, Scope2_14);
     989advance_with_carry(Scope2_14, carry26, Scope3_7);
     990advance_with_carry(Scope3_7, carry27, Scope4);
     991FalseErrors_1 = simd_andc(Scope1_16,strct_Lex__a_);
     992Temp32 = simd_andc(Scope2_14,strct_Lex__l_);
     993FalseErrors_2 = simd_or(FalseErrors_1,Temp32);
     994Temp33 = simd_andc(Scope3_7,strct_Lex__s_);
     995FalseErrors_3 = simd_or(FalseErrors_2,Temp33);
     996Temp34 = simd_andc(Scope4,temp50);
     997FalseErrors = simd_or(FalseErrors_3,Temp34);
     998advance_with_carry(Scope4, carry28, Follows_9);
     999sbb128(Follows_9, FalseStarts, carry_brw1, FalseSpans);
     1000advance_with_carry(NullStarts, carry29, Scope1);
     1001advance_with_carry(Scope1, carry30, Scope2);
     1002advance_with_carry(Scope2, carry31, Scope3);
     1003Temp35 = simd_andc(Scope1,strct_Lex__u_);
     1004NullErrors_11 = simd_or(NullErrors,Temp35);
     1005Temp36 = simd_andc(Scope2,strct_Lex__l_);
     1006NullErrors_12 = simd_or(NullErrors_11,Temp36);
     1007Temp37 = simd_andc(Scope3,strct_Lex__l_);
     1008NullErrors = simd_or(NullErrors_12,Temp37);
     1009advance_with_carry(Scope3, carry32, Follows);
     1010sbb128(Follows, NullStarts, carry_brw2, NullSpans);
     1011Temp38 = simd_or(StringSpans,NumberSpans);
     1012Temp39 = simd_or(Temp38,TrueSpans);
     1013Temp40 = simd_or(Temp39,FalseSpans);
     1014AtomsSpans = simd_or(Temp40,NullSpans);
     1015Temp41 = simd_or(StringErrors,NumberErrors);
     1016Temp42 = simd_or(Temp41,TrueErrors);
     1017Temp43 = simd_or(Temp42,FalseErrors);
     1018error_mask = simd_or(Temp43,NullErrors);
    7721019
    7731020                        #ifdef DEBUG
     
    7901037                        print_simd_register("FalseStarts", FalseStarts);
    7911038                        print_simd_register("NullStarts", NullStarts);
    792                        
    793                         print_simd_register("u", u);
    794                         print_simd_register("StringErrors", StringErrors);
    795                        
     1039                        print_simd_register("AtomSpans", AtomSpans);
     1040                                               
    7961041                        #endif
    7971042                       
    7981043                        if(bitblock_has_bit(error_mask)) {
    799                                 err_pos = src_pos + buf_pos + count_forward_zeroes(error_mask);
    800                                 fprintf(stderr, "Error at position %i\n.", err_pos);
     1044                                err_pos = src_pos + buf_pos + count_forward_zeroes(error_mask) + 1;
     1045                                fprintf(stderr, "Error at position %i.\n", err_pos);
    8011046                                exit(-1);
    8021047                        }
Note: See TracChangeset for help on using the changeset viewer.