Changeset 3022
- Timestamp:
- Apr 15, 2013, 6:09:16 AM (6 years ago)
- Location:
- proto/RE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
proto/RE/doc/README
r2314 r3022 1 Author: Ken Herdy2 Created on: June 26, 20121 Author: Ben Hull 2 Created on: April 13, 2013 3 3 4 4 ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- 5 How to Set up for AnTLR3 Python Development 5 RE Instructions 6 6 ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- 7 7 8 1. Install Python Runtime 8 1. Modify the input regular expression (RE/input/test/test1.re). 9 RE/input/grammar/re.scatter has the current grammar. 9 10 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 11 2. Make in RE. 14 12 15 ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- 16 Additional Steps to fix for setuptools*.egg AnTLR Python runtime issue 17 ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- 13 3. Make in RE/output. 18 14 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 15 4. Make in RE/output/src. -
proto/RE/output/pablo_template.cpp
r3015 r3022 187 187 188 188 @block_stmts 189 189 //print_register2("Matches",output.matches,128); 190 190 191 191 match_scanner.init(&output.matches); … … 194 194 line_scanner.scan_to_next(); 195 195 while(!(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) { 197 197 line_match_found=false; 198 198 line_scanner.scan_to_next(); … … 200 200 if (!line_match_found) { 201 201 match_count++; 202 //printf("Match7 at: %d\n",match_scanner.get_pos()); 202 203 line_match_found=true; 203 204 } … … 211 212 if (!line_match_found) { 212 213 match_count++; 214 //printf("Match8 at: %d\n",match_scanner.get_pos()); 213 215 line_match_found=true; 214 216 } 215 217 216 218 } 217 while(!match_scanner.is_done()) { 218 match_count++; 219 match_scanner.scan_to_next(); 220 } 219 221 220 //print_register2("Matches",output.matches, 128); 222 221 } … … 245 244 s2p_do_block((BytePack *) &src_buffer[block_pos], basis_bits); 246 245 @block_stmts 246 //print_register2("Matches",output.matches,128); 247 247 match_scanner.init(&output.matches); 248 248 line_scanner.init(&lex.LF); … … 250 250 line_scanner.scan_to_next(); 251 251 while(!(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) { 253 253 line_match_found=false; 254 254 line_scanner.scan_to_next(); … … 256 256 if (!line_match_found) { 257 257 match_count++; 258 //printf("Match3 at: %d\n",match_scanner.get_pos()); 258 259 line_match_found=true; 259 260 } … … 267 268 if (!line_match_found) { 268 269 match_count++; 270 //printf("Match5 at: %d\n",match_scanner.get_pos()); 269 271 line_match_found=true; 270 272 } … … 290 292 s2p_do_final_block((BytePack *) &src_buffer[block_pos], basis_bits, EOF_mask); 291 293 @final_block_stmts 292 294 //print_register2("Matches",output.matches,128); 293 295 match_scanner.init(&output.matches); 294 296 line_scanner.init(&lex.LF); … … 296 298 line_scanner.scan_to_next(); 297 299 while(!(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) { 299 301 line_match_found=false; 300 302 line_scanner.scan_to_next(); … … 302 304 if (!line_match_found) { 303 305 match_count++; 306 //printf("Match at: %d\n",match_scanner.get_pos()); 304 307 line_match_found=true; 305 308 } … … 313 316 if (!line_match_found) { 314 317 match_count++; 318 //printf("Match2 at: %d\n",match_scanner.get_pos()); 315 319 line_match_found=true; 316 320 } -
proto/RE/output/src/Makefile
r3005 r3022 20 20 21 21 22 avx: $(SRCFILE)23 $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) -march=nocona -m64 -mavx24 22 25 23 all: $(SRCFILE) 26 24 $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) $(AFLAGS) 25 26 avx: $(SRCFILE) 27 $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) -march=nocona -m64 -mavx 27 28 28 29 papi_profiling: $(SRCFILE)
Note: See TracChangeset
for help on using the changeset viewer.