Changeset 45


Ignore:
Timestamp:
Feb 11, 2008, 8:43:04 PM (11 years ago)
Author:
cameron
Message:

Error strings

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/markup_stats.cxx

    r38 r45  
    1414#include <sys/stat.h>
    1515#include <unistd.h>
     16#include <string>
     17#include <iostream>
     18using namespace std;
    1619
    1720#include "src/ilax.h"
     
    2528#include "src/bitlex.c"
    2629#include "src/engine.c"
     30
     31/* Global declarations of parsing engine. */
     32Parser_Interface * parser;
    2733
    2834/* Global declarations for statistics. */
     
    108114        error_item_length += end_pos - start_pos;
    109115        printf("Error: illegal markup at positions %i through %i.\n", start_pos, end_pos);
     116
     117        cout << string((char *) parser->GetCodeUnitPtr(start_pos), end_pos - start_pos) << endl;
     118
     119
     120
    110121}
    111122
     
    189200
    190201
     202
     203
    191204int
    192205main(int argc, char * argv[]) {
     
    198211       
    199212       
    200         Parser_Interface * parser = Parser_Interface::ParserFactory(filename);
     213        parser = Parser_Interface::ParserFactory(filename);
    201214       
    202215       
  • trunk/src/bitlex.c

    r42 r45  
    787787void Lexer_Interface::AdvanceBuffer(int& base_pos, int& rel_pos, int& limit_pos) {
    788788        BitBlock final_block_mask;
     789#ifdef BUFFER_PROFILING
     790        start_BOM_interval(bitstream_timer);
     791#endif
    789792#ifdef DEBUG
    790793        printf("AdvanceBuffer entry.\n");
Note: See TracChangeset for help on using the changeset viewer.