Ignore:
Timestamp:
Jul 30, 2011, 10:57:22 AM (8 years ago)
Author:
cameron
Message:

Optimize further

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/parabix2_pablo.py

    r1243 r1244  
    448448                        AttListEnd |= AfterWS & AttListDelim
    449449                        AttNameStart = AfterWS & ~AttListDelim
     450                # No more attribute values to process when AttNameStart == 0.
     451                # Check for errors.
     452                ParseError |= tag_Callouts.AttVal_ends & tag_Callouts.AttName_starts # No intervening WS.
     453                ParseError |= tag_Callouts.AttName_starts & tag_Callouts.AttName_ends # Null AttName
     454                ParseError |= EqToCheck & ~lex.Equals # = not found where expected.
     455                ParseError |= tag_Callouts.AttVal_starts & ~ (lex.DQuote | lex.SQuote)
     456                ParseError |= AttValEnds & ~ (lex.DQuote | lex.SQuote)
    450457        else:
    451458                # At least one WS character is required between ElemNames and AttNames.
    452459                AttListEnd = tag_Callouts.ElemName_ends & AttListDelim
    453                 AttNameStart = tag_Callouts.ElemName_ends & ~AttListDelim
    454                 ParseError |= AttNameStart
    455 
     460                ParseError |= tag_Callouts.ElemName_ends & ~AttListDelim
    456461
    457462        # No more attribute values to process when AttNameStart == 0.
     
    460465        tag_Callouts.EmptyTag_marks = bitutil.Advance(AttListEnd & lex.Slash)
    461466       
    462         # Check for errors.
    463         ParseError |= tag_Callouts.AttVal_ends & tag_Callouts.AttName_starts # No intervening WS.
    464         ParseError |= tag_Callouts.AttName_starts & tag_Callouts.AttName_ends # Null AttName
    465         ParseError |= EqToCheck & ~lex.Equals # = not found where expected.
    466         ParseError |= tag_Callouts.AttVal_starts & ~ (lex.DQuote | lex.SQuote)
    467         ParseError |= AttValEnds & ~ (lex.DQuote | lex.SQuote)
    468467        ParseError |= tag_Callouts.EmptyTag_marks & ~lex.RAngle
    469468
Note: See TracChangeset for help on using the changeset viewer.