Changeset 3987 for proto/charsetcompiler


Ignore:
Timestamp:
Aug 10, 2014, 5:29:31 AM (5 years ago)
Author:
cameron
Message:

Filter newlines for catgrep

Location:
proto/charsetcompiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/charsetcompiler/Makefile

    r3978 r3987  
    11OUTFILE=src/categories.h
    22
    3 PABLO_SRC=Nd.pablo
     3PABLO_SRC=cat.pablo
    44PABLO_TEMPLATE=category_template.h
    55PABLO_COMPILER=../Compiler/pablomain.py
    6 GREP_SRC=Ndgrep.pablo
     6GREP_SRC=catgrep.pablo
    77GREP_TEMPLATE=grep_template.cpp
    88GREPOUTFILE = src/catgrep.cpp
  • proto/charsetcompiler/unicode_category_compiler.py

    r3980 r3987  
    277277           subrangeE = matched_sequence_compiler(cgo, lo2, hi2, ulen)
    278278           if options.grep:
    279               target = "all_matches"
     279              target = "all_chars"
    280280           else:
    281281              target = "struct_%s.cc" % k
     
    314314   for k in charClassMap.keys():
    315315     if options.grep:
    316          cgo.add_assignment("all_matches", '0')
     316         cgo.add_assignment("all_chars", '0')
    317317     else:
    318318         cgo.add_assignment("struct_%s.cc" % k, '0')
     
    385385      code += r"""
    386386        output.matches = 0
     387        all_matches = pablo.Advance(all_chars & ~lex.LF)
    387388        if all_matches:
    388389                # Find the last match on each line and filter out all others
     
    474475
    475476
    476 
    477 
    478 
    479 
    480 
    481 
    482 
    483 
    484 
Note: See TracChangeset for help on using the changeset viewer.