You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lnav/test/drive_data_scanner.cc

22 lines
356 B
C++

#include "config.h"
#include <stdio.h>
#include "pcrepp.hh"
#include "data_scanner.hh"
int main(int argc, char *argv[])
{
pcre_context_static<30> pc;
data_scanner ds("a=1 b=2");
data_token_t token;
while (ds.tokenize(pc, token)) {
printf("tok %d %d:%d\n", token,
pc.begin()->c_begin,
pc.begin()->c_end);
}
}