Changeset 2915


Ignore:
Timestamp:
Mar 3, 2013, 5:40:25 PM (6 years ago)
Author:
lindanl
Message:

Add parse keyword

Location:
proto/PDF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/PDF/cb_pablo.py

    r2913 r2915  
    324324
    325325       
     326def Parse_Keywords(lex, marker, out_Callouts) :
     327        keywords_starts = (lex.Regular &~ pablo.Advance(lex.Regular)) &~ out_Callouts.mask
     328        keywords_follows = pablo.ScanThru(keywords_starts, lex.Regular)
     329        marker.starts |= keywords_starts
     330       
     331       
    326332def Prepare_content_buffer(basis_bits, lex, marker, parity, escape_Callouts, out_Callouts):
    327333
  • proto/PDF/cb_template.cpp

    r2914 r2915  
    309309          Digit_postprocessing(cb, pos);
    310310        }
     311        else {
     312          tokenArray[token_idx].type = kw_token;
     313          tokenArray[token_idx].token.char_ptr = &cb[pos];       
     314        }
    311315        iter++;
    312316        token_idx++;
     
    384388      parse_Names.do_block(lex0, marker[i], out_Callouts, lex1);
    385389      parse_Numeric.do_block(lex0, marker[i], out_Callouts);
     390      parse_Keywords.do_block(lex0, marker[i], out_Callouts);
    386391      prepare_content_buffer.do_block(basis_bits[i], lex0, marker[i], parity, escape_Callouts, out_Callouts, lex1);
    387392      Build_ContentBuffer(out_Callouts, marker[i], content_buf, &content_buf_ptr, del_sum, i);
     
    395400      parse_Names.do_block(lex[i], marker[i], out_Callouts, lex[i+1]);
    396401      parse_Numeric.do_block(lex[i], marker[i], out_Callouts);
     402      parse_Keywords.do_block(lex[i], marker[i], out_Callouts);
    397403      prepare_content_buffer.do_block(basis_bits[i], lex[i], marker[i], parity, escape_Callouts, out_Callouts, lex[i+1]);
    398404      Build_ContentBuffer(out_Callouts, marker[i], content_buf, &content_buf_ptr, del_sum, i);
     
    409415    parse_Names.do_final_block(lex0, marker[BLOCKS-1], out_Callouts, EOF_mask);
    410416    parse_Numeric.do_final_block(lex0, marker[BLOCKS-1], out_Callouts, EOF_mask);
     417    parse_Keywords.do_final_block(lex0, marker[BLOCKS-1], out_Callouts, EOF_mask);
    411418    prepare_content_buffer.do_final_block(basis_bits[BLOCKS-1], lex0, marker[BLOCKS-1], parity, escape_Callouts, out_Callouts, EOF_mask);
    412419    out_Callouts.delmask |= ~EOF_mask;         
     
    420427    parse_Names.do_final_block(lex[BLOCKS-1], marker[BLOCKS-1], out_Callouts, EOF_mask);
    421428    parse_Numeric.do_final_block(lex[BLOCKS-1], marker[BLOCKS-1], out_Callouts, EOF_mask);
     429    parse_Keywords.do_final_block(lex[BLOCKS-1], marker[BLOCKS-1], out_Callouts, EOF_mask);
    422430    prepare_content_buffer.do_final_block(basis_bits[BLOCKS-1], lex[BLOCKS-1], marker[BLOCKS-1], parity, escape_Callouts, out_Callouts, EOF_mask);
    423431    out_Callouts.delmask |= ~EOF_mask;         
     
    451459//       if(tokenArray[i].type==flt_token)
    452460//      printf("Number: %i\n",numbers[tokenArray[i].token.idx]);
     461//       
     462//       if(tokenArray[i].type==kw_token)
     463//      printf("Keyword: %s\n",tokenArray[i].token.char_ptr);
    453464//
    454465//     }
Note: See TracChangeset for help on using the changeset viewer.