Changeset 904 for proto/parabix2


Ignore:
Timestamp:
Feb 12, 2011, 6:09:55 AM (8 years ago)
Author:
cameron
Message:

Add lex.error; eliminate xml_char class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/parabix2_pablo.py

    r899 r904  
    5050
    5151class Lex ():
    52         x00_x1F = 0
    5352        CR = 0
    5453        LF = 0
     
    7877        Hex = 0
    7978        WS = 0
     79        error = 0
    8080
    8181class Scope1 ():
     
    120120        LAngleFollow = 0
    121121        error = 0
    122        
    123 class Xml_char():
    124         error = 0       
    125122       
    126123class Basis_bits():     
     
    217214        lex.NameScan = (lex.ASCII_name_char | basis_bits.bit_0);
    218215        temp48 = (temp1 | basis_bits.bit_2);
    219         lex.x00_x1F = (~temp48);
     216        x00_x1F = (~temp48);
    220217        temp49 = (basis_bits.bit_2 | basis_bits.bit_3);
    221218        temp50 = (temp1 | temp49);
     
    242239        temp65 = (temp64 & temp60);
    243240        lex.Hex = (temp62 | temp65);
     241        lex.error = x00_x1F &~ lex.WS
    244242       
    245243        ### Validate_utf8(basis_bits, u8):
     
    539537        Classify_bytes_Validate_utf8(basis_bits, lex, u8)
    540538
    541         # Check for illegal control characters
    542         xml_char.error = (lex.x00_x1F &~ lex.WS & masks.EOF_mask)
    543         xml_char.error |= u8.FFFE_FFFF
    544 
    545539        Add_scope_streams(lex, scope1)
    546540   
     
    561555               
    562556        # Consolidate and check for errors
    563         post_process.error_mask = u8.error | xml_char.error | ctCDPI_Callouts.error | tag_Callouts.error | CD_end_error | ref_Callouts.error | xml_names.namespace_error
     557        post_process.error_mask = lex.error & EOF_mask | u8.error | u8.FFFE_FFFF | ctCDPI_Callouts.error | tag_Callouts.error | CD_end_error | ref_Callouts.error | xml_names.namespace_error
    564558
    565559        post_process.tag_marks = tag_Callouts.EmptyTag_marks | tag_Callouts.LAngleFollow | tag_Callouts.AttName_starts
Note: See TracChangeset for help on using the changeset viewer.