Changeset 1274


Ignore:
Timestamp:
Aug 4, 2011, 5:53:27 AM (8 years ago)
Author:
cameron
Message:

Clean-ups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/parabix2_pablo.py

    r1272 r1274  
    1414
    1515#import bitutil
     16
     17class Basis_bits():     
     18        bit_0 = 0
     19        bit_1 = 0
     20        bit_2 = 0
     21        bit_3 = 0
     22        bit_4 = 0
     23        bit_5 = 0
     24        bit_6 = 0
     25        bit_7 = 0
     26
    1627
    1728class u8 ():
     
    109120        EndTag_marks = 0
    110121       
    111 class Basis_bits():     
    112         bit_0 = 0
    113         bit_1 = 0
    114         bit_2 = 0
    115         bit_3 = 0
    116         bit_4 = 0
    117         bit_5 = 0
    118         bit_6 = 0
    119         bit_7 = 0
    120        
    121122class Check_streams():
    122123        misc_mask = 0
     
    126127        name_follows = 0
    127128        att_refs = 0
    128 
    129 class Xml_names():
    130         namespace_error = 0
    131129
    132130def Classify_bytes_Validate_utf8(basis_bits, lex, u8): 
     
    535533
    536534
    537 def Validate_xml_names(ctCDPI_Callouts, ref_Callouts, tag_Callouts, lex, u8, xml_names, check_streams):
     535def Validate_xml_names(ctCDPI_Callouts, ref_Callouts, tag_Callouts, lex, u8, check_streams):
    538536        PI_names = ctCDPI_Callouts.PI_name_ends - ctCDPI_Callouts.PI_name_starts
    539537        GenRefs = ref_Callouts.GenRef_ends - ref_Callouts.GenRef_starts
     
    559557        check_streams.non_ascii_names = (name_stream &~ name_start) & ~lex.ASCII_name_char & ~u8.suffix
    560558   
    561 def Do_check_streams(ctCDPI_Callouts, tag_Callouts, lex, u8, marker, ref_Callouts, xml_names, check_streams):
     559def Do_check_streams(marker, tag_Callouts, check_streams):
    562560        CD_end_error = marker.CD_closer & ~tag_Callouts.AttVal_spans
    563561        if CD_end_error:
     
    579577        Classify_bytes_Validate_utf8(basis_bits, lex, u8)
    580578
    581         #Add_scope_streams(lex, scope1)
    582    
    583579        # Parse all comments, CDATA sections and processing instructions.
    584580        Parse_CtCDPI(lex, marker, ctCDPI_Callouts, check_streams)
     
    591587       
    592588        # Validate XML namespaces and generate bit streams to post validate non-ascii range XML names
    593         Validate_xml_names(ctCDPI_Callouts, ref_Callouts, tag_Callouts, lex, u8, xml_names, check_streams)
     589        Validate_xml_names(ctCDPI_Callouts, ref_Callouts, tag_Callouts, lex, u8, check_streams)
    594590   
    595    
    596         Do_check_streams(ctCDPI_Callouts, tag_Callouts, lex, u8, marker, ref_Callouts, xml_names, check_streams)
    597 
    598 
     591        Do_check_streams(marker, tag_Callouts, check_streams)
     592
     593
Note: See TracChangeset for help on using the changeset viewer.