Changeset 3160 for proto/pabloj/branches


Ignore:
Timestamp:
May 21, 2013, 3:14:55 PM (6 years ago)
Author:
ksherdy
Message:

Updated test files to sync with grammar changes.

Location:
proto/pabloj/branches/refactor-experimental/input/test/pabloS
Files:
2 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/proto/parabix2_pablo.pablos

    r2984 r3160  
    22
    33struct Basis_bits{
    4     stream<1> bit_0;
    5     stream<1> bit_1;
    6     stream<1> bit_2;
    7     stream<1> bit_3;
    8     stream<1> bit_4;
    9     stream<1> bit_5;
    10     stream<1> bit_6;
    11     stream<1> bit_7;
     4    stream bit_0;
     5    stream bit_1;
     6    stream bit_2;
     7    stream bit_3;
     8    stream bit_4;
     9    stream bit_5;
     10    stream bit_6;
     11    stream bit_7;
    1212};
    1313
    1414struct U8{
    15     stream<1> unibyte;
    16     stream<1> prefix;
    17     stream<1> prefix2;
    18     stream<1> prefix3;
    19     stream<1> prefix4;
    20     stream<1> suffix;
    21     stream<1> badprefix;
    22     stream<1> xE0;
    23     stream<1> xED;
    24     stream<1> xF0;
    25     stream<1> xF4;
    26     stream<1> xA0_xBF;
    27     stream<1> x80_x9F;
    28     stream<1> x90_xBF;
    29     stream<1> x80_x8F;
    30     stream<1> xEF;
    31     stream<1> xBF;
    32     stream<1> xBE;
    33     stream<1> scope22;
    34     stream<1> scope32;
    35     stream<1> scope33;
    36     stream<1> scope42;
    37     stream<1> scope43;
    38     stream<1> scope44;
    39     stream<1> xE0_scope;
    40     stream<1> xED_scope;
    41     stream<1> xF0_scope;
    42     stream<1> xF4_scope;
    43     stream<1> xEF_scope;
     15    stream unibyte;
     16    stream prefix;
     17    stream prefix2;
     18    stream prefix3;
     19    stream prefix4;
     20    stream suffix;
     21    stream badprefix;
     22    stream xE0;
     23    stream xED;
     24    stream xF0;
     25    stream xF4;
     26    stream xA0_xBF;
     27    stream x80_x9F;
     28    stream x90_xBF;
     29    stream x80_x8F;
     30    stream xEF;
     31    stream xBF;
     32    stream xBE;
     33    stream scope22;
     34    stream scope32;
     35    stream scope33;
     36    stream scope42;
     37    stream scope43;
     38    stream scope44;
     39    stream xE0_scope;
     40    stream xED_scope;
     41    stream xF0_scope;
     42    stream xF4_scope;
     43    stream xEF_scope;
    4444};
    4545
    4646struct Lex{
    47     stream<1> CR;
    48     stream<1> LF;
    49     stream<1> HT;
    50     stream<1> SP;
    51     stream<1> CRLF;
    52     stream<1> RefStart;
    53     stream<1> Semicolon;
    54     stream<1> Colon;
    55     stream<1> LAngle;
    56     stream<1> RAngle;
    57     stream<1> LBracket;
    58     stream<1> RBracket;
    59     stream<1> Exclam;
    60     stream<1> QMark;
    61     stream<1> Hyphen;
    62     stream<1> Equals;
    63     stream<1> SQuote;
    64     stream<1> DQuote;
    65     stream<1> Slash;
    66     stream<1> Hash;
    67     stream<1> x;
    68     stream<1> ASCII_name_start;
    69     stream<1> ASCII_name_char;
    70     stream<1> NameScan;
    71     stream<1> Digit;
    72     stream<1> Hex;
    73     stream<1> WS;
     47    stream CR;
     48    stream LF;
     49    stream HT;
     50    stream SP;
     51    stream CRLF;
     52    stream RefStart;
     53    stream Semicolon;
     54    stream Colon;
     55    stream LAngle;
     56    stream RAngle;
     57    stream LBracket;
     58    stream RBracket;
     59    stream Exclam;
     60    stream QMark;
     61    stream Hyphen;
     62    stream Equals;
     63    stream SQuote;
     64    stream DQuote;
     65    stream Slash;
     66    stream Hash;
     67    stream x;
     68    stream ASCII_name_start;
     69    stream ASCII_name_char;
     70    stream NameScan;
     71    stream Digit;
     72    stream Hex;
     73    stream WS;
    7474};
    7575
    7676struct Marker{
    77     stream<1> LAngle_scope;
    78     stream<1> Ref_opener;
    79     stream<1> CD_closer;
     77    stream LAngle_scope;
     78    stream Ref_opener;
     79    stream CD_closer;
    8080};
    8181
    8282struct CtCDPI_Callouts{
    83     stream<1> Ct_starts;
    84     stream<1> Ct_ends;
    85     stream<1> CD_starts;
    86     stream<1> CD_ends;
    87     stream<1> PI_starts;
    88     stream<1> PI_name_starts;
    89     stream<1> PI_name_ends;
    90     stream<1> PI_ends;
     83    stream Ct_starts;
     84    stream Ct_ends;
     85    stream CD_starts;
     86    stream CD_ends;
     87    stream PI_starts;
     88    stream PI_name_starts;
     89    stream PI_name_ends;
     90    stream PI_ends;
    9191};
    9292
    9393struct Ref_Callouts{
    94     stream<1> GenRef_starts;
    95     stream<1> GenRef_ends;
    96     stream<1> DecRef_starts;
    97     stream<1> DecRef_ends;
    98     stream<1> HexRef_starts;
    99     stream<1> HexRef_ends;
     94    stream GenRef_starts;
     95    stream GenRef_ends;
     96    stream DecRef_starts;
     97    stream DecRef_ends;
     98    stream HexRef_starts;
     99    stream HexRef_ends;
    100100};
    101101
    102102struct Tag_Callouts{
    103     stream<1> ElemName_starts;
    104     stream<1> ElemName_ends;
    105     stream<1> AttName_starts;
    106     stream<1> AttName_ends;
    107     stream<1> AttVal_starts;
    108     stream<1> AttVal_ends;
    109     stream<1> AttVal_spans;
    110     stream<1> EmptyTag_marks;
    111     stream<1> EndTag_marks;
     103    stream ElemName_starts;
     104    stream ElemName_ends;
     105    stream AttName_starts;
     106    stream AttName_ends;
     107    stream AttVal_starts;
     108    stream AttVal_ends;
     109    stream AttVal_spans;
     110    stream EmptyTag_marks;
     111    stream EndTag_marks;
    112112};
    113113
    114114struct Check_streams{
    115     stream<1> misc_mask;
    116     stream<1> non_ascii_name_starts;
    117     stream<1> non_ascii_names;
    118     stream<1> tag_marks;
    119     stream<1> name_follows;
    120     stream<1> att_refs;
     115    stream misc_mask;
     116    stream non_ascii_name_starts;
     117    stream non_ascii_names;
     118    stream tag_marks;
     119    stream name_follows;
     120    stream att_refs;
    121121};
    122122
    123123function void Classify_bytes_Validate_utf8(struct Basis_bits basis_bits, struct Lex lex, struct U8 u8) {
    124     var stream<1> temp1 = (basis_bits.bit_0 | basis_bits.bit_1);
    125     var stream<1> temp2 = (basis_bits.bit_2 & (~ basis_bits.bit_3));
    126     var stream<1> temp3 = (temp2 & (~ temp1));
    127     var stream<1> temp4 = (basis_bits.bit_5 & (~ basis_bits.bit_4));
    128     var stream<1> temp5 = (basis_bits.bit_6 & (~ basis_bits.bit_7));
    129     var stream<1> temp6 = (temp4 & temp5);
     124    stream temp1 = (basis_bits.bit_0 | basis_bits.bit_1);
     125    stream temp2 = (basis_bits.bit_2 & (~ basis_bits.bit_3));
     126    stream temp3 = (temp2 & (~ temp1));
     127    stream temp4 = (basis_bits.bit_5 & (~ basis_bits.bit_4));
     128    stream temp5 = (basis_bits.bit_6 & (~ basis_bits.bit_7));
     129    stream temp6 = (temp4 & temp5);
    130130    lex.RefStart = (temp3 & temp6);
    131     var stream<1> temp7 = (basis_bits.bit_2 & basis_bits.bit_3);
    132     var stream<1> temp8 = (temp7 & (~ temp1));
    133     var stream<1> temp9 = (basis_bits.bit_4 & (~ basis_bits.bit_5));
    134     var stream<1> temp10 = (basis_bits.bit_6 & basis_bits.bit_7);
    135     var stream<1> temp11 = (temp9 & temp10);
     131    stream temp7 = (basis_bits.bit_2 & basis_bits.bit_3);
     132    stream temp8 = (temp7 & (~ temp1));
     133    stream temp9 = (basis_bits.bit_4 & (~ basis_bits.bit_5));
     134    stream temp10 = (basis_bits.bit_6 & basis_bits.bit_7);
     135    stream temp11 = (temp9 & temp10);
    136136    lex.Semicolon = (temp8 & temp11);
    137     var stream<1> temp12 = (basis_bits.bit_4 & basis_bits.bit_5);
    138     var stream<1> temp13 = (basis_bits.bit_6 | basis_bits.bit_7);
    139     var stream<1> temp14 = (temp12 & (~ temp13));
     137    stream temp12 = (basis_bits.bit_4 & basis_bits.bit_5);
     138    stream temp13 = (basis_bits.bit_6 | basis_bits.bit_7);
     139    stream temp14 = (temp12 & (~ temp13));
    140140    lex.LAngle = (temp8 & temp14);
    141     var stream<1> temp15 = (temp12 & temp5);
     141    stream temp15 = (temp12 & temp5);
    142142    lex.RAngle = (temp8 & temp15);
    143     var stream<1> temp16 = (basis_bits.bit_1 & (~ basis_bits.bit_0));
    144     var stream<1> temp17 = (basis_bits.bit_3 & (~ basis_bits.bit_2));
    145     var stream<1> temp18 = (temp16 & temp17);
     143    stream temp16 = (basis_bits.bit_1 & (~ basis_bits.bit_0));
     144    stream temp17 = (basis_bits.bit_3 & (~ basis_bits.bit_2));
     145    stream temp18 = (temp16 & temp17);
    146146    lex.LBracket = (temp18 & temp11);
    147     var stream<1> temp19 = (basis_bits.bit_7 & (~ basis_bits.bit_6));
    148     var stream<1> temp20 = (temp12 & temp19);
     147    stream temp19 = (basis_bits.bit_7 & (~ basis_bits.bit_6));
     148    stream temp20 = (temp12 & temp19);
    149149    lex.RBracket = (temp18 & temp20);
    150     var stream<1> temp21 = (basis_bits.bit_4 | basis_bits.bit_5);
    151     var stream<1> temp22 = (temp19 & (~ temp21));
     150    stream temp21 = (basis_bits.bit_4 | basis_bits.bit_5);
     151    stream temp22 = (temp19 & (~ temp21));
    152152    lex.Exclam = (temp3 & temp22);
    153     var stream<1> temp23 = (temp12 & temp10);
     153    stream temp23 = (temp12 & temp10);
    154154    lex.QMark = (temp8 & temp23);
    155155    lex.Hyphen = (temp3 & temp20);
    156156    lex.Equals = (temp8 & temp20);
    157     var stream<1> temp24 = (temp4 & temp10);
     157    stream temp24 = (temp4 & temp10);
    158158    lex.SQuote = (temp3 & temp24);
    159     var stream<1> temp25 = (temp5 & (~ temp21));
     159    stream temp25 = (temp5 & (~ temp21));
    160160    lex.DQuote = (temp3 & temp25);
    161161    lex.Slash = (temp3 & temp23);
    162     var stream<1> temp26 = (temp10 & (~ temp21));
     162    stream temp26 = (temp10 & (~ temp21));
    163163    lex.Hash = (temp3 & temp26);
    164     var stream<1> temp27 = (temp16 & temp7);
    165     var stream<1> temp28 = (temp9 & (~ temp13));
     164    stream temp27 = (temp16 & temp7);
     165    stream temp28 = (temp9 & (~ temp13));
    166166    lex.x = (temp27 & temp28);
    167     var stream<1> temp29 = (temp9 & temp5);
     167    stream temp29 = (temp9 & temp5);
    168168    lex.Colon = (temp8 & temp29);
    169     var stream<1> temp30 = (temp18 & temp23);
    170     var stream<1> temp31 = (temp30 | lex.Colon);
    171     var stream<1> temp32 = (temp16 & (~ basis_bits.bit_2));
    172     var stream<1> temp33 = (basis_bits.bit_5 | temp10);
    173     var stream<1> temp34 = (basis_bits.bit_4 & temp33);
    174     var stream<1> temp35 = (~ temp34);
    175     var stream<1> temp36 = (temp21 | temp13);
    176     var stream<1> temp37 = ((basis_bits.bit_3 & temp35) | ((~ basis_bits.bit_3) & temp36));
    177     var stream<1> temp38 = (temp32 & temp37);
    178     var stream<1> temp39 = (temp31 | temp38);
    179     var stream<1> temp40 = (temp16 & basis_bits.bit_2);
    180     var stream<1> temp41 = (temp40 & temp37);
     169    stream temp30 = (temp18 & temp23);
     170    stream temp31 = (temp30 | lex.Colon);
     171    stream temp32 = (temp16 & (~ basis_bits.bit_2));
     172    stream temp33 = (basis_bits.bit_5 | temp10);
     173    stream temp34 = (basis_bits.bit_4 & temp33);
     174    stream temp35 = (~ temp34);
     175    stream temp36 = (temp21 | temp13);
     176    stream temp37 = ((basis_bits.bit_3 & temp35) | ((~ basis_bits.bit_3) & temp36));
     177    stream temp38 = (temp32 & temp37);
     178    stream temp39 = (temp31 | temp38);
     179    stream temp40 = (temp16 & basis_bits.bit_2);
     180    stream temp41 = (temp40 & temp37);
    181181    lex.ASCII_name_start = (temp39 | temp41);
    182     var stream<1> temp42 = (temp30 | lex.Hyphen);
    183     var stream<1> temp43 = (temp3 & temp15);
    184     var stream<1> temp44 = (temp42 | temp43);
    185     var stream<1> temp45 = (temp8 & (~ temp34));
    186     var stream<1> temp46 = (temp44 | temp45);
    187     var stream<1> temp47 = (temp46 | temp38);
     182    stream temp42 = (temp30 | lex.Hyphen);
     183    stream temp43 = (temp3 & temp15);
     184    stream temp44 = (temp42 | temp43);
     185    stream temp45 = (temp8 & (~ temp34));
     186    stream temp46 = (temp44 | temp45);
     187    stream temp47 = (temp46 | temp38);
    188188    lex.ASCII_name_char = (temp47 | temp41);
    189189    lex.NameScan = (lex.ASCII_name_char | basis_bits.bit_0);
    190     var stream<1> temp48 = (temp1 | basis_bits.bit_2);
    191     var stream<1> x00_x1F = (~ temp48);
    192     var stream<1> temp49 = (basis_bits.bit_2 | basis_bits.bit_3);
    193     var stream<1> temp50 = (temp1 | temp49);
     190    stream temp48 = (temp1 | basis_bits.bit_2);
     191    stream x00_x1F = (~ temp48);
     192    stream temp49 = (basis_bits.bit_2 | basis_bits.bit_3);
     193    stream temp50 = (temp1 | temp49);
    194194    lex.CR = (temp20 & (~ temp50));
    195195    lex.LF = (temp29 & (~ temp50));
    196     var stream<1> temp51 = (temp9 & temp19);
     196    stream temp51 = (temp9 & temp19);
    197197    lex.HT = (temp51 & (~ temp50));
    198198    lex.SP = (temp3 & (~ temp36));
    199     var stream<1> temp52 = (temp20 | temp29);
    200     var stream<1> temp53 = (temp52 | temp51);
    201     var stream<1> temp54 = (temp53 & (~ temp50));
     199    stream temp52 = (temp20 | temp29);
     200    stream temp53 = (temp52 | temp51);
     201    stream temp54 = (temp53 & (~ temp50));
    202202    lex.WS = (temp54 | lex.SP);
    203     var stream<1> temp55 = (basis_bits.bit_5 | basis_bits.bit_6);
    204     var stream<1> temp56 = (basis_bits.bit_4 & temp55);
     203    stream temp55 = (basis_bits.bit_5 | basis_bits.bit_6);
     204    stream temp56 = (basis_bits.bit_4 & temp55);
    205205    lex.Digit = (temp8 & (~ temp56));
    206     var stream<1> temp57 = (temp16 & (~ temp49));
    207     var stream<1> temp58 = (temp57 & (~ basis_bits.bit_4));
    208     var stream<1> temp59 = (~ temp10);
    209     var stream<1> temp60 = ((basis_bits.bit_5 & temp59) | ((~ basis_bits.bit_5) & temp13));
    210     var stream<1> temp61 = (temp58 & temp60);
    211     var stream<1> temp62 = (lex.Digit | temp61);
    212     var stream<1> temp63 = (temp16 & temp2);
    213     var stream<1> temp64 = (temp63 & (~ basis_bits.bit_4));
    214     var stream<1> temp65 = (temp64 & temp60);
     206    stream temp57 = (temp16 & (~ temp49));
     207    stream temp58 = (temp57 & (~ basis_bits.bit_4));
     208    stream temp59 = (~ temp10);
     209    stream temp60 = ((basis_bits.bit_5 & temp59) | ((~ basis_bits.bit_5) & temp13));
     210    stream temp61 = (temp58 & temp60);
     211    stream temp62 = (lex.Digit | temp61);
     212    stream temp63 = (temp16 & temp2);
     213    stream temp64 = (temp63 & (~ basis_bits.bit_4));
     214    stream temp65 = (temp64 & temp60);
    215215    lex.Hex = (temp62 | temp65);
    216     var stream<1> lex_error = (x00_x1F & (~ lex.WS));
     216    stream lex_error = (x00_x1F & (~ lex.WS));
    217217    pablo.assert_0(pablo.inFile(lex_error), "Error: illegal character");
    218218    u8.unibyte = (~ basis_bits.bit_0);
    219219    u8.suffix = pablo.Mask(1,0);
    220     var stream<1> u8_error = pablo.Mask(1,0);
    221     var stream<1> u8_FFFE_FFFF = pablo.Mask(1,0);
    222     var stream<1> u8anyscope = pablo.Mask(1,0);
     220    stream u8_error = pablo.Mask(1,0);
     221    stream u8_FFFE_FFFF = pablo.Mask(1,0);
     222    stream u8anyscope = pablo.Mask(1,0);
    223223    if (basis_bits.bit_0) {
    224224        u8.prefix = (basis_bits.bit_0 & basis_bits.bit_1);
     
    227227        u8.prefix4 = (u8.prefix & temp7);
    228228        u8.suffix = (basis_bits.bit_0 & (~ basis_bits.bit_1));
    229         var stream<1> temp66 = (u8.prefix & (~ temp49));
    230         var stream<1> temp67 = (temp21 | basis_bits.bit_6);
    231         var stream<1> temp68 = (temp66 & (~ temp67));
    232         var stream<1> temp69 = (basis_bits.bit_5 & temp13);
    233         var stream<1> temp70 = (basis_bits.bit_4 | temp69);
    234         var stream<1> temp71 = (u8.prefix4 & temp70);
     229        stream temp66 = (u8.prefix & (~ temp49));
     230        stream temp67 = (temp21 | basis_bits.bit_6);
     231        stream temp68 = (temp66 & (~ temp67));
     232        stream temp69 = (basis_bits.bit_5 & temp13);
     233        stream temp70 = (basis_bits.bit_4 | temp69);
     234        stream temp71 = (u8.prefix4 & temp70);
    235235        u8.badprefix = (temp68 | temp71);
    236236        u8_error = u8.badprefix;
     
    238238        u8anyscope = u8.scope22;
    239239        if ((u8.prefix3 | u8.prefix4)) {
    240             var stream<1> xE0 = (u8.prefix3 & (~ temp36));
    241             var stream<1> xED = (u8.prefix3 & temp20);
    242             var stream<1> xF0 = (u8.prefix4 & (~ temp36));
    243             var stream<1> temp72 = (temp4 & (~ temp13));
    244             var stream<1> xF4 = (u8.prefix4 & temp72);
     240            stream xE0 = (u8.prefix3 & (~ temp36));
     241            stream xED = (u8.prefix3 & temp20);
     242            stream xF0 = (u8.prefix4 & (~ temp36));
     243            stream temp72 = (temp4 & (~ temp13));
     244            stream xF4 = (u8.prefix4 & temp72);
    245245            u8.xA0_xBF = (u8.suffix & basis_bits.bit_2);
    246246            u8.x80_x9F = (u8.suffix & (~ basis_bits.bit_2));
    247247            u8.x90_xBF = (u8.suffix & temp49);
    248248            u8.x80_x8F = (u8.suffix & (~ temp49));
    249             var stream<1> xEF = (u8.prefix3 & temp23);
    250             var stream<1> temp73 = (u8.suffix & temp7);
     249            stream xEF = (u8.prefix3 & temp23);
     250            stream temp73 = (u8.suffix & temp7);
    251251            u8.xBF = (temp73 & temp23);
    252252            u8.xBE = (temp73 & temp15);
     
    256256            u8.scope43 = pablo.Advance(u8.scope42);
    257257            u8.scope44 = pablo.Advance(u8.scope43);
    258             var stream<1> E0_F0_scope = pablo.Advance((xE0 | xF0));
    259             var stream<1> ED_F4_scope = pablo.Advance((xED | xF4));
     258            stream E0_F0_scope = pablo.Advance((xE0 | xF0));
     259            stream ED_F4_scope = pablo.Advance((xED | xF4));
    260260            u8.xE0_scope = (u8.scope32 & E0_F0_scope);
    261261            u8.xED_scope = (u8.scope32 & ED_F4_scope);
     
    263263            u8.xF4_scope = (u8.scope42 & ED_F4_scope);
    264264            u8.xEF_scope = pablo.Advance(xEF);
    265             var stream<1> u8lastscope = ((u8.scope22 | u8.scope33) | u8.scope44);
     265            stream u8lastscope = ((u8.scope22 | u8.scope33) | u8.scope44);
    266266            u8anyscope = (((u8lastscope | u8.scope32) | u8.scope42) | u8.scope43);
    267             var stream<1> u8error1 = (u8.xE0_scope & u8.x80_x9F);
    268             var stream<1> u8error2 = (u8.xED_scope & u8.xA0_xBF);
    269             var stream<1> u8error3 = (u8.xF0_scope & u8.x80_x8F);
    270             var stream<1> u8error4 = (u8.xF4_scope & u8.x90_xBF);
     267            stream u8error1 = (u8.xE0_scope & u8.x80_x9F);
     268            stream u8error2 = (u8.xED_scope & u8.xA0_xBF);
     269            stream u8error3 = (u8.xF0_scope & u8.x80_x8F);
     270            stream u8error4 = (u8.xF4_scope & u8.x90_xBF);
    271271            u8_error |= (((u8error1 | u8error2) | u8error3) | u8error4);
    272             var stream<1> EF_BF_pending = pablo.Advance((u8.xEF_scope & u8.xBF));
     272            stream EF_BF_pending = pablo.Advance((u8.xEF_scope & u8.xBF));
    273273            u8_FFFE_FFFF = (EF_BF_pending & (u8.xBE | u8.xBF));
    274274        }
    275         var stream<1> u8mismatch = (u8anyscope ^ u8.suffix);
     275        stream u8mismatch = (u8anyscope ^ u8.suffix);
    276276        pablo.assert_0(((u8_error | u8mismatch) | u8_FFFE_FFFF), "UTF-8 error found");
    277277    }
     
    287287    ctCDPI_Callouts.PI_name_ends = pablo.Mask(1,0);
    288288    ctCDPI_Callouts.PI_ends = pablo.Mask(1,0);
    289     var stream<1> CtCDPI_starts = pablo.Mask(1,0);
    290     var stream<1> CtCDPI_ends = pablo.Mask(1,0);
    291     var stream<1> ctCDPI_mask = pablo.Mask(1,0);
    292     var stream<1> v = (lex.LAngle | lex.Hyphen);
    293     var stream<1> w = (lex.Hyphen | lex.QMark);
    294     var stream<1> v1 = pablo.Advance(v, 1);
    295     var stream<1> w1 = pablo.Advance(w, 1);
    296     var stream<1> LAngle_scope = (v1 & (~ w1));
    297     var stream<1> PI_opener = (LAngle_scope & lex.QMark);
    298     var stream<1> CtCD_opener = (LAngle_scope & lex.Exclam);
    299     var stream<1> CtCDPI_opener = (PI_opener | CtCD_opener);
    300     var stream<1> CD_closer = pablo.Mask(1,0);
    301     var stream<1> DoubleHyphen = ((v1 & w1) & lex.Hyphen);
     289    stream CtCDPI_starts = pablo.Mask(1,0);
     290    stream CtCDPI_ends = pablo.Mask(1,0);
     291    stream ctCDPI_mask = pablo.Mask(1,0);
     292    stream v = (lex.LAngle | lex.Hyphen);
     293    stream w = (lex.Hyphen | lex.QMark);
     294    stream v1 = pablo.Advance(v, 1);
     295    stream w1 = pablo.Advance(w, 1);
     296    stream LAngle_scope = (v1 & (~ w1));
     297    stream PI_opener = (LAngle_scope & lex.QMark);
     298    stream CtCD_opener = (LAngle_scope & lex.Exclam);
     299    stream CtCDPI_opener = (PI_opener | CtCD_opener);
     300    stream CD_closer = pablo.Mask(1,0);
     301    stream DoubleHyphen = ((v1 & w1) & lex.Hyphen);
    302302    if (lex.RBracket) {
    303         var stream<1> DoubleRBracket = (pablo.Advance(lex.RBracket) & lex.RBracket);
     303        stream DoubleRBracket = (pablo.Advance(lex.RBracket) & lex.RBracket);
    304304        CD_closer = (pablo.Advance(DoubleRBracket) & lex.RAngle);
    305305    }
    306     var stream<1> PI_closer = ((w1 & (~ v1)) & lex.RAngle);
    307     var stream<1> CtCDPI_Cursor = pablo.ScanToFirst(CtCDPI_opener);
     306    stream PI_closer = ((w1 & (~ v1)) & lex.RAngle);
     307    stream CtCDPI_Cursor = pablo.ScanToFirst(CtCDPI_opener);
    308308    while (CtCDPI_Cursor) {
    309309        CtCDPI_starts |= CtCDPI_Cursor;
    310         var stream<1> PI_Cursor = (CtCDPI_Cursor & PI_opener);
    311         var stream<1> CD_Ct_Cursor = pablo.Advance((CtCDPI_Cursor & (~ PI_Cursor)));
    312         var stream<1> CD_Cursor = (CD_Ct_Cursor & lex.LBracket);
    313         var stream<1> Ct_Cursor = (CD_Ct_Cursor & lex.Hyphen);
     310        stream PI_Cursor = (CtCDPI_Cursor & PI_opener);
     311        stream CD_Ct_Cursor = pablo.Advance((CtCDPI_Cursor & (~ PI_Cursor)));
     312        stream CD_Cursor = (CD_Ct_Cursor & lex.LBracket);
     313        stream Ct_Cursor = (CD_Ct_Cursor & lex.Hyphen);
    314314        if (PI_Cursor) {
    315315            ctCDPI_Callouts.PI_starts |= PI_Cursor;
    316316            PI_Cursor = pablo.Advance(PI_Cursor);
    317317            ctCDPI_Callouts.PI_name_starts |= PI_Cursor;
    318             var stream<1> PI_name_end = pablo.ScanThru(PI_Cursor, lex.NameScan);
    319             var stream<1> PI_error = (PI_Cursor & PI_name_end);
    320             var stream<1> PI_noWS = (PI_name_end & (~ lex.WS));
     318            stream PI_name_end = pablo.ScanThru(PI_Cursor, lex.NameScan);
     319            stream PI_error = (PI_Cursor & PI_name_end);
     320            stream PI_noWS = (PI_name_end & (~ lex.WS));
    321321            PI_error |= ((PI_noWS & (~ lex.QMark)) | (pablo.Advance(PI_noWS) & (~ PI_closer)));
    322322            pablo.assert_0(PI_error, "Error in PI syntax");
     
    335335            ctCDPI_Callouts.Ct_starts |= Ct_Cursor;
    336336            Ct_Cursor = pablo.Advance(Ct_Cursor);
    337             var stream<1> Ct_error = (Ct_Cursor & (~ lex.Hyphen));
     337            stream Ct_error = (Ct_Cursor & (~ lex.Hyphen));
    338338            Ct_Cursor = pablo.Advance(pablo.Advance(Ct_Cursor));
    339339            Ct_Cursor = pablo.Advance(pablo.ScanTo(Ct_Cursor, DoubleHyphen));
     
    354354
    355355function void Parse_tags(struct Lex lex, struct Marker marker, struct Tag_Callouts tag_Callouts) {
    356     var stream<1> EqExpected = pablo.Mask(1,0);
    357     var stream<1> AttListEnd = pablo.Mask(1,0);
    358     var stream<1> DQuoteDelim = (lex.DQuote | lex.LAngle);
    359     var stream<1> SQuoteDelim = (lex.SQuote | lex.LAngle);
    360     var stream<1> AttListDelim = (lex.Slash | lex.RAngle);
     356    stream EqExpected = pablo.Mask(1,0);
     357    stream AttListEnd = pablo.Mask(1,0);
     358    stream DQuoteDelim = (lex.DQuote | lex.LAngle);
     359    stream SQuoteDelim = (lex.SQuote | lex.LAngle);
     360    stream AttListDelim = (lex.Slash | lex.RAngle);
    361361    tag_Callouts.ElemName_starts = (marker.LAngle_scope & (~ lex.Slash));
    362362    tag_Callouts.EndTag_marks = (marker.LAngle_scope & lex.Slash);
    363363    tag_Callouts.ElemName_ends = pablo.ScanThru(tag_Callouts.ElemName_starts, lex.NameScan);
    364     var stream<1> ParseError = (tag_Callouts.ElemName_starts & tag_Callouts.ElemName_ends);
     364    stream ParseError = (tag_Callouts.ElemName_starts & tag_Callouts.ElemName_ends);
    365365    tag_Callouts.AttName_starts = pablo.Mask(1,0);
    366366    tag_Callouts.AttName_ends = pablo.Mask(1,0);
     
    368368    tag_Callouts.AttVal_ends = pablo.Mask(1,0);
    369369    if ((tag_Callouts.ElemName_ends & lex.WS)) {
    370         var stream<1> AfterWS = pablo.ScanThru(tag_Callouts.ElemName_ends, lex.WS);
     370        stream AfterWS = pablo.ScanThru(tag_Callouts.ElemName_ends, lex.WS);
    371371        AttListEnd = (AfterWS & AttListDelim);
    372         var stream<1> AttNameStart = (AfterWS & (~ AttListDelim));
     372        stream AttNameStart = (AfterWS & (~ AttListDelim));
    373373        while (AttNameStart) {
    374374            ParseError |= (AttNameStart & (~ lex.NameScan));
    375375            tag_Callouts.AttName_starts |= AttNameStart;
    376             var stream<1> AttNameFollow = pablo.ScanThru(AttNameStart, lex.NameScan);
     376            stream AttNameFollow = pablo.ScanThru(AttNameStart, lex.NameScan);
    377377            tag_Callouts.AttName_ends |= AttNameFollow;
    378378            if ((AttNameFollow & lex.WS)) {
     
    383383            }
    384384            ParseError |= (EqExpected & (~ lex.Equals));
    385             var stream<1> AttValPos = pablo.AdvanceThenScanThru(EqExpected, lex.WS);
     385            stream AttValPos = pablo.AdvanceThenScanThru(EqExpected, lex.WS);
    386386            tag_Callouts.AttVal_starts |= AttValPos;
    387             var stream<1> DQuoteAttVal = (AttValPos & lex.DQuote);
    388             var stream<1> SQuoteAttVal = (AttValPos & lex.SQuote);
    389             var stream<1> DQuoteAttEnd = pablo.AdvanceThenScanTo(DQuoteAttVal, DQuoteDelim);
    390             var stream<1> SQuoteAttEnd = pablo.AdvanceThenScanTo(SQuoteAttVal, SQuoteDelim);
    391             var stream<1> AttValEnd = (DQuoteAttEnd | SQuoteAttEnd);
     387            stream DQuoteAttVal = (AttValPos & lex.DQuote);
     388            stream SQuoteAttVal = (AttValPos & lex.SQuote);
     389            stream DQuoteAttEnd = pablo.AdvanceThenScanTo(DQuoteAttVal, DQuoteDelim);
     390            stream SQuoteAttEnd = pablo.AdvanceThenScanTo(SQuoteAttVal, SQuoteDelim);
     391            stream AttValEnd = (DQuoteAttEnd | SQuoteAttEnd);
    392392            ParseError |= ((AttValPos | AttValEnd) & (~ (lex.DQuote | lex.SQuote)));
    393             var stream<1> AttValFollow = pablo.Advance(AttValEnd);
     393            stream AttValFollow = pablo.Advance(AttValEnd);
    394394            tag_Callouts.AttVal_ends |= AttValFollow;
    395395            if ((AttValFollow & lex.WS)) {
     
    409409        ParseError |= (tag_Callouts.ElemName_ends & (~ AttListDelim));
    410410    }
    411     var stream<1> STagEnds = (AttListEnd & lex.RAngle);
     411    stream STagEnds = (AttListEnd & lex.RAngle);
    412412    tag_Callouts.EmptyTag_marks = pablo.Advance((AttListEnd & lex.Slash));
    413413    ParseError |= (tag_Callouts.EmptyTag_marks & (~ lex.RAngle));
    414     var stream<1> EndTagEnds = pablo.AdvanceThenScanThru(tag_Callouts.EndTag_marks, lex.NameScan);
     414    stream EndTagEnds = pablo.AdvanceThenScanThru(tag_Callouts.EndTag_marks, lex.NameScan);
    415415    if ((EndTagEnds & lex.WS)) {
    416416        EndTagEnds = pablo.ScanThru(EndTagEnds, lex.WS);
     
    428428    ref_Callouts.HexRef_starts = pablo.Mask(1,0);
    429429    ref_Callouts.HexRef_ends = pablo.Mask(1,0);
    430     var stream<1> ref_error = pablo.Mask(1,0);
     430    stream ref_error = pablo.Mask(1,0);
    431431    if (marker.Ref_opener) {
    432         var stream<1> Ref_scope = pablo.Advance(marker.Ref_opener);
    433         var stream<1> NumRef2 = (Ref_scope & lex.Hash);
     432        stream Ref_scope = pablo.Advance(marker.Ref_opener);
     433        stream NumRef2 = (Ref_scope & lex.Hash);
    434434        ref_Callouts.GenRef_starts = (Ref_scope & (~ lex.Hash));
    435         var stream<1> NumRef3 = pablo.Advance(NumRef2);
    436         var stream<1> HexRef3 = (NumRef3 & lex.x);
     435        stream NumRef3 = pablo.Advance(NumRef2);
     436        stream HexRef3 = (NumRef3 & lex.x);
    437437        ref_Callouts.DecRef_starts = (NumRef3 & (~ lex.x));
    438438        ref_Callouts.HexRef_starts = pablo.Advance(HexRef3);
     
    440440        ref_Callouts.DecRef_ends = pablo.ScanThru(ref_Callouts.DecRef_starts, lex.Digit);
    441441        ref_Callouts.HexRef_ends = pablo.ScanThru(ref_Callouts.HexRef_starts, lex.Hex);
    442         var stream<1> ref_error1 = (ref_Callouts.DecRef_starts & (~ lex.Digit));
    443         var stream<1> ref_error2 = (ref_Callouts.HexRef_starts & (~ lex.Hex));
    444         var stream<1> ref_ends = ((ref_Callouts.GenRef_ends | ref_Callouts.DecRef_ends) | ref_Callouts.HexRef_ends);
    445         var stream<1> ref_error3 = (ref_ends & (~ lex.Semicolon));
     442        stream ref_error1 = (ref_Callouts.DecRef_starts & (~ lex.Digit));
     443        stream ref_error2 = (ref_Callouts.HexRef_starts & (~ lex.Hex));
     444        stream ref_ends = ((ref_Callouts.GenRef_ends | ref_Callouts.DecRef_ends) | ref_Callouts.HexRef_ends);
     445        stream ref_error3 = (ref_ends & (~ lex.Semicolon));
    446446        pablo.assert_0(((ref_error1 | ref_error2) | ref_error3), "Reference error found");
    447447    }
     
    449449
    450450function void Validate_xml_names(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) {
    451     var stream<1> PI_names = pablo.SpanUpTo(ctCDPI_Callouts.PI_name_starts, ctCDPI_Callouts.PI_name_ends);
    452     var stream<1> GenRefs = pablo.SpanUpTo(ref_Callouts.GenRef_starts, ref_Callouts.GenRef_ends);
    453     var stream<1> ElemNames = pablo.SpanUpTo(tag_Callouts.ElemName_starts, tag_Callouts.ElemName_ends);
    454     var stream<1> AttNames = pablo.SpanUpTo(tag_Callouts.AttName_starts, tag_Callouts.AttName_ends);
    455     var stream<1> qname_stream = (ElemNames | AttNames);
    456     var stream<1> ncname_stream = (PI_names | GenRefs);
    457     var stream<1> name_stream = (qname_stream | ncname_stream);
    458     var stream<1> name_start = (name_stream & (~ pablo.Advance(name_stream)));
    459     var stream<1> name_cursor = (name_stream & (~ pablo.Advance(name_stream)));
    460     var stream<1> void_prefix_err = (name_cursor & lex.Colon);
    461     var stream<1> namespace_sep = (pablo.ScanThru(name_cursor, (lex.NameScan & (~ lex.Colon))) & lex.Colon);
    462     var stream<1> local_part_start = pablo.Advance(namespace_sep);
    463     var stream<1> local_part_err = (local_part_start & (~ lex.NameScan));
    464     var stream<1> colon2_err = (pablo.ScanThru(local_part_start, (lex.NameScan & (~ lex.Colon))) & lex.Colon);
    465     var stream<1> ncname_err = (ncname_stream & lex.Colon);
     451    stream PI_names = pablo.SpanUpTo(ctCDPI_Callouts.PI_name_starts, ctCDPI_Callouts.PI_name_ends);
     452    stream GenRefs = pablo.SpanUpTo(ref_Callouts.GenRef_starts, ref_Callouts.GenRef_ends);
     453    stream ElemNames = pablo.SpanUpTo(tag_Callouts.ElemName_starts, tag_Callouts.ElemName_ends);
     454    stream AttNames = pablo.SpanUpTo(tag_Callouts.AttName_starts, tag_Callouts.AttName_ends);
     455    stream qname_stream = (ElemNames | AttNames);
     456    stream ncname_stream = (PI_names | GenRefs);
     457    stream name_stream = (qname_stream | ncname_stream);
     458    stream name_start = (name_stream & (~ pablo.Advance(name_stream)));
     459    stream name_cursor = (name_stream & (~ pablo.Advance(name_stream)));
     460    stream void_prefix_err = (name_cursor & lex.Colon);
     461    stream namespace_sep = (pablo.ScanThru(name_cursor, (lex.NameScan & (~ lex.Colon))) & lex.Colon);
     462    stream local_part_start = pablo.Advance(namespace_sep);
     463    stream local_part_err = (local_part_start & (~ lex.NameScan));
     464    stream colon2_err = (pablo.ScanThru(local_part_start, (lex.NameScan & (~ lex.Colon))) & lex.Colon);
     465    stream ncname_err = (ncname_stream & lex.Colon);
    466466    pablo.assert_0((((void_prefix_err | local_part_err) | colon2_err) | ncname_err), "name syntax error");
    467467    check_streams.non_ascii_name_starts = (name_start & (~ lex.ASCII_name_start));
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/assign/assign1.pablos

    r3011 r3160  
    11function void Assignments() {
    2         var stream<1> s;
     2        stream<1> s;
    33        s = 0;
    44};
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/assign/assign3.pablos

    r2834 r3160  
    1 
    21function void AssignmentExpressions() {
    32        temp4 = temp;
     
    54        temp4 |= temp1 ^ temp2;
    65        temp4 ^= temp1 & temp2;
    7 //      temp4 ~= temp1 ^ temp2 | temp3;
    86};
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/assign/assign4.pablos

    r2834 r3160  
    1 function void RecordExpressions() {
     1function void StreamStructs() {
    22
    33        // records
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/assign/assign6.pablos

    r2834 r3160  
    11function struct A FunctionExpressions() {
    2          var stream<1> a = b.Advance();
     2         stream<1> a = b.Advance();
    33};
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/assign/assign7.pablos

    r2981 r3160  
    11function void Assignments() {
    2         var stream<1> s;
    3         var stream<1> a;
    4         var stream<1> b;
    5         var stream<1> c;
     2        stream<1> s;
     3        stream<1> a;
     4        stream<1> b;
     5        stream<1> c;
    66        //s |= 0;
    77        //s = a | b | c;
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/if/if1.pablos

    r2834 r3160  
    11function void Function() {             
     2        stream cursor;
    23        if(cursor) {
    34
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/if/if2.pablos

    r2834 r3160  
    11function void Function() {     
     2       
     3        stream cursor;
    24       
    35        if(cursor & a) {
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/if/if3.pablos

    r2834 r3160  
    11function void Function() {     
     2       
     3        stream cursor;
    24       
    35        if(cursor & a) {
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/if/if4.pablos

    r2834 r3160  
    11function void Function() {     
     2       
     3        stream cursor;
    24       
    35        if(cursor & a) {
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/localDecl/localDecl1.pablos

    r2981 r3160  
    11function void localDecl() {
    22
    3         var struct BasisBits {
    4         stream<1> b1;
    5         stream<1> b2;
    6         stream<1> b3;
    7         stream<1> b4;
     3        struct BasisBits {
     4                stream<1> b1;
     5                stream<1> b2;
     6                stream<1> b3;
     7                stream<1> b4;
    88        } A;
    99
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/localDecl/localDecl2.pablos

    r2834 r3160  
    11function void localDecl() {
    22
    3 var struct BasisBits {
    4 stream<1> b1;
    5 stream<1> b2;
    6 stream<1> b3;
    7 stream<1> b4;
    8 } A;
     3        var struct BasisBits {
     4                stream<1> b1;
     5                stream<1> b2;
     6                stream<1> b3;
     7                stream<1> b4;
     8        } A;
    99
    1010};
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/localDecl/localDecl4.pablos

    r2981 r3160  
    11function void localDecl() {
    2         var stream<1> A;
    3         var stream<1> A=0;
     2        stream<1> A;
     3        stream<1> A=0;
    44}
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/localDecl/localDecl5.pablos

    r2984 r3160  
    11function void Assignments() {
    2         var stream<1> s = 4;
     2        stream<1> s = 4;
    33}
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/while/test.pablos.exclude

    r2981 r3160  
    11function void Function() {
    2 var stream<1> cursor = pablo.ScanToFirst(lex.opener);
     2        stream<1> cursor = pablo.ScanToFirst(lex.opener);
    33}
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/while/while1.pablos

    r2981 r3160  
    11function void While() {
    22                       
    3         var stream<1> cursor = 1;
     3        stream<1> cursor = 1;
    44       
    55        while (cursor) {
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/while/while2.pablos

    r2981 r3160  
    11function void While() {
    22       
    3         var stream<1> cursor;
     3        stream<1> cursor;
    44       
    55        while (cursor) {
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/while/while3.pablos

    r2981 r3160  
    11function void Function() {     
    2         var stream<1> cursor1;
     2        stream<1> cursor1;
    33       
    44        while (cursor1) {
    5                 var stream<1> cursor2;
     5                stream<1> cursor2;
    66                while(cursor2) {
    77                        cursor = pablo.Advance(cursor);
  • proto/pabloj/branches/refactor-experimental/input/test/pabloS/statements/while/while4.pablos

    r2981 r3160  
    11function void Function(struct TagCallouts tagCallouts, struct Lex lex) {       
    22
    3         var stream<1> starts_accum = 0;
    4         var stream<1> ends_accum = 0;   
    5        
    6         var stream<1> cursor = pablo.ScanToFirst(lex.opener);
     3        stream<1> starts_accum = 0;
     4        stream<1> ends_accum = 0;       
     5        stream<1> cursor = pablo.ScanToFirst(lex.opener);
    76       
    87        while (cursor) {
Note: See TracChangeset for help on using the changeset viewer.