Changeset 3022


Ignore:
Timestamp:
Apr 15, 2013, 6:09:16 AM (6 years ago)
Author:
bhull
Message:

RE changes

Location:
proto/RE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • proto/RE/doc/README

    r2314 r3022  
    1 Author: Ken Herdy
    2 Created on: June 26, 2012
     1Author: Ben Hull
     2Created on: April 13, 2013
    33
    44----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
    5 How to Set up for AnTLR3 Python Development
     5RE Instructions
    66----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
    77
    8 1. Install Python Runtime
     81. Modify the input regular expression (RE/input/test/test1.re).
     9   RE/input/grammar/re.scatter has the current grammar.
    910
    10 cd antlr
    11 tar -xvf antlr_python_runtime-3.1.3.tar.gz
    12 cd antlr_python_runtime-3.1.3/
    13 sudo python setup.py install
     112. Make in RE.
    1412
    15 ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
    16 Additional Steps to fix for setuptools*.egg AnTLR Python runtime issue
    17 ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
     133. Make in RE/output.
    1814
    19 Download error message 'setuptools*.egg' from http://pypi.python.org/simple/setuptools/.
    20 Copy to antlr_python_runtime-3.1.3 directory.
    21 Rename 'setuptools*.egg' to error message name.
    22 Rerun sudo python setup.py install.
    23 
    24 2. Copy Python RE2PBS Library Files to Bin
    25 
    26 cp res/*.py bin
    27 
    28 3. Build RE2PBS
    29 
    30 make help
    31 make clean
    32 make pablo
    33 make proto
    34 
    35 
     154. Make in RE/output/src.
  • proto/RE/output/pablo_template.cpp

    r3015 r3022  
    187187
    188188          @block_stmts
    189 
     189//print_register2("Matches",output.matches,128);
    190190
    191191match_scanner.init(&output.matches);
     
    194194line_scanner.scan_to_next();
    195195while(!(match_scanner.is_done() || line_scanner.is_done())) {
    196         if (line_scanner.get_pos()<match_scanner.get_pos()) {
     196        if (line_scanner.get_pos()<match_scanner.get_pos()-1) {
    197197                line_match_found=false;
    198198                line_scanner.scan_to_next();
     
    200200                if (!line_match_found) {
    201201                        match_count++;
     202                        //printf("Match7 at: %d\n",match_scanner.get_pos());
    202203                        line_match_found=true;
    203204                }
     
    211212        if (!line_match_found) {
    212213                match_count++;
     214                        //printf("Match8 at: %d\n",match_scanner.get_pos());
    213215                line_match_found=true;
    214216        }
    215217
    216218}
    217 while(!match_scanner.is_done()) {
    218         match_count++;
    219         match_scanner.scan_to_next();
    220 }
     219
    221220//print_register2("Matches",output.matches, 128);
    222221      }
     
    245244                                s2p_do_block((BytePack *) &src_buffer[block_pos], basis_bits);
    246245                                @block_stmts
     246//print_register2("Matches",output.matches,128);
    247247match_scanner.init(&output.matches);
    248248line_scanner.init(&lex.LF);
     
    250250line_scanner.scan_to_next();
    251251while(!(match_scanner.is_done() || line_scanner.is_done())) {
    252         if (line_scanner.get_pos()<match_scanner.get_pos()) {
     252        if (line_scanner.get_pos()<match_scanner.get_pos()-1) {
    253253                line_match_found=false;
    254254                line_scanner.scan_to_next();
     
    256256                if (!line_match_found) {
    257257                        match_count++;
     258                        //printf("Match3 at: %d\n",match_scanner.get_pos());
    258259                        line_match_found=true;
    259260                }
     
    267268        if (!line_match_found) {
    268269                match_count++;
     270                        //printf("Match5 at: %d\n",match_scanner.get_pos());
    269271                line_match_found=true;
    270272        }
     
    290292                                s2p_do_final_block((BytePack *) &src_buffer[block_pos], basis_bits, EOF_mask);
    291293          @final_block_stmts
    292 
     294//print_register2("Matches",output.matches,128);
    293295match_scanner.init(&output.matches);
    294296line_scanner.init(&lex.LF);
     
    296298line_scanner.scan_to_next();
    297299while(!(match_scanner.is_done() || line_scanner.is_done())) {
    298         if (line_scanner.get_pos()<match_scanner.get_pos()) {
     300        if (line_scanner.get_pos()<match_scanner.get_pos()-1) {
    299301                line_match_found=false;
    300302                line_scanner.scan_to_next();
     
    302304                if (!line_match_found) {
    303305                        match_count++;
     306                        //printf("Match at: %d\n",match_scanner.get_pos());
    304307                        line_match_found=true;
    305308                }
     
    313316        if (!line_match_found) {
    314317                match_count++;
     318                        //printf("Match2 at: %d\n",match_scanner.get_pos());
    315319                line_match_found=true;
    316320        }
  • proto/RE/output/src/Makefile

    r3005 r3022  
    2020
    2121
    22 avx:    $(SRCFILE)
    23         $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) -march=nocona -m64 -mavx
    2422
    2523all:    $(SRCFILE)
    2624        $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) $(AFLAGS)
     25
     26avx:    $(SRCFILE)
     27        $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) -march=nocona -m64 -mavx
    2728
    2829papi_profiling: $(SRCFILE)
Note: See TracChangeset for help on using the changeset viewer.