Ignore:
Timestamp:
Feb 22, 2014, 3:37:03 PM (5 years ago)
Author:
cameron
Message:

Introduce ambiguity into MatchStar? examples

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/Working/re/scripts/streams.py

    r3491 r3636  
    7676        temp24 = (basis_bits.bit_6 &~ basis_bits.bit_7)
    7777        temp25 = (temp23 & temp24)
    78         lex.z = (temp22 & temp25)
     78        temp26 = (temp22 & temp25)
     79        temp27 = (temp23 & temp20)
     80        temp28 = (temp9 & temp27)
     81        lex.z9 = (temp26 | temp28)
    7982
    8083
     
    9598                              ('$B_0$', pablo.bitstream2string(basis_bits.bit_7, lgth, zero_ch)),
    9699                              ('\\verb:[a]:', pablo.bitstream2string(lex.a, lgth, zero_ch)),
    97                               ('\\verb:[z]:', pablo.bitstream2string(lex.z, lgth, zero_ch)),
     100                              ('\\verb:[z9]:', pablo.bitstream2string(lex.z9, lgth, zero_ch)),
    98101                              ('\\verb:[0-9]:', pablo.bitstream2string(lex.digit, lgth, zero_ch))])
    99102
     
    107110        M1 = pablo.Advance(lex.a)
    108111        M2 = pablo.MatchStar(M1, lex.digit)
    109         M3 = pablo.Advance(M2 & lex.z)
     112        M3 = pablo.Advance(M2 & lex.z9)
    110113        return pablo.latex_streams([('input data ', chardata),
    111114                              ('$M_1$', pablo.bitstream2string(M1, lgth, zero_ch)),
     
    137140
    138141if __name__ == "__main__":
    139         print latex_streams1(r"""a4534q--b29z---az---a4q--bca22z--""")
    140         print latex_streams2(r"""a4534q--b29z---az---a4q--bca22z--""")
    141         print latex_streams3(r"""a4534q--b29z---az---a4q--bca22z--""")
     142        #data = r"""a4534q--b29z---az---a4q--bca22z--"""
     143        data = r"""a453z--b3z--az--a12949z--ca22z7--"""
     144        print latex_streams1(data)
     145        print latex_streams2(data)
     146        print latex_streams3(data)
    142147
    143148
Note: See TracChangeset for help on using the changeset viewer.