Changeset 884 for docs/EuroPar2011/Demo


Ignore:
Timestamp:
Feb 4, 2011, 11:21:43 AM (9 years ago)
Author:
cameron
Message:

Update start tag parsing figure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/EuroPar2011/Demo/europar.py

    r879 r884  
    143143        c4 = c3 &~ e2
    144144        e = e0 | e1 | e2
    145         return bitutil.latex_streams([('source data', u8data),
     145        return bitutil.latex_streams([('source data $\\vartriangleright$', u8data),
    146146                              ('$M_0$', bitutil.bitstream2string(c0, lgth, zero_ch)),
    147147                              ('$M_1 = n(M_0)$', bitutil.bitstream2string(c1, lgth, zero_ch)),
     
    268268        callouts.error = ParseError
    269269
    270         return bitutil.latex_streams([('source data', u8data),
    271                               ('$N = $name chars', bitutil.bitstream2string(lex.NameScan, lgth, zero_ch)),
    272                               ('$W = $white space', bitutil.bitstream2string(lex.WS, lgth, zero_ch)),
     270        return bitutil.latex_streams([('source data $\\vartriangleright$', u8data),
     271                              ('$N = $ name chars', bitutil.bitstream2string(lex.NameScan, lgth, zero_ch)),
     272                              ('$W = $ white space', bitutil.bitstream2string(lex.WS, lgth, zero_ch)),
    273273                              ('$Q = \\neg$\\verb:[">]:', bitutil.bitstream2string(DQuoteScan, lgth, zero_ch)),
    274274                              ('$M_0$', bitutil.bitstream2string(m0, lgth, zero_ch)),
    275275                              ('$M_1 = n(M_0)$', bitutil.bitstream2string(ElemNamePositions, lgth, zero_ch)),
    276                               ('$M_2 = s(M_1, N)$', bitutil.bitstream2string(ElemNameFollows, lgth, zero_ch)),
    277                               ('$M_3 = s(M_2, W) \\wedge \\neg$\\verb:[>]:', bitutil.bitstream2string(AttNameStart1, lgth, zero_ch)),
    278                               ('$M_4 = s(M_3, N)$', bitutil.bitstream2string(AttNameFollow1, lgth, zero_ch)),
    279                               ('$M_5 = s(M_4, W) \\wedge$\\verb:[=]:', bitutil.bitstream2string(EqExpected1, lgth, zero_ch)),
    280                               ('$M_6 = n(M_5)$', bitutil.bitstream2string(bitutil.Advance(EqExpected1), lgth, zero_ch)),
    281                               ('$M_7 = s(M_6, W) \\wedge$\\verb:["]:', bitutil.bitstream2string(AttValPos1, lgth, zero_ch)),
    282                               ('$M_8 = n(M_7)$', bitutil.bitstream2string(bitutil.Advance(DQuoteAttVal1), lgth, zero_ch)),
    283                               ('$M_9 = s(M_8, Q) \\wedge$\\verb:["]:', bitutil.bitstream2string(DQuoteAttEnd1, lgth, zero_ch)),
    284                               ('$M_{10} = n(M_9)$', bitutil.bitstream2string(AttValFollow1, lgth, zero_ch)),
    285                               ('$M_{11} = s(M_{10}, W) \\wedge \\neg$\\verb:[>]:', bitutil.bitstream2string(AttNameStart2, lgth, zero_ch)),
    286                               ('$M_{12} = s(M_{11}, N)$', bitutil.bitstream2string(AttNameFollow2, lgth, zero_ch)),
    287                               ('$M_{13} = s(M_{12}, W) \\wedge$\\verb:[=]:', bitutil.bitstream2string(EqExpected2, lgth, zero_ch)),
    288                               ('$M_{14} = n(M_{13})$', bitutil.bitstream2string(bitutil.Advance(EqExpected2), lgth, zero_ch)),
    289                               ('$M_{15} = s(M_{14}, W) \\wedge$\\verb:["]:', bitutil.bitstream2string(AttValPos2, lgth, zero_ch)),
    290                               ('$M_{16} = n(M_{15})$', bitutil.bitstream2string(bitutil.Advance(DQuoteAttVal2), lgth, zero_ch)),
    291                               ('$M_{17} = s(M_{16}, Q) \\wedge$\\verb:["]:', bitutil.bitstream2string(DQuoteAttEnd2, lgth, zero_ch)),
    292                               ('$M_{18} = n(M_{17})$', bitutil.bitstream2string(AttValFollow2, lgth, zero_ch)),
    293                               ('$M_{19} = s(M_{18}, W) \\wedge \\neg$\\verb:[>]:', bitutil.bitstream2string(AttNameStart3, lgth, zero_ch))])
    294 
    295 
    296 t1 = r"""-<d>---<elem1 a="17" b="33">---<elem1 a= "137" b ="xxx">----<c12 alpha="">---"""
     276                              ('$M_{0,7} = s(M_1, N)$', bitutil.bitstream2string(ElemNameFollows, lgth, zero_ch)),
     277                              ('$M_{0,8} = s(M_{0,7}, W) \\wedge \\neg$\\verb:[>]:', bitutil.bitstream2string(AttNameStart1, lgth, zero_ch)),
     278                              ('$M_{1,1} = s(M_{0,8}$', bitutil.bitstream2string(AttNameFollow1, lgth, zero_ch)),
     279                              ('$M_{1,2} = s(M_{1,1}, W) \\wedge$\\verb:[=]:', bitutil.bitstream2string(EqExpected1, lgth, zero_ch)),
     280                              ('$M_{1,3} = n(M_{1,2})$', bitutil.bitstream2string(bitutil.Advance(EqExpected1), lgth, zero_ch)),
     281                              ('$M_{1,4} = s({1,3}, W) \\wedge$\\verb:["]:', bitutil.bitstream2string(AttValPos1, lgth, zero_ch)),
     282                              ('$M_{1,5} = n(M_{1,4})$', bitutil.bitstream2string(bitutil.Advance(DQuoteAttVal1), lgth, zero_ch)),
     283                              ('$M_{1,6} = s(M_{1,5}, Q) \\wedge$\\verb:["]:', bitutil.bitstream2string(DQuoteAttEnd1, lgth, zero_ch)),
     284                              ('$M_{1,7} = n(M_{1,6})$', bitutil.bitstream2string(AttValFollow1, lgth, zero_ch)),
     285                              ('$M_{1,8} = s(M_{1,7}, W) \\wedge \\neg$\\verb:[>]:', bitutil.bitstream2string(AttNameStart2, lgth, zero_ch)),
     286                              ('$M_{2,1} = s(M_{1,8}, N)$', bitutil.bitstream2string(AttNameFollow2, lgth, zero_ch)),
     287                              ('$M_{2,2} = s(M_{2,1}, W) \\wedge$\\verb:[=]:', bitutil.bitstream2string(EqExpected2, lgth, zero_ch)),
     288                              ('$M_{2,3} = n(M_{2,2})$', bitutil.bitstream2string(bitutil.Advance(EqExpected2), lgth, zero_ch)),
     289                              ('$M_{2,4} = s(M_{2,3}, W) \\wedge$\\verb:["]:', bitutil.bitstream2string(AttValPos2, lgth, zero_ch)),
     290                              ('$M_{2,5} = n(M_{2,4})$', bitutil.bitstream2string(bitutil.Advance(DQuoteAttVal2), lgth, zero_ch)),
     291                              ('$M_{2,6} = s(M_{2,5}, Q) \\wedge$\\verb:["]:', bitutil.bitstream2string(DQuoteAttEnd2, lgth, zero_ch)),
     292                              ('$M_{2,7} = n(M_{2,6})$', bitutil.bitstream2string(AttValFollow2, lgth, zero_ch)),
     293                              ('$M_{2,8} = s(M_{2,7}, W) \\wedge \\neg$\\verb:[>]:', bitutil.bitstream2string(AttNameStart3, lgth, zero_ch))])
     294
     295
     296t1 = r"""--<e a= "137">---<el2 a="17" a2="3379">---<x>--"""
    297297
    298298
Note: See TracChangeset for help on using the changeset viewer.